我正在使用 websphere 7. 来部署我的应用程序。部署时需要解析 *.ddm 文件来读取属性。我们正在使用 DOMParser 来解析文件。以下是代码。同样工作正常的是Tomcat。
InputStream iStream = new BufferedInputStream(new FileInputStream(file));
InputSource iSource = new InputSource(iStream );
DOMParser.parse(iSource);
得到以下异常。
[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