Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Debug service fails on Websphere startup

66 views
Skip to first unread message

Sanjay Melinamani

unread,
May 31, 2006, 5:58:04 PM5/31/06
to
Hi All,
I am trying to do a remote debug for an application deployed on WAS 5.0.2 on
AIX machine. I am trying to connect from my XP laptop with WASD 5.x.
Since I do not have access to the WAS console, I modified "server.xml" on
AIX machine to add the debug service and change the "debugMode" flag as
follows.

******************************************************************************************
//added this
<services xmi:type="debugservice:DebugService" xmi:id="DebugService_1"
enable="false" jvmDebugPort="7777"
jvmDebugArgs="-Djava.compiler=NONE -Xdebug -Xnoagent -Xj9 -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777"
BSFDebugPort="4444" BSFLoggingLevel="0"/>

//modify as per BOLD text

<jvmEntries xmi:id="JavaVirtualMachine_1" verboseModeClass="false"
verboseModeGarbageCollection="false" verboseModeJNI="false"
initialHeapSize="512" maximumHeapSize="768" runHProf="false"
debugMode="true"
debugArgs="-Djava.compiler=NONE -Xdebug -Xnoagent -Xj9 -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777"
disableJIT="false">

******************************************************************************************

But I get a server startup error as below. Please let me know what's the
cause for this and why I am unable to do Remote debugging?? Appreciate your
help.

******************************************************************************************
[5/25/06 14:08:58:153 EDT] 4dab700c AdminTool A ADMU3100I: Reading
configuration for server: suntapp1
[5/25/06 14:09:01:792 EDT] 4dab700c WsServerLaunc E ADMU3002E: Exception
attempting to process server suntapp1
[5/25/06 14:09:01:793 EDT] 4dab700c WsServerLaunc E ADMU3007E: Exception
org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'services' not
found.
(file:/platform/sunt/WebSphere/AppServer/config/cells/Network/nodes/node1/servers/suntapp1/server.xml,
20, 269)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:692)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:356)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:62)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:339)
at
org.eclipse.emf.ecore.xmi.impl.SAXWrapper.startElement(SAXWrapper.java:71)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:446)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:216)
at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:594)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:830)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java(Compiled
Code))
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java(Compiled
Code))
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:525)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1158)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:76)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:135)
at
com.ibm.etools.xmi.helpers.CompatibilityXMIResourceImpl.basicDoLoad(CompatibilityXMIResourceImpl.java:169)
at
com.ibm.etools.xmi.helpers.CompatibilityXMIResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:162)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:881)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:755)
at
com.ibm.ws.runtime.service.ConfigRootImpl.getResource(ConfigRootImpl.java:259)
at
com.ibm.ws.management.launcher.LaunchCommand.<init>(LaunchCommand.java:136)
at
com.ibm.ws.management.tools.WsServerLauncher.initializeRepositoryAndLauncher(WsServerLauncher.java:263)
at
com.ibm.ws.management.tools.WsServerLauncher.runTool(WsServerLauncher.java:158)
at com.ibm.ws.management.tools.AdminTool.executeUtility(AdminTool.java:192)
at
com.ibm.ws.management.tools.WsServerLauncher.main(WsServerLauncher.java:91)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)

[5/25/06 14:09:01:813 EDT] 4dab700c AdminTool E ADMU0111E: Program
exiting with error: org.eclipse.emf.ecore.xmi.FeatureNotFoundException:
Feature 'services' not found.
(file:/platform/sunt/WebSphere/AppServer/config/cells/Network/nodes/node1/servers/suntapp1/server.xml,
20, 269)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:692)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:356)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:62)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:339)
at
org.eclipse.emf.ecore.xmi.impl.SAXWrapper.startElement(SAXWrapper.java:71)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:446)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:216)
at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:594)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:830)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java(Compiled
Code))

******************************************************************************************
Thanks in Advance

Sanjay


David Brauneis

unread,
Jun 1, 2006, 11:41:03 AM6/1/06
to Sanjay Melinamani
Since you do not have access to the Admin Console (but I am assuming that you have access to the machine to start and stop the WebSphere process - i.e., startServer.sh and stopServer.sh), there is another way that you can do this without hand editing the server.xml file (note: hand editing the server.xml can be very error prone).

The way that I would recommend that you do this is:

1.) Execute "./startServer.sh <SERVER_NAME> -script". This will generate you a script (with a name similar to start_<SERVER_NAME>.sh).

2.) Edit the generated script (start
_<SERVER_NAME>.sh) in your favorite text editor. You will want to uncomment the line that starts something like "set DEBUG =" or "DEBUG =" or "export DEBUG =" or "export DEBUG" - I do not have an AIX system available with WAS v5.0.2 installed to check the exact string in the generated script file. You basically want to make sure the set and export of the DEBUG environment variable are not commented out in the generated script file. You may want to adjust the port number depending on what ports are available/in use on your AIX system. The line looks similar to:
    DEBUG=
-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777

3.) Start the WebSphere server using the generated script file (start_<SERVER_NAME>.sh).

4.) Attach your debugger to the port you specified on the DEBUG line in the generated script file.

Happy debugging!

Regards,
David Brauneis
IBM WebSphere Architecture & Development

0 new messages