cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with xml parser

Former Member
0 Kudos

Hello!

I would like tp parse a xml-file.

I use the DocumentBuilderFactory from IBM XML-API,

but I get the error:

java.lang.NoClassDefFoundError: javax/xml/parsers/DocumentBuilderFactory

All xml librarys are included!

What's the reason for this?

May there be a conflict between xml portal classes and IBM API classes?

Thanks for your help!

Thomas

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

it seems as you have not requested the corresponding portal service in your default profile properties. Do you work with Eclipse? Which EP version do you work with?

Greets

Matthias

Former Member
0 Kudos

Hi all,

we use ibm-xmlapi and java 1.3.1. In our eclipse-project we have access to xml-libs and deploy them with our elclipse-project to tomcat. At runtime tomcat can't find the needed libs. But we placed the libs in several tomcat libary-locations e.g. Tomcat3.3\webapps\irj\WEB-INF\lib\ext, Tomcat3.3\webapps\irj\WEB-INF\lib, Tomcat3.3\lib. After deploying we get exception:

java.lang.NoClassDefFoundError: javax/xml/parsers/DocumentBuilderFactory

anybody can help?

Thomas

Former Member
0 Kudos

Hi,

if you cant forego the ibm-xml-api (you should better use the EP provided inqmyxml.jar parsers) put the jar into the portals private/lib directory, import it correctly in your source and use full qualified paths for the parser(factory) instantiation.

Thats how far I might help you. Good luck.

Matthias

Former Member
0 Kudos

Hello Matthias!

But who is a documentation about inqmyxml-api?

Thanks Thomas

Former Member
0 Kudos

Hi Thomas,

the functions of inqmy that I needed were implemented similar to the "reference parsers" (xerces etc.). So I used the javadoc for J2SE1.4. If this isnt sufficent for you give the steps in my last post a try. I used to do it this way before I found out about inqmyxml.

Matthias

Former Member
0 Kudos

OK, it works!

Thanks!

Thomas

Former Member
0 Kudos

Hi

We use the SAX builder and have no problems with this. I add the files jdom.jar and sax.jar in PORTAL-INF/lib.

Unfortunately I have never used the DocumentBuilderFactory.

Good Luck// -Fred