- This topic has 3 replies, 3 voices, and was last updated 14 years, 4 months ago by
Jessica19qc.
-
AuthorPosts
-
KuehneMemberHi everybody,
I think I found a bug, but I cannot tell exactly where :-(.
My Setup: I created a Webservice with MyEclipse/XFire that works fine and I want to use it within an ant task I wrote. When I try to run the ant task the following error message occurs:
“javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found”
This looks like a missing stax jar on the buildpath, but it is definately there. I defined the classpath this way:
<path id=”libsXfire”>
<pathelement location=”${webservicelibdir}/stax-api-1.0.1.jar” />
<pathelement location=”${webservicelibdir}/stax-1.2.0.jar”/>
<pathelement location=”${webservicelibdir}/activation.jar” />
<pathelement location=”${webservicelibdir}/xfire-all-1.2.2.jar” />
<pathelement location=”${webservicelibdir}/jdom-1.0.jar” />
<pathelement location=”${webservicelibdir}/commons-codec-1.3.jar” />
<pathelement location=”${webservicelibdir}/commons-httpclient-3.0.jar” />
<pathelement location=”${webservicelibdir}/commons-logging-1.0.4.jar” />
<pathelement location=”${webservicelibdir}/wsdl4j-1.5.2.jar” />
</path>If I put stax-1.2.0.jar and stax-api-1.0.1 into $javahome/lib/ext everything works fine. Somehow there seems to be a problem somewhere in reading com.bea.xml.stream.MXParserFactory from stax-1.2.0.jar in that constellation. As I cannot tell where exactly I cannot submit a bug – or am I doing something wrong?
Thanks for your help,
Josua
Riyad KallaMemberMoving to OT > Soft Dev
If moving the JARs to your lib/ext dir fixes the problem, then the issue is a bad classpath (when you move them to lib/ext you are effectively forcing the JVM to be aware of them, so it means all your code and your ant script logic is right. If you remove them from the lib/ext dir and all the sudden the ant task dies, then it means how you are referring to their or the path you are using is incorrect.
Riyad KallaMemberCopied response from user’s other post to this to keep it in the same thread
—————————————————————–Thanks for your reply,
this is not the case – the path is definately correct. All other required libs are on the same path and they work. When I remove stax-api-1.0.1.jar and stax-1.2.0.jar from the path in ant the error message is:
java.lang.NoClassDefFoundError: javax/xml/stream/XMLInputFactoryThis correct because it is in stax-api-1.0.1.jar. If I put stax-api-1.0.1.jar back on the path in ant the error message is:
javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not foundWhich is also correct, because it is in stax-1.2.0.jar. If I put that one back on the path the message still is:
javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not foundNow, because this is obviously not working I put stax-1.2.0.jar to lib/ext (stax-api-1.0.1 ist still on the path!) and get this errormessage again:
java.lang.NoClassDefFoundError: javax/xml/stream/XMLInputFactoryFinally if I put stax-api-1.0.1.jar to lib/ext as well it is working.
If found this bug at java.sun.com: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6267888 … but as far as I found out I am not using jaxb at all here (and so no old version).
BTW:
– The behavior ist the same, if ant ant is started from the command line (so far only tested from eclipse).
– Ant 1.7.0RC1 is showing the same behaviorRegards,
Josua> If moving the JARs to your lib/ext dir fixes the problem, then the issue is a bad classpath (when you move them to lib/ext > you are effectively forcing the JVM to be aware of them, so it means all your code and your ant script logic is right. If you > remove them from the lib/ext dir and all the sudden the ant task dies, then it means how you are referring to their or the > path you are using is incorrect.
Jessica19qcMemberThis message has not been recovered.
-
AuthorPosts