Camel Validation component runs out of memory

Solution Verified - Updated -

Issue

  • We are facing problems in one of our switchyard applications when trying to validate an xml file using the camel validation component.
  • There is an application which picks up an xml input file that is supposed to comply with the xsd contained in the main resource directory. The application will print a log message before and after validation.

Expected behaviour

The XML input file is a valid instance document of the XSD, which has been verified with Altova XML Spy version 2016 rel 2. The application should pick up the file from some directory say, testin and print a message before and after the validation and then deliver the file another location say, testout.

Actual behaviour

The applications never completes validation but runs out of memory.

Caused by: java.lang.OutOfMemoryError: Java heap space
    at org.apache.xerces.impl.xs.models.CMNodeFactory.getCMUniOpNode(CMNodeFactory.java:102) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.xs.models.CMBuilder.copyNode(CMBuilder.java:315) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.xs.models.CMBuilder.multiNodes(CMBuilder.java:292) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.xs.models.CMBuilder.multiNodes(CMBuilder.java:295) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.xs.models.CMBuilder.multiNodes(CMBuilder.java:295) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.xs.models.CMBuilder.multiNodes(CMBuilder.java:295) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.xs.models.CMBuilder.multiNodes(CMBuilder.java:295) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.xs.models.CMBuilder.multiNodes(CMBuilder.java:295) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

Environment

  • Red Hat JBoss Fuse
    • 6.2.x
    • Apache Xerces
    • Apache Camel
  • Switchyard

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content