0

I am using two javaagents (one is based on Byte Buddy and the other is based on Javassist) to enhance one method.

If the Javassist agent load first, both agents will work.

If the Byte Buddy agent loads first, the Byte Buddy agent can not work (the Javassist agent is still okay).

How can I solve this problem?

Grant Miller
  • 27,532
  • 16
  • 147
  • 165
  • 1
    Could you add some information on what agents are used and if they instrument the same classes? The Javassist agent most likely loads the class file as a resource and does not consider the class that was already modified by Byte Buddy. Doing so, all changes of the Byte Buddy agents are discarded by the Javassist agent. – Rafael Winterhalter Sep 10 '18 at 07:53
  • Yes, same class and same method, i just insert one before log and one after log. – 水煮肉片 Sep 15 '18 at 08:04
  • order 1: Javassist -- ByteBuddy all works. order 2: ByteBuddy -- Javassist Javassist works, ByteBuddy is not. order 3: Javassist1 -- ByteBuddy -- Javassist2 Both of Javassist work, ByteBuddy is not. – 水煮肉片 Sep 15 '18 at 08:06

0 Answers0