An org.xml.sax.SAXParseException error occurs in the Application Assembly Tool of the WebSphere Application Server during application code generation
 Technote (FAQ)
 
Problem
The following error occurs during code generation in the Application Assembly Tool (AAT) or during installation of the application into WebSphere Application Server, Advanced Edition (such as through the administrative console):

Exception: com.ibm.etools.archive.exception.ArchiveRuntimeException: An Exception occurred while parsing xml:Line #: 21:Column #: 23

Stack trace of nested exception: org.xml.sax.SAXParseException: The content of element type "method" is incomplete, it must match.
 
Solution
Root Cause:
In this case, the root cause of the error was an incorrect enterprise bean name in the assembly descriptor within the deployment descriptor of an enterprise bean Java archive (JAR) file. The following example illustrates this problem:

Example:
<enterprise-beans>
<session id="Session_1">
<description>Service bean that handles ...</description>
<display-name>UOM Conversion Services</display-name>
<ejb-name>UOMConversionServices</ejb-name>
<home>com.lol.mes.services.uomconversionservices.UOMConversionServicesHome</home>
<remote>com.lol.mes.services.uomconversionservices.UOMConversionServices</remote>
<ejb-class>com.lol.mes.services.uomconversionservices.UOMConversionServicesBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor id="AssemblyDescriptor_1">
<container-transaction id="MethodTransaction_1">
<method id="MethodElement_1">
<!-- ****** incorrect enterprise bean name used here ******** -->
<ejb-name>WorkOrderServices</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>

Simple syntax errors in application metadata can cause problems similar to those illustrated previously and are not easily solved because of the errors that result. The previously illustrated error and ones similar to it can be avoided with an application assembly tool like the one provided with WebSphere Application Server.

Advanced Edition product note:
This same application installs successfully into WebSphere Application Server Advanced Edition, despite the occurring error. The exception does display a parsing error that normally points to an XML issue pertaining to the multiple deployment descriptors of the application. The error message is not descriptive, but correctly indicates the file name.

 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Deploy (for example: AAT or ANT or EAR/WAR/JAR)
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1076540
IBM Group: Software Group
Modified date: Jan 6, 2004