Announcement Announcement Module
Collapse
No announcement yet.
StaxEventItemReader doesn't work with Weblogic 10.3.2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Got the same problem on weblogic 10.3.4 with an StaxEventItemReader and a Jaxb2Marshaller.

    Comment


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

      Comment


      • #4
        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

        Comment


        • #5
          Solved the problem for me too.
          Thanks!

          Comment

          Working...
          X