Null Pointer Exception when using WordprocessingMLPackage
Posted: Fri Sep 14, 2012 11:05 pm
hi
I am new to docx4j, as you can see this is my first post
i have a java code where like below
i am experiencing a NULL POINTER EXCEPTION here.
i am sure about input file path.
exception is like this:
jars i'm using :
docx4j-2.6.0.jar
log4j-1.2.13.jar
java 1.6
IDE: eclipse
I am new to docx4j, as you can see this is my first post
i have a java code where like below
- Code: Select all
wordMLPackage = org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(inputFile);
i am experiencing a NULL POINTER EXCEPTION here.
i am sure about input file path.
exception is like this:
- Code: Select all
JAXB: RI not present. Trying Java 6 implementation.
JAXB: Using Java 6 implementation.
log4j:WARN No appenders could be found for logger (org.docx4j.jaxb.Context).
log4j:WARN Please initialize the log4j system properly.
java.lang.NullPointerException
at org.docx4j.wml.Id.hashCode(Id.java:129)
at java.util.HashMap.put(HashMap.java:372)
at com.sun.xml.internal.bind.v2.runtime.AssociationMap.addInner(AssociationMap.java:78)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.recordInnerPeer(UnmarshallingContext.java:988)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:147)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:369)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:347)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:35)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:101)
at com.sun.xml.internal.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:224)
jars i'm using :
docx4j-2.6.0.jar
log4j-1.2.13.jar
java 1.6
IDE: eclipse