2 Replies Latest reply on Apr 7, 2004 2:53 AM by bonsaijboss

    javassist.CannotCompileException when using Tapestry

    bonsaijboss Newbie

      Hello,

      I use JavaAssist indirectly in Tapestry.
      In my component I have a required auto parameter with type long and I bind a long property to it. In this case I get the following exception:

      org.apache.tapestry.ApplicationRuntimeException
      A code generation error occured while enhancing class
      example.AddressPanel.

      org.apache.tapestry.enhance.CodeGenerationException

      javassist.CannotCompileException
      [source error] Method setObject not found in
      org.apache.tapestry.IBinding
      reason:javassist.CannotCompileException: [source error] Method setObject not found in org.apache.tapestry.IBinding

      Stack Trace:
      javassist.CtBehavior.setBody(CtBehavior.java:163)
      javassist.CtMethod.setBody(CtMethod.java:311)
      org.apache.tapestry.enhance.javassist.CreateAutoParameterEnhancer.createWriteMethod(CreateAutoParameterEnhancer.java:187)
      ...

      If I change the type of this parameter from long to either java.lang.Long or int it works OK. (The bound property remained type long.)
      I've tried to debug the JavaAssist code without success (I don't know it at
      all).
      And IBinding HAS a setObject() method!

      I have deployed Tapestry very carefully to prevent any classpath errors.

      Thanks for any help,
      Norbi