Question

I am using websphere 7. to deploy my application. While deployment it needs to parse *.ddm file to read properties. We are using DOMParser to parse the file. following is the code. same this is working fine is Tomcat.

InputStream iStream = new BufferedInputStream(new FileInputStream(file));
InputSource iSource = new InputSource(iStream );
DOMParser.parse(iSource);

getting following exception.

[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R Caused by: java.lang.LinkageError:     loading constraint violation: loader "com/ibm/ws/classloader /CompoundClassLoader@2de92de9" previously initiated loading for a different type with name  "org/apache/xml/resolver/helpers/Debug" defined by loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader@602c602c"
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at java.lang.ClassLoader.defineClassImpl(Native Method)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at java.lang.ClassLoader.defineClass(ClassLoader.java:274)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:768)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:687)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:510)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xml.resolver.tools.CatalogResolver.getResolvedEntity(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xml.resolver.tools.CatalogResolver.resolveEntity(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
[7/19/12 12:42:00:218 IST] 00000022 SystemErr     R     at 
Was it helpful?

Solution

Issue is being resolved by creating shared reference library in WAS.

Create a shared library for Content Management

  1. Start the WebSphere integrated solutions console.

    For more information about the console, see the WebSphere documentation.

  2. Expand Applications->Application Types, and click WebSphere enterprise applications.

  3. On the Enterprise Applications window, select the Content Management application name.

  4. On the Configuration page, click Shared library references.

  5. On the Shared library references pane, select the Content Management application, and click Reference shared libraries.

6 Click New.

  1. On the Configuration page, change the name in the Name box to jars

  2. On the Classpath box, add these three lines, changing the paths to the location where you extracted the WAR file.

Note: Each of these files must be entered on separate lines.

D:\Temp\org.eclipse.osgi_3.3.2.R33x_v20080105.jar D:\Temp\org.apache.xml.resolver_1.1.jar D:\Temp\resource

  1. Select the Class Loading check box.

  2. Click Apply.

  3. Click the Save link to update the master configuration.

  4. In the Shared library references page, select the deployed application, and click Reference shared libraries.

  5. In the Shared Library Mapping page, the shared library you created appears in the Available list. Use the arrow button to move it to Selected list, and click OK.

  6. In the Shared library references page, select the DocCenterServer module, and click Reference shared libraries.

  7. In the Shared Library Mapping page, the shared library you created appears in the Available list. Use the arrow button to move it to the Selected list, and click OK.

  8. Click the Save link to update the master configuration.

  9. Restart the deployed application to apply the change:

  10. In the Enterprise Application window, select the WAR file and click Start.

  11. When the application is started, a green arrow appears in the Application Status column.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top