Reputation: 445
I'm using tomcat to run a web application. Without any projects added to my Tomcat v6.0 Server at localhost, I start the server and an exception is being thrown. It says there isn't a mapping for class sun.awt.AppContext I'm using jre6 as my runtime. I have my JAVA_HOME environmental variation set to the jre6 folder and I have Eclipse set to the same one. Do you know why I am getting this exception and how to resolve?
Here is my stack trace:
Nov 1, 2011 5:21:36 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\oracle\Ora11g\BIN\;C:\Program Files\Serena\Dimensions 2009 R1\CM\prog;C:\Program Files\Serena\Dimensions 2009 R1\CM\prog\Microsoft.VC80.MFC;C:\Program Files\Serena\Dimensions 2009 R1\CM\prog\Microsoft.VC80.CRT;C:\Program Files\Serena\Dimensions 2009 R1\CM\prog\Microsoft.VC80.ATL;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\OTG;C:\Program Files\Windows Imaging\;C:\Program Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace Facility\;C:\Program Files\HP\QuickTest Professional\bin;c:\PROGRA~1\IBM\SQLLIB\BIN;c:\PROGRA~1\IBM\SQLLIB\FUNCTION;c:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\Eclipse 3.7\apache-maven-3.0.3\bin; C:\Program Files\Java\jre6\bin;C:\Program Files\HP\QuickTest Professional\bin
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class sun.awt.AppContext
at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Thank you for your thoughts!
Upvotes: 1
Views: 4280
Reputation: 1
i also faced the same issue, but my Apache Tomcat loaded through Cargo Container wrapper. So I removed these 2 env. variable to fix the issue
JAVA_TOOL_OPTIONS -agentlib:jvmhook
_classload_hook jvmhook
Upvotes: 0
Reputation: 9110
I'm pretty sure your problem is HP QuickTest.
HP QuickTest sets up JVM options which modify the java bootclasspath - nasty.
I'm not sure exactly how it works, but I'm guessing that it sets an environment variable JAVA_OPTS (which is picked up by Tomcat's startup scripts)
3 options (first is definite, second & third are based on my guess above):
Something like this:
echo "Current JAVA_OPTS (resetting to ''):"
echo %JAVA_OPTS%
set JAVA_OPTS=""
3: Or, try setting JAVA_OPTS variable (to empty string) in your Eclipse server startup dialog
Upvotes: 2