Replies: 1 comment 3 replies
-
Can you set this property? https://github.com/raphw/byte-buddy/blob/master/byte-buddy-agent/src/main/java/net/bytebuddy/agent/Attacher.java#L33 If something fails in the external process, the stack would be written to the specified file. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody,
long story. Im trying to extend precision of some ORM entitites from
java.lang.Integer
tojava.lang.Long
. But stere are still hidden "backdoors" likeLong.intValue()
which could cause precision loose. So I said to my self be smart use bytebuddy to instrument code. So far so good this peace of code work charmly and check whether callingLong.intValue()
dont cause loosing precision.Its kind of magic, but somehow it works, but only when run as standalone Java app. Problem come when I tried to bundle it into ear. application in WildFly application server. Seems that problem is in "class loading" which fails in calling
net.bytebuddy.agent.ByteBuddyAgent#doGetInstrumentation
more precisely inClass<?> installer = Class.forName(Installer.class.getName(), true, ClassLoader.getSystemClassLoader());
which silently fails withjava.lang.ClassNotFoundException
, problem is probably in that I cannot find way how to add bytebuddy-agent into system class loader. Ok not good, but is still should work because bytebuddy seems to use some fallback mechanism which I call "external attachment". But this approach hangs forever, here is stack tracePls Any idea whats wrong?? Im digging but not finding any solution.
Beta Was this translation helpful? Give feedback.
All reactions