facebook

Bug somewhere :-} (Ant/XFire/Stax)

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #262667 Reply

    Kuehne
    Member

    Hi 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

    #262742 Reply

    Riyad Kalla
    Member

    Moving 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.

    #262897 Reply

    Riyad Kalla
    Member

    Copied 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/XMLInputFactory

    This 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 found

    Which 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 found

    Now, 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/XMLInputFactory

    Finally 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 behavior

    Regards,
    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.

    #305055 Reply

    Jessica19qc
    Member

    This message has not been recovered.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Bug somewhere :-} (Ant/XFire/Stax)

You must be logged in to post in the forum log in