Loading ...
Sorry, an error occurred while loading the content.

3859Out of memory error while importing large xml files

Expand Messages
  • Ruchika Israni
    Jun 3, 2009
      Hi all,

      I am using a xml which is 3.08 MB in size. I am running the transfer tool and am getting the following error. I read somewhere in the previous posts that DOM parser creates the entire tree from the XML which poses a problem for large xml files. Is it possible to perhaps use the SAX parser in place of the DOM parser ?

      Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
      at org.apache.xerces.dom.DeferredDocumentImpl.getNodeObject(Unknown Sour
      ce)
      at org.apache.xerces.dom.DeferredDocumentImpl.synchronizeChildren(Unknow
      n Source)
      at org.apache.xerces.dom.DeferredElementNSImpl.synchronizeChildren(Unkno
      wn Source)
      at org.apache.xerces.dom.ParentNode.getFirstChild(Unknown Source)
      at org.xmlmiddleware.xmlutils.DOMNormalizer.getFirstChild(DOMNormalizer.
      java:123)
      at org.xmlmiddleware.xmldbms.DOMToDBMS.processChildren(DOMToDBMS.java:60
      5)
      at org.xmlmiddleware.xmldbms.DOMToDBMS.processClassRow(DOMToDBMS.java:54
      4)
      at org.xmlmiddleware.xmldbms.DOMToDBMS.processRow(DOMToDBMS.java:881)
      at org.xmlmiddleware.xmldbms.DOMToDBMS.processFKNodes(DOMToDBMS.java:946
      )
      at org.xmlmiddleware.xmldbms.DOMToDBMS.processClassRow(DOMToDBMS.java:56
      6)
      at org.xmlmiddleware.xmldbms.DOMToDBMS.processRoot(DOMToDBMS.java:447)
      at org.xmlmiddleware.xmldbms.DOMToDBMS.storeDocument(DOMToDBMS.java:368)

      at org.xmlmiddleware.xmldbms.DOMToDBMS.storeDocument(DOMToDBMS.java:317)

      at org.xmlmiddleware.xmldbms.tools.Transfer.storeDocumentInternal(Transf
      er.java:840)
      at org.xmlmiddleware.xmldbms.tools.Transfer.storeDocument(Transfer.java:
      479)
      at org.xmlmiddleware.xmldbms.tools.Transfer.dispatchStoreDocument(Transf
      er.java:696)
      at org.xmlmiddleware.xmldbms.tools.Transfer.dispatch(Transfer.java:434)
      at org.xmlmiddleware.xmldbms.tools.Transfer.main(Transfer.java:353)

      Many thanks in anticipation.
      Ruchika Israni
    • Show all 3 messages in this topic