Hi,
     I am getting below Exception while i am trying to call insertBefore() for 
a static method. Please help me out.
       
   Thanks in advance.     
   
     [java] javassist.CannotCompileException: [source error] not-available: this

     [java]     at javassist.CtBehavior.insertBefore(CtBehavior.java:523)

     [java]     at 
com.pg.junit.GenerateClasses.generateUpdatedClass(GenerateClasses.java:150)

     [java]     at 
com.pg.junit.GenerateClasses.generateNewClasses(GenerateClasses.java:108)

     [java]     at com.pg.junit.GenerateClasses.runMain(GenerateClasses.java:75)

     [java]     at com.pg.junit.GenerateClasses.main(GenerateClasses.java:37)

     [java] Caused by: compile error: not-available: this

     [java]     at javassist.compiler.CodeGen.atKeyword(CodeGen.java:1845)

     [java]     at javassist.compiler.ast.Keyword.accept(Keyword.java:34)

     [java]     at javassist.compiler.CodeGen.atAssignCore(CodeGen.java:846)

     [java]     at javassist.compiler.CodeGen.atVariableAssign(CodeGen.java:779)

     [java]     at javassist.compiler.CodeGen.atDeclarator(CodeGen.java:713)

     [java]     at javassist.compiler.ast.Declarator.accept(Declarator.java:99)

     [java]     at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344)

     [java]     at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)

     [java]     at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344)

     [java]     at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)

     [java]     at 
javassist.compiler.MemberCodeGen.atTryStmnt(MemberCodeGen.java:140)

     [java]     at javassist.compiler.CodeGen.atStmnt(CodeGen.java:360)

     [java]     at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)

     [java]     at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344)

     [java]     at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)

     [java]     at javassist.compiler.Javac.compileStmnt(Javac.java:558)

     [java]     at javassist.CtBehavior.insertBefore(CtBehavior.java:505)

     [java]     ... 4 more

     [java] Exception in thread "main" java.lang.NullPointerException

     [java]     at 
com.pg.junit.GenerateClasses.generateNewClasses(GenerateClasses.java:110)

     [java]     at com.pg.junit.GenerateClasses.runMain(GenerateClasses.java:75)

     [java]     at com.pg.junit.GenerateClasses.main(GenerateClasses.java:37)

     [java] Java Result: 1


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111100#4111100

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111100
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to