8 Replies Latest reply: Dec 1, 2011 9:44 AM by Jesper Pedersen RSS

Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory

jörg maurer Newbie

Hi all,

 

Tried Ironjacamar in embedded mode, Version 1.0.0Final on IBM JDK and got:

 

Caused by: javax.xml.stream.FactoryConfigurationError: Provider

com.sun.xml.internal.stream.XMLInputFactoryImpl not found

    at javax.xml.stream.XMLInputFactory.newInstance(Unknown Source)

    at

com.github.fungal.deployment.Unmarshaller.unmarshal(Unmarshaller.java:98)

    ... 8 more

Caused by: java.lang.ClassNotFoundException:

com.sun.xml.internal.stream.XMLInputFactoryImpl

    at java.lang.Class.forName(Class.java:139)

    at javax.xml.stream.FactoryFinder.newInstance(Unknown Source)

    at javax.xml.stream.FactoryFinder.find(Unknown Source)

    at javax.xml.stream.FactoryFinder.find(Unknown Source)

    ... 10 more

 

After some searching and head pounding i found com.github.fungal.impl.KernelImpl, Method startup:

 

SecurityActions.setSystemProperty("javax.xml.stream.XMLInputFactory",         

                      "com.sun.xml.internal.stream.XMLInputFactoryImpl");

 

As i worked around this using the Woodstox Stax Impl, i can see no reason why this is hardcoded and should be dependent on that Stax Impl.

 

If any Ironjacmar Teammember may see it also that way - and if its is not fixed sind 1.0.0Final - pls add that fix to your 1.0.6 Release Roadmap.

 

Thx

 

Btw. is there a planned release date for 1.0.6Final, as we also would like to see if the usage of the Tuxedo JCA Adapter is now possible and fixed?

  • 1. Re: Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory
    Jesper Pedersen Master

    SecurityActions.setSystemProperty("javax.xml.stream.XMLInputFactory",         

                          "com.sun.xml.internal.stream.XMLInputFactoryImpl");

     

    Yeah, that doesn't look right - can't remember why I added that - will look at it.

     

    As i worked around this using the Woodstox Stax Impl,

     

    Can you post your changes to the setup, so others can use it for now ?

     

    Btw. is there a planned release date for 1.0.6Final, as we also would like to see if the usage of the Tuxedo JCA Adapter is now possible and fixed?

     

    1.0.6.Final will probably happen mid-December. The Tuxedo adapter should be usable with 1.0.5.Final / 1.1.0.Alpha3 (standalone/embedded) - let us know otherwise. For AS7 it is being tracked by AS7-2075.

  • 2. Re: Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory
    jörg maurer Newbie

    Hi Jesper,

     

    As requested, changes to the setup are:

     

    1) Add the following as e.g. System Properties(There might be also other ways to specify them, read your stax api implementation javadoc)

    -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory"

    -Djavax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory"

    -Djavax.xml.stream.XMLEventFactory=com.ctc.wstx.stax.WstxEventFactory"

     

    2) Put Woodstox on your classpath or bundle it up. Maven Coordinates i used are:

     

            <!-- STAX IMPLEMENTATION -->

            <dependency>

                <groupId>org.codehaus.woodstox</groupId>

                <artifactId>woodstox-core-asl</artifactId>

                <version>4.1.2</version>

            </dependency>

     

    3) For a workaround, do the following. Pls notice that i use Ironjacamar as embedded and not use the full profile mode -> EmbeddedFactory.create(false). If i would use the full profile mode, Ironjacamar would else try to read in it's standard xmls, which would lead (under above conditions) to said exception.

     

            embeddedJca = EmbeddedFactory.create(false);

     

            //@TODO Bug 6924 - BC in IBM JDK

            String javax_xml_stream_XMLInputFactory_Value = System.getProperty(JAVAX_XML_STREAM_XML_INPUT_FACTORY_SYSKEY);

            embeddedJca.startup();

            //@TODO Bug 6924 - BC in IBM JDK

            if(javax_xml_stream_XMLInputFactory_Value != null){

                System.setProperty(JAVAX_XML_STREAM_XML_INPUT_FACTORY_SYSKEY, javax_xml_stream_XMLInputFactory_Value);

            }

     

            embeddedJca.deploy(FileAccessHelper.getURLFor(batchcontainer_home + Constants.DIR_CONFIG_IRONJACAMAR + "/ironjacamar-naming.xml", true));

            ...

  • 3. Re: Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory
    Jesper Pedersen Master

    I have resolved JBJCA-705 - you can depend on 1.0.6-SNAPSHOT / 1.1.0-SNAPSHOT until the releases are out.

     

    Thanks for the report

  • 4. Re: Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory
    Jesper Pedersen Master

    A patch for AS7-2075 has been merged to master - please, try a nightly snapshot or a local build.

  • 5. Re: Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory
    jörg maurer Newbie

    Hi Jesper,

     

    I tested your bugfix JBJCA-705 with 1.0.6-SNAPSHOT, but it did not work out.

     

    Looking at it with depedency:tree, com.github.fungal:fungal:jar ist still 0.10.0.Beta2 - that's where the bugfix afaik should have been made.

     

    If so, pls correct the depdendencies to the correct SNAPSHOT version of com.github.fungal:fungal:jar.

     

    >>

    org.jboss.ironjacamar:ironjacamar-depchain:pom:1.0.6-SNAPSHOT:compile

    [INFO] |  +- apache-logging:commons-logging:jar:1.1.0.jboss:runtime

    [INFO] |  +- com.github.fungal:fungal:jar:0.10.0.Beta2:runtime

    <<

     

    Thx

  • 6. Re: Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory
    Jesper Pedersen Master

    You need ironjacamar-depchain-1.0.6-20111130.170951-8.pom

  • 7. Re: Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory
    jörg maurer Newbie

    Ups, my bad.

     

    Never use <updatePolicy>never</updatePolicy> for performance reasons paired with forgetfullness