Closed whispin closed 2 years ago
When you use old-style enhancement code, EnhanceDefinitions enhanced same Class should be aggregated into one Transformer. That means each enhanced method will be enhanced for once. I don't understand how BootStrapInstTemplate was created twice. Maybe you can provide more information to me, such as stacks, logs or enhanced classes and methods.
However, for the new-style enhancement code, when multiple PluginDescriptions enhance the same method of the class loaded by BootsSrapClassLoader, the problem described by you will indeed occur. I have written the relevant code fixes, and @xuezechao1 will submit them in a short time.
Thanks for your answer, I learned a lot from the sermant.
question description: I tried to develop a plugin, but I found some problems when debugging, java.lang.LinkageError: loader (instance of sun/misc/Launcher$AppClassLoader): attempted duplicate class definition for name: "com.huawei.sermant.core.agent.template.BootstrapInstTemplate__246a5df2"