Menu

problems with retroweaver 2.0Beta2

Help
Nell
2007-01-11
2013-04-23
  • Nell

    Nell - 2007-01-11

    I've been trying to use retroweaver 2.0Beta2 to compile code with
    java version "1.5.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20060511 (SR2))

    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-2006050
    4 (JIT enabled)

    and run it on

    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
    Classic VM (build 1.4.2, J2RE 1.4.2 IBM Windows 32 build cn142sr1w-20041028 (JIT
    enabled: jitc))

    I wove the code with no problems, but continue to get errors when trying to run it.  My first error was with this line:

      env.put(HttpHeaders.CONTENT_LENGTH, req.getContentLength());

    where req.getContentLength() returned an int, which I saw in decompiled code that the compiler turned into Integer.valueOf(req.getContentLength());

    and I got this error:

    Exception thrown : java.lang.NoSuchMethodError: java.lang.Integer: method valueOf(I)Ljava/lang/Integer; not found

    I worked around that by using the new Integer() constructor explicitly, although I had thought this was something that retroweaver would handle for me, but then I encountered the error:

    This error indicates that the class: java.lang.Enum

    could not be located while defining the class x (where x had been woven).  I thought that retroweaver was supposed to replace all references to Enum?

    Any help would be greatly appreciated.

    Thanks,
    Nell

     
    • Xavier Le Vourch

      Hi,

      Sorry about the delay in answering.

      This looks like you don't include the retroweaver runtime when running the weaved code as all the problems above should not occur if the runtime is included.

      Please let me know if that was the problem.

      Xavier

       

Log in to post a comment.