Intellij + HotswapAgent plugin + DCEVM jdk 적용 후 spring boot 기동시 “InvocationTargetException in transform method on plugin” 발생 해결

By | 9월 5, 2020

HOTSWAP AGENT: 15:26:14.064 ERROR (org.hotswap.agent.annotation.handler.PluginClassFileTransformer) - InvocationTargetException in transform method on plugin 'class org.hotswap.agent.plugin.hibernate.HibernatePlugin' class 'org/hibernate/validator/internal/metadata/BeanMetaDataManager'.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.annotation.handler.PluginClassFileTransformer.transform(PluginClassFileTransformer.java:218)
at org.hotswap.agent.annotation.handler.PluginClassFileTransformer.transform(PluginClassFileTransformer.java:112)
at org.hotswap.agent.util.HotswapTransformer.transform(HotswapTransformer.java:246)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.hibernate.validator.internal.engine.ValidatorFactoryImpl.createValidator(ValidatorFactoryImpl.java:308)
at org.hibernate.validator.internal.engine.ValidatorFactoryImpl.getValidator(ValidatorFactoryImpl.java:206)
at org.springframework.boot.autoconfigure.BackgroundPreinitializer$ValidationInitializer.run(BackgroundPreinitializer.java:142)
at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.runSafely(BackgroundPreinitializer.java:104)
at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.run(BackgroundPreinitializer.java:95)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.hotswap.agent.javassist.CannotCompileException: [source error] no such field: beanMetaDataCache
at org.hotswap.agent.javassist.CtNewMethod.make(CtNewMethod.java:84)
at org.hotswap.agent.javassist.CtNewMethod.make(CtNewMethod.java:50)
at org.hotswap.agent.plugin.hibernate.HibernateTransformers.beanMetaDataManagerRegisterVariable(HibernateTransformers.java:124)
... 27 more

 

 

원인은 hotswap agent가 hibernate plugin의 기본 탑재를 가정하여 기동하는데, 설치되어 있지 않았던 것이 문제 였던 것.

hotswap agent 의 설정에서 hibernate plugin을 disabled 목록에 추가하니 이상 없이 동작했다.

 

설정하는 부분은

Ctrl+Alt+S > HotSwapAgent > Disabled plugin 의 입력폼에 'Hibernate' 라는 문자열을 입력 후 적용.

comma separated name list 라고 하는데, 저 Hibernate 라는 이름도 찍어서 맞췄을 뿐, 어디에 이름들이 정의되어 있는지 몰라서 답답하긴 하다.

 

 

 

 

 

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments