Results 1 to 5 of 5

Thread: StaxEventItemReader doesn't work with Weblogic 10.3.2

  1. #1
    Join Date
    May 2011
    Posts
    15

    Default StaxEventItemReader doesn't work with Weblogic 10.3.2

    Hi All,
    When I tried to read the XML file by using StaxEventItemReader class from stand alone class. It works perfectly whereas when I try to do the same by using weblogic server 10.3.2, it goes to infinite loop and Stepexecution status shows as STARTED.
    It seems the problem in weblogic jars. Let me know if anybody faced similar type of issues.

    Code:
          <bean id="itemXMLReader" class="org.springframework.batch.item.xml.StaxEventItemReader">
                <property name="resource" value="file:./hello2.xml" />
                <property name="unmarshaller" ref="xtreameMarshaller" />
                <property name="fragmentRootElementName" value="dimension" />
                
          </bean>
    
    
          <bean id="xtreameMarshaller" class="org.springframework.oxm.xstream.XStreamMarshaller">
                <property name="aliases">
                      <util:map id="aliases">
                            <entry key="dimension" value="uk.gov.ons.pretium.cpirpi.bulkload.model.dimension._2011._07._26.Dimension" />
                            <entry key="attribute" value="uk.gov.ons.pretium.cpirpi.bulkload.model.dimension._2011._07._26.Attribute" />
                            <entry key="attributes" value="uk.gov.ons.pretium.cpirpi.bulkload.model.dimension._2011._07._26.Attributes" />
                            <entry key="dimensionAssociations" value="uk.gov.ons.pretium.cpirpi.bulkload.model.dimension._2011._07._26.DimensionAssociations" />
                            <entry key="header" value="uk.gov.ons.pretium.cpirpi.bulkload.model.dimension._2011._07._26.Header" />
    
                      </util:map>
                </property>
          </bean>

  2. #2
    Join Date
    Aug 2011
    Posts
    5

    Default

    Got the same problem on weblogic 10.3.4 with an StaxEventItemReader and a Jaxb2Marshaller.

  3. #3
    Join Date
    Aug 2011
    Posts
    5

    Default

    It seems like it loops forever in the moveCursorToNextFragment(XMLEventReader reader) method of StaxEventItemReader.

  4. #4
    Join Date
    May 2011
    Posts
    15

    Default

    Hi All,
    We found out the solution by digging into the API code.
    You can solve this by adding JVM properties in startWeblogic.cmd/sh
    -Djavax.xml.stream.XMLInputFactory=com.sun.xml.inte rnal.stream.XMLInputFactoryImpl and
    -Djavax.xml.stream.XMLOutputFactory=com.sun.xml.int ernal.stream.XMLOutputFactoryImpl

  5. #5
    Join Date
    Aug 2011
    Posts
    5

    Default

    Solved the problem for me too.
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •