sun.reflect.UnsafeStaticObjectFieldAccessorImplI am trying to understand the scenarios which could lead to javassist throwing the following error: 2009-07-27 15:49:32,094 INFO [STDOUT] 15:49:32,091 ERROR [BasicLazyInitializer] Javassist Enhancement failed: com.edg...
Thread Changing return type of a method impacts calling methods
Changing return type of a method impacts calling methodsI am trying to copy and replace a method with a different return type but it seems like the only way I can successfully do it is to have the source code. If I replace the method then instrument the calling method to c...
Using an existing class for CtClassIn my code I've a class produced by the Groovy classloader scripting engine, then this class is not in the classpath. I need to create a CtClass from that class but I failed. I tried using ClassPool with a ClassClas...
Thread Javassist adding annotation to method argument
Javassist adding annotation to method argumentRead this answer (How to add parameter annotation to new Method ?) on the jboss community regarding adding an annotation to a parameter in a method. Stuck at getting the parameter or in Javassist terms the attribute. ...
Thread Problem with cast - javassist_236 cannot be cast to
Problem with cast - javassist_236 cannot be cast toHi everybody! This is my first time here, and I apologize if my question has already been solved before, or is a stupid question. But I'm learning to develop. I searched for a solution to my problem and have n...
Thread javassist compiling/casting Integers as strings
javassist compiling/casting Integers as stringsHi, I"m a new javassist user and noticed that the following code is resulting in a value of 1599 instead of 114. Makes me think that the integers are getting cast as Strings. How can I overcome this issue...
Thread IllegalAccessError when using an instrumented class
IllegalAccessError when using an instrumented classHi all, I am trying to instrument https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java I am using the following code: ClassPool cp = ClassPool.getDefault(); CtClass ctCla...
Thread Javassist 3.18.0-GA in Maven repository not present
Javassist 3.18.0-GA in Maven repository not presentHello I know that it may sound stupid, however it seems that Javassist 3.18.0-GA is not preset in the central Maven repository and I cannot find it in private JBoss repository too. May I know when will it app...
Thread User Disconnected Several Times per day problem
User Disconnected Several Times per day problemI have a user that gets disconnected from the server several times per day. It does not appear that her internet connection is dropping, only the connection to jboss. Could someone please review this e...
Thread Javassist dealing across different project packages
Javassist dealing across different project packagesConcept question: Is there a way to write a javassist program in a package other than the src folder that can modifiy other classes (either in the src folder or sub folders of the src folder). I have messed arou...
Find existing classes?Is there a way to use javassist to find a list of existing java classes in the system search path? I know you can use ".getDefault()" to return the system's default search path, is there a way list the classes on this...
Grabbing an existing class's constructors?I am a graduate student studying software engineering and technical debt. For my research I am using Javassist to create coupling between classes. However there is obviously a problem when I try to create an instance ...
Thread Delete code has been injected with javassist
Delete code has been injected with javassisthello is it possible withe javassist to inject anything before calling a specific method and delete this adding also like this m.insertBefore("method1()"); how i can delete it in other times?
Thread "duplicate class definition" error on CtClass.toClass() call
"duplicate class definition" error on CtClass.toClass() callI'm trying to reflect annotation changes to classes. When i call the CtClass.toClass() method i'm always getting the following error: javassist.CannotCompileException: by java.lang.LinkageError: loader (inst...
Thread VerifyError with complex Javassist instrumentation
VerifyError with complex Javassist instrumentationHi, I'm working on a new OSS project to allow Java developers to declaratively handle the Java AccessController APIs. One of our features is the concept of "method blueprinting" whereby the code requiring privil...