• what happened to $r?

    Shouldn't that work? class Foo { Object foo() { return new Object(); } } public class Main { public static void main(String[] args) throws NotFoundException, CannotCompileException { ClassPool cp = ClassPool.g...
    Profile Photo
    last modified by herkules000
  • cannot access added Field in some cases. Please help.

    Hello,   Some background regarding my issue: I have obtained the byteArray of the class using a ClassFileTransformer added to an Instrumentation object. I am then using the ClassPool.makeClassIfNew() function ...
    Profile Photo
    last modified by megalodon
  • How can I unit test without getting Frozen?

    Hi All, I am using javassist to inject before & after advice in my project. As I am trying to unit test I keep getting the error: java.lang.RuntimeException: org.dummy.greenthumb.TreePlanter class is frozen F...
    Profile Photo
    last modified by andrewboyd
  • Strategy for classpool = null clearing

    In the tutorial one of the noted problems is the memory usage climb with creating a lot of CtClass's etc that are all stored in the ClassPool. I am having trouble combining that advice with a javaagent implementation....
    Profile Photo
    last modified by paulkeeble
  • $r: no such class

         Hi,        I used $r during method instrumentation (as return ($r)result; ). I get a compile time exception     " javassist.CannotCompileException: ...
    Profile Photo
    last modified by barbaz
  • lacking adequate features - addcatch, insertAfter(...,true);

    Hello All,   As far as my understanding goes, the 'catch'  and 'finally' clauses are there to clean up and close internally allocated resources. To do that, one needs, among other things, unrestricted acces...
    Profile Photo
    created by megalodon
  • Runtime Exception when I try to getInterfaces() of a CtClass

    Hello All,   I was trying to getInterfaces() of a CtClass object during load time but I keep getting exceptions of this format   java.lang.RuntimeException: cannot find oracle/jdbc/driver/TypeCopyingBinder...
    Profile Photo
    last modified by megalodon
  • VerifyError with addLocalVariable() and insertAfter()

    Hi all! This is my first post here and I am a javassist newbie. So hopefully my problem can easily be solved. From a real usecase, I condensed the following fragment demonstrating my problem: ClassPool cp = ClassP...
    Profile Photo
    last modified by herkules000
  • method instrumentation approaches - which is best?

    Hello All,   I am sort of new to Javassist and have a design question which has probably been already discussed. I couldn't search and look for the discussion though due to no search facility as far as I could s...
    Profile Photo
    last modified by megalodon
  • Need help adding an Annotated field.

    Hi,   I am trying to utilize Javassist to add an annotated field to my class. The snippet of what I am trying to accomplish is listed below.     //I am trying to add the line below as a new field. @C...
    Profile Photo
    last modified by b_mjoshi78
  • javassist.CannotCompileException when using interfaces

    Hello, I could not find a solution for my problem, hopefully someone can help me.   In my project, I am using logging like this:   public interface Logger {     public void info(String s);&...
    Profile Photo
    last modified by derari
  • can not see new method after transformation!

    hi guys, i am adding new field and its getter and setter methods to an existing class. I can see those new changes in the bytecode, but unable to access those getter and setter. I know that the jvm which loaded the cl...
    Profile Photo
    created by uaskme
  • Using Resteasy with javassist?

    I'm trying to use resteasy to serve out some entities fetched by spring-hibernate. I've configured one method which returns a POJO and works as expected: @GET @Path("/test") @Produces(MediaType.APPLICATION_XML) ...
    Profile Photo
    created by immure
  • Bytecode error loading class

    Hi, I am loading classes via javassist and everything works fine when i run processes on one node. However, I am now running my javassist code using a distributed process. I have this code: _______________________...
    Profile Photo
    created by maltaweel
  • Stack trace

    I'm using javassist 3.3 with jms 1.4.5GA and jboos4.2.3ga. I'm running a simple example program to use queues in JMS and I get the following stack trace: It that it's missing a constructor. Exception in thread "main...
    Profile Photo
    created by sacauskis
  • Inconsistent or missing stackmap error in midlet class files

    Hi I am using Javassist to modify a MIDlet class. I was successfully able to change the midlet class file. The changes i did are as follows 1. copied the startApp() method body to a new method and set new body for st...
    Profile Photo
    last modified by shivurx
  • ClassLoader and java.lang.ClassNotFoundException

    Hi I'm using Javassist as a library for our library (InterCommunication on Ginga) that with PhoneME + Personal Basis Profile will be the platform for embedded devices (digital tv). The question is that we're using Jav...
    Profile Photo
    created by marcosroriz
  • Javassist can't seem to instrument static method

    I stumbled upon a Javassist problem, when it fails to add code with insertBefore(). If someone can help, I would really appreciate this. package test; public class TheAddress extends TheModel { static{ foo("The...
    Profile Photo
    created by ipolevoy
  • how to do bytecode manipulation of j2me without having to pr

    Hi All, I am using Javassist to modify a MIDlet class. I was successfully able to change the midlet class file and view the changes in Bytecode Viewer. But when i try to run the application with WTK emulator it giv...
    Profile Photo
    created by shivkumar.ms
  • Field access like in GluonJ

    I try to implement a field access as the @Get and @Set Listener-Annotations in GluonJ, directly with Javassist. I looked into the source code how GluonJ performs this, but I can't get it running - and don't get the ex...
    Profile Photo
    created by corifeo