I have followed at the steps mentioned here
-Dcatalina.base="C:\\MCA\\workspaces\\MCA\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0" -Dcatalina.home="C:\\MCA\\tools\\apache-tomcat-7.0.54" -Dwtp.deploy="C:\\MCA\\workspaces\\MCA\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\wtpwebapps" -Djava.endorsed.dirs="C:\\MCA\\tools\\apache-tomcat-7.0.54\\endorsed" -XXaltjvm="dcevm" -javaagent:C:\\MCA\\tools\\dcevm\\hotswap-agent.jar
) Whenever I try to use an exception is thrown.
Below is the stack trace.
HOTSWAP AGENT: 17:15:46.234 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {0.3.0-SNAPSHOT} - unlimited runtime class redefinition.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
Caused by: java.lang.NullPointerException
at org.hotswap.agent.config.PluginConfiguration.<init>(PluginConfiguration.java:44)
at org.hotswap.agent.config.PluginManager.init(PluginManager.java:95)
at org.hotswap.agent.HotswapAgent.premain(HotswapAgent.java:42)
... 6 more
FATAL ERROR in native method: processing of -javaagent failed
Exception in thread "main"
Java - version is
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
Installer file downloaded from here .
Here it is described a very similar bug caused bythe same NPE that you get:
Caused by: java.lang.NullPointerException
at org.hotswap.agent.config.PluginConfiguration.<init>(PluginConfiguration.java:44)
The solution seems to be switching from Oracle JDK to OpenJDK.
So, if you are using Oracle JDK, try to change it. If you are already using OpenJDK, forget my answer.
Hope it helps!
我通过将JDK1.7_80更改为JDK1.7_55解决了这个问题。
当我的热交换代理路径错误时,我遇到了这个问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.