Rafael Winterhalter
Rafael Winterhalter
You need to seperate the class out of your agent. You likely load it on the agent before you inject it to the boot loader. You need to assure the...
Oh no, of course. I just triggered a new release with a fix.
You should use a `TypePool` to describe types without loading. Avoid referencing `HikariDataSource` and rather match the type using "named". Then use `TargetType.class` instead of `HikariDataSource.class`. This way you can...
You need to use `Advice` as a visitor: builder.visit(Advice.to(SocketInterceptorAdvice.class).on(isConstructor()) Also, you need to activate retransformation: agentBuilder.disableClassFormatChanges().with(RetransformationStrategy.RETRANSFORM) You do not need bootstrap injection.
It seems like you are using Byte Buddy's internal attaching mechanism that emulates the Attach API. Are you using some form of custom distribution of the JDK? Some of them...
What is the exception?
Are you using the module system? It's hard to tell from your code why this is. Are the two classes on different class loaders?
I assume that your intercepted class is not visible to your intercepted code. The exception suggests that you are loading code on different class loaders. You should avoid auxiliary classes...
it's a proxy to invoke the super method of the intercepted code. It needs to be injected into the right class loader. Did you configure a proper injection strategy?
Not sure why you encounter this. Might it be that injected classes end up on two class loaders?