Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
Hi experts,
We are using java ActiveXBridge to have a VB application to call Java program, which in term do a webservice call to IBM process server.
I have include xercesImpl.jar, xml-apis.jar, ibm-jaxrpc-client.jar in the directory of C:\Program Files\Java\j2re1.4.2_13\lib\ext
I got the following error on all three tries.
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
1) DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
2) System.setProperty("javax.xml.parsers.DocumentBuilderFactory","org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
3) System.setProperty("javax.xml.parsers.DocumentBuilderFactory","org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl dbf = new org.apache.xerces.jaxp.DocumentBuilderFactoryImpl();
DocumentBuilderFactory factory = org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newInstance();
However, if I remove xercesImpl.jar , it will run successfully pass the above lines (probably use rt.jar included in the JRE), but it fails on the actual ibm webservice call with following error. It is looking for xerceslmpl.jar.
Mar 4, 2008 3:49:11 PM com.ibm.ws.webservices.xml.WSErrorHandler
FATAL: fatalerror.sax.handler
Mar 4, 2008 3:49:11 PM com.ibm.ws.webservices.xml.BaseType
SEVERE: internal.error
Mar 4, 2008 3:49:11 PM com.ibm.ws.webservices.configuration.WebServicesEngineConfigurationGenerator
WARNING: warning.parse.file.failure
java.lang.NoClassDefFoundError: org/apache/xerces/dom/ElementNSImpl
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
...
at com.ibm.ws.webservices.multiprotocol.AgnosticService.doGetPort(AgnosticService.java:460)
at com.ibm.ws.webservices.multiprotocol.AgnosticService.getStub(AgnosticService.java:403)
Any suggestion ? Thanks in advance
Strangely, if I run my program as a java application from DOS window. Everything is fine.