I am creating a word docx document using docx4j in eclipse.
If I use,
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
to create the package, and save, the blank file is created and can be opened in word.
But when I try to add the paragraphs using the following code I get "Null Pointer Exception"
objMainPart.addStyledParagraphOfText(String styleId, String text)
If I avoid these convenient methods and use the full code as given in the getting started document the code works.
The actual Error is due to jaxbElement is NULL.
Any information on this ?
Eclipse Ver : Helios
OS : XP
docx4j ver 2.7.0