on 06-22-2006 1:09 PM
Hi All,
I'm trying to implement a Java Mapping that uses Xerces. I'm using xercesImpl.jar.
I put the xercesImpl.jar file in the folder containing the .class file (the Java Mapping program), and zipped the folder.I imported the zip file as an archive and used it in the Interface Mapping.
My code uses the org.apache.xerces.parsers.<b>SAXParser</b> class.
However, while trying to execute the Interface Mapping, it gives error: <b>Unable to find resource:'org/apache/xerces/parsers/SAXParser.class'</b>.
The same method works when I'm using xerces.jar and using classes javax.xml.parsers.<b>DocumentBuilder</b> and
javax.xml.parsers.DocumentBuilderFactory.
I can't figure out what the problem is.
Any ideas?
Regards,
Puloma.
The use of external parser libs may cause problems, when they include classes which are part of the library sapxmltoolkit.jar
The classes:
javax.xml.parsers.DocumentBuilder and
javax.xml.parsers.DocumentBuilderFactory
are part of sapmxltoolkit.jar, so these lib will provide the code instead of the xerxes.jar.
I recommend using the SAX parser of the sapxmltoolkit.jar instead of xerxes, that will avoid this problem.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
Try by creating a package of structure org.apache.xerces.parsers.SAXParser and place your java also, export as a jar file in NWDS, and import the same in your IR and test.
Hope this helps,
regards,
satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I tried all the methods suggested. Mow my problem is that I get the following error, when I try to instantiate the SAXParser class:
Unable to find resource:
<b>META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration</b>
The XMLParserConfiguration class is actually in org.apache.xerces.xni.parser. Why does XI try to find it in the wrong sub-directory?
My code works just fine on standalone.
Regards,
Rahul.
Hi Rahul,
Instead of bundling the xercesImpl.jar along with your actual Java mapping Jar, just import the xercesImpl.jar under the imported archives separately and test your scenario,.
Think it should work.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
Instead of bundling the xercesImpl.jar along with your actual Java mapping Jar, just import the xercesImpl.jar under the imported archives separately and test your scenario,.
Think it should work.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.