ClassFile write(java.io.DataOutputStream out) generates empty file!!Hello all, I'm working in a compiler that is generating bytecode, and I wish to only use those javassist classes that work with low-level bytecode (Bytecode, ClassFile, MethodInfo, FieldInfo, etc.). I'm not interested...
Wrapping existing object inside a proxyInstead of creating a proxy instance of a given class, is it possible to create a proxy instance for a given object instance? When inspecting the proxy using reflection, the same fields should be present.
does javassist have a Proxy like class?I am wondering if javassist has a class just like jdk Proxy BUT for classes where if you call method.invoke it would really translate to super.<method>() such that it would be really easy to create wrappers ar...
getDeclaringClass throws errorHi Why does the following testcase fail with IncompatibleClassChangeError ? package foo;
import javassist.*;
import org.junit.*;
public class GetDeclaringClassTest {
static class ...
Thread VerifyError, Bad type in putfield/putstatic
VerifyError, Bad type in putfield/putstaticHi guys, I am running into some problems while trying to use javassist facilities to implement a java fault injection tool. As an application (lets call it "worklaod") invokes a method from a third-party libr...
Problem with equals/hashCode?When MethodHandler.invoke() is called by Javassist for invocations of equals() and hashCode(), the "proceed" method object is not named "equals" or "hashCode", but is instead something like _d2hashCode. This is ...
Thread Verify Error: Inconsistent args_size for opc_invokeinterface
Verify Error: Inconsistent args_size for opc_invokeinterfaceI have been trying to generate some dynamic codes (Using Javassist) but program fails at a certain point when involving a double array or float array. The code is as follows Class c = Customers.class; // called in ma...
Drools - Java Rules EngineHow to continue session, but remove all objects? Hello! I really need help and advice. I'm using StatefulKnowledgeSession(); in loop I want to check some objects (List<Object>ls); I have more than one rule...
Thread VerifyError when invoking a modified method
VerifyError when invoking a modified methodHello everyone, I'm working on a demo for dependency injection automation. My work is divided between creating new classes and modifying an existing class. The new generated classes are running fine when tryi...
Javassist 3.12.1.GA maven repository checksum errorI’m not sure this is the right place to ask this, but it’s the closest I could find. Please let me know if there’s a more appropriate place to ask for help with this. I'm trying to migrate ou...
JASSIST-97 introduces regression?A user has reported that the fix for JASSIST-97 introduces a regression: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5731 https://jira.jboss.org/browse/JBAS-8640
Thread Javassist in Android : 'get' in ClassPool not working ?
Javassist in Android : 'get' in ClassPool not working ?Hello, I'm new with Javassist. I try to integrate it in Android (2.2) for my master thesis. The problem is that the find() and the get() methods from the ClassPool always return either null (for find) ...
Thread Acessing instance initializer via Javassist
Acessing instance initializer via JavassistCan i access instance initializer of class using Javassist to modificate it, copy to method or delete? class MyClass {
static {
...
AOP over Tomcat base classesHi all. I'm using JavaAssist in one Agent I'm creating to change the behavior of tomcat, but I do not want to customize this on tomcat itself. I want to add some security issues, and f...
Thread Discover name method called by a method by bytecode
Discover name method called by a method by bytecodeI read the bytecode looking for the opcode of invokelater and the number of the method on the constant pool. But I cannot get the name of the method when I know the index on the constant pool. What I should do?
Support for nested classesHi I'm using version 3.13.0-GA from maven repo. When I try to create a nested class I get: java.lang.RuntimeException: sorry, only nested static class is supported at javassist.CtCla...
Javassist and Drools problemHello I'm trying to run Drools on JBoss server, but I got this error message: 2010-03-16 14:09:11,177 ERROR [STDERR] [error] javassist.NotFoundException: org.drools.spi.Consequence.. Do verbose mode if you wa...
problem analyzing a stack frameHi, I'm trying to abalyze a simple method stack frame in order to get some informations about the status of local variables. I'm able to extract the name of the variables thru the code attribute and the constant pool...