JBoss Community

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

created by jörg maurer in IronJacamar - View the full discussion

Hi Jasper,

 

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));

        ...

Reply to this message by going to Community

Start a new discussion in IronJacamar at Community