Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4.0.CR1, 5.3.7
    • Component/s: hibernate-core
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      Our Javassist support has been completely broken by this commit: https://github.com/hibernate/hibernate-orm/commit/a67c6b9cd4fd16b02c4af02e7691ee1dc2042a0a#diff-5a7906bdb96b0b59acc1b49a19e4ba80L69

      We now have the following errors when enhancing classes:

      Caused by: javassist.CannotCompileException: [source error] no such class: Objects
      	at javassist.CtBehavior.insertBefore(CtBehavior.java:806)
      	at javassist.CtBehavior.insertBefore(CtBehavior.java:766)
      	at org.hibernate.bytecode.enhance.internal.javassist.PersistentAttributesEnhancer.generateFieldWriter(PersistentAttributesEnhancer.java:281)
      	... 60 more
      Caused by: compile error: no such class: Objects
      	at javassist.compiler.MemberResolver.searchImports(MemberResolver.java:479)
      	at javassist.compiler.MemberResolver.lookupClass(MemberResolver.java:422)
      	at javassist.compiler.MemberResolver.lookupClassByJvmName(MemberResolver.java:329)
      	at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:711)
      	at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:170)
      	at javassist.compiler.ast.CallExpr.accept(CallExpr.java:49)
      	at javassist.compiler.TypeChecker.booleanExpr(TypeChecker.java:547)
      	at javassist.compiler.TypeChecker.atExpr(TypeChecker.java:619)
      	at javassist.compiler.ast.Expr.accept(Expr.java:71)
      	at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:266)
      	at javassist.compiler.CodeGen.compileBooleanExpr(CodeGen.java:260)
      	at javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:414)
      	at javassist.compiler.CodeGen.atStmnt(CodeGen.java:385)
      	at javassist.compiler.ast.Stmnt.accept(Stmnt.java:53)
      	at javassist.compiler.Javac.compileStmnt(Javac.java:578)
      	at javassist.CtBehavior.insertBefore(CtBehavior.java:786)
      	... 62 more
      

      A FQCN should have been used: Objects is not in java.lang.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                gsmet Guillaume Smet
                Reporter:
                gsmet Guillaume Smet
                Participants:
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: