Search code examples
javaeclipsetomcathotswapdcevm

Tomcat server does not start with DCEVM patched JRE


I have followed at the steps mentioned here

  1. Install “jvm.dll” DCEVM patch in JDK (Successful. DCEVM patch folder is created )
  2. In Eclipse - Tomcat Server - Runtime Environment - JRE must be mapped to the same JRE of JDK in which DECVM is patched in step-1
  3. Tomcat - Add “-XXaltjvm="dcevm" -javaagent:\HotswapAgent.jar” in VM Arguments (VM Arguments -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)
  4. Disable “Auto Reload” in Tomcat web modules

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.


Solution

  • I solved this issue by changing JDK1.7_80 to JDK1.7_55.