No announcement yet.
  • Filter
  • Time
Clear All
new posts

  • The javassist-3.4.GA library is not compatible with Java 8 byte code.

    I use Smartgwt 6.1 Power and the javassist-3.4.GA library, used by Hibernate to create the EntityManagerFactory, is not compatible with Java 8 byte code.

    As I understand, Hibernate is checking the JPA annotations (Entity...) in the byte code of the Class files at run time using Javassist api and the following exception is raised (see complete exception in attachment).

    Caused by: invalid constant type: 18
    at javassist.bytecode.ConstPool.readOne(
    at javassist.bytecode.ConstPool.<init>(
    at javassist.bytecode.ClassFile.<init>(

    To reproduce the issue, it just needs to create a project with a JPA data source and with lambda expression in the code, it will fail when running the app.

    When I update "javassist-3.4.GA" to more recent version "javassist-3.22.0-GA.jar" it works fine. My concern is that this is a hack, since I replace a library provided with Smargwt.

    Could you confirm that I can replace the "javassist-3.4.GA" library by "javassist-3.22.0-GA.jar" safely? And possibly apply the fix on your side?

    If not, do you have any suggestion to fix this issue?
    Attached Files

  • #2
    We've ported javassist-3.18.2-GA from SGWT 12.0d/SC 12.0d back to SGWT 6.1p/SC 11.1p as that's compatible with Java 8 and known to be working well, and only requires Java 7. However, we're not aware of any issue with that newer version you mentioned if that's what you'd like to use.

    This will be in the nightly build dated 2017-12-06.


    • #3
      Ok, I will use your nightly build. Thank you for your help!