Troubleshooting
Problem
You receive an error when running agentserver.sh or triggeragent.sh. java.lang.NoClassDefFoundError: com.ibm.ws.bootstrap.RASWsLoggerFactory ()
Symptom
When running the agentserver.sh or triggeragent.sh script you receive the following error:
java.lang.NoClassDefFoundError: com.ibm.ws.bootstrap.RASWsLoggerFactory
Error Message
The complete stack trace when running the agentserver.sh script is:
Exception in thread "main" java.lang.Exception: java.lang.reflect.InvocationTargetException
at com.sterlingcommerce.woodstock.noapp.NoAppLoader.main(NoAppLoader.java:81)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.sterlingcommerce.woodstock.noapp.NoAppLoader.main(NoAppLoader.java:78)
Caused by: java.lang.NoClassDefFoundError: com.ibm.ws.bootstrap.RASWsLoggerFactory
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
at com.ibm.websphere.naming.WsnInitialContextFactory.<clinit>(WsnInitialContextFactory.java:70)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:160)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:57)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:666)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:259)
at javax.naming.InitialContext.init(InitialContext.java:235)
at javax.naming.InitialContext.<init>(InitialContext.java:209)
at com.yantra.interop.services.jms.JMSContext.getInitialDirContext(JMSContext.java:321)
at com.yantra.interop.services.jms.JMSContext.configure(JMSContext.java:107)
at com.yantra.integration.adapter.IntegrationAdapter.initConfig(IntegrationAdapter.java:150)
at com.yantra.integration.adapter.IntegrationAdapter.start(IntegrationAdapter.java:366)
at com.yantra.integration.adapter.IntegrationAdapter.main(IntegrationAdapter.java:477)
And the complete stack trace when running the triggeragent.sh script is:
Exception in thread "main" java.lang.Exception: java.lang.reflect.InvocationTargetException
at com.sterlingcommerce.woodstock.noapp.NoAppLoader.main(NoAppLoader.java:81)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.sterlingcommerce.woodstock.noapp.NoAppLoader.main(NoAppLoader.java:78)
Caused by: java.lang.NoClassDefFoundError: com.ibm.ws.bootstrap.RASWsLoggerFactory
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
at com.ibm.websphere.naming.WsnInitialContextFactory.<clinit>(WsnInitialContextFactory.java:70)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:160)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:57)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:666)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:259)
at javax.naming.InitialContext.init(InitialContext.java:235)
at javax.naming.InitialContext.<init>(InitialContext.java:209)
at com.yantra.interop.util.YIFMessageBrowser.getInitialDirContext(YIFMessageBrowser.java:253)
at com.yantra.interop.util.YIFMessageBrowser.init(YIFMessageBrowser.java:162)
at com.yantra.interop.util.YIFMessageBrowser.<init>(YIFMessageBrowser.java:65)
at com.yantra.ycp.agent.server.YCPAgentTrigger.queueHasMessages(YCPAgentTrigger.java:124)
at com.yantra.ycp.agent.server.YCPAgentTrigger.hasTrigger(YCPAgentTrigger.java:136)
at com.yantra.ycp.agent.server.YCPAgentTrigger.sendMessage(YCPAgentTrigger.java:97)
at com.yantra.ycp.agent.server.YCPAgentTrigger.main(YCPAgentTrigger.java:71)
Environment
MCF 8.0
WebSphere Application Server
WebSphere Application Client
WebSphere JNDI (corbaloc)
Resolving The Problem
Follow these steps:
- Download and install the WebSphere Application Client if you have not already.
- Add WAS_CLIENT_HOME and AGENT_JAVA_DEFINES properties to your sandbox.cfg file and set their values as defined below.
- Update the agentserver.sh.in and triggeragent.sh.in files as explained below.
- Run setupfiles.sh, which will update the agentserver.sh and triggeragent.sh files.
Add the following properties to sandbox.cfg:
WAS_CLIENT_HOME=/opt/IBM/WebSphere/AppClient
AGENT_JAVA_DEFINES=-Djava.ext.dirs=${WAS_EXT_DIRS}:${WAS_CLIENT_HOME}/plugins:${WAS_CLIENT_HOME}/java/jre/lib/ext:${WAS_CLIENT_HOME}/java/jre/lib
Add the following lines to agentserver.sh.in and triggeragent.sh.in (if not already there), so that after you run setupfiles.sh, the agentserver.sh and triggeragent.sh files are updated accordingly.
agentserver.sh.in
#:ifdef WAS_CLIENT_HOME
export WAS_CLIENT_HOME=&WAS_CLIENT_HOME;
. &WAS_CLIENT_HOME;/bin/setupCmdLine.sh
#:endif
USE_AGENT_JAVA=1
export USE_JAVA_AGENT
#:ifdef AGENT_JAVA_DEFINES
AGENT_JAVA_OPTS="-Dvendor=shell -DvendorFile=&PROP_DIR;/servers.properties &AGENT_JAVA_DEFINES;"
#:else
AGENT_JAVA_OPTS="-Dvendor=shell -DvendorFile=&PROP_DIR;/servers.properties"
#:endif
export AGENT_JAVA_OPTS
agentserver.sh (after running setupfiles.sh)
export WAS_CLIENT_HOME=/opt/IBM/WebSphere/AppClient
. /opt/IBM/WebSphere/AppClient/bin/setupCmdLine.sh
USE_AGENT_JAVA=1
export USE_JAVA_AGENT
AGENT_JAVA_OPTS="-Dvendor=shell -DvendorFile=/opt/Sterling/MCF80/Foundation/properties/servers.properties -Djava.ext.dirs=${WAS_EXT_DIRS}:${WAS_CLIENT_HOME}/plugins:${WAS_CLIENT_HOME}/java/jre/lib/ext:${WAS_CLIENT_HOME}/java/jre/lib"
export AGENT_JAVA_OPTS
triggeragent.sh.in
#:ifdef WAS_CLIENT_HOME
export WAS_CLIENT_HOME=&WAS_CLIENT_HOME;
. &WAS_CLIENT_HOME;/bin/setupCmdLine.sh
#:endif
USE_AGENT_JAVA=1
export USE_AGENT_JAVA
if [ $# -ne 1 ]
then
printf "`basename $0` criteriaid\n"
exit 1
else
#:ifdef AGENT_JAVA_DEFINES
AGENT_JAVA_OPTS="-Dvendor=shell -DvendorFile=&PROP_DIR;/servers.properties &AGENT_JAVA_DEFINES;"
#:else
AGENT_JAVA_OPTS="-Dvendor=shell -DvendorFile=&PROP_DIR;/servers.properties"
#:endif
export AGENT_JAVA_OPTS
triggeragent.sh after running setupfiles.sh
export WAS_CLIENT_HOME=/opt/IBM/WebSphere/AppClient
. /opt/IBM/WebSphere/AppClient/bin/setupCmdLine.sh
USE_AGENT_JAVA=1
export USE_AGENT_JAVA
if [ $# -ne 1 ]
then
printf "`basename $0` criteriaid\n"
exit 1
else
AGENT_JAVA_OPTS="-Dvendor=shell -DvendorFile=/opt/Sterling/MCF80/Foundation/properties/servers.properties -Djava.ext.dirs=${WAS_EXT_DIRS}:${WAS_CLIENT_HOME}/plugins:${WAS_CLIENT_HOME}/java/jre/lib/ext:${WAS_CLIENT_HOME}/java/jre/lib"
export AGENT_JAVA_OPTS
Now when your run agentserver.sh and triggeragent.sh, you should no longer get the java.lang.NoClassDefFoundError.
Historical Number
NFX6111
Was this topic helpful?
Document Information
Modified date:
25 June 2018
UID
swg21554409