ClassNotFoundException during XML Parsing

1
I have a project where I use the custom request handler to parse a webservice request(authenticate first, then take the body from the SOAP envelope). I use the below java code to parse the incoming inputstream. XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(is); At this line i get a weird exception: javax.xml.stream.FactoryConfigurationError: Requested factory com.ctc.wstx.stax.WstxInputFactory cannot be located. Classloader =project [111]
asked
2 answers
1

This issue can occur when you are having mutliple jars in the userlib folder, with the same classes like 'XMLInputFactory' in it. For instance:

  • javax.xml.stream-1.0.1
  • geronimo-stax-api1.0spec-1.0
  • axiom-api-1.2.18

and also having this class as part of the JDK. Make sure this class is only included once and with the correct version. In this context I believe only including the axiom.jar file will suffice.

answered
0

This is more a question for stackoverflow than for this forum. You could take a look at this post in stackoverflow: class loader issue

Regards,

Ronald

answered