The sample code has,
- Code: Select all
invitation = new Invitation(templateProperties, InvitationTest.class
.getResource("/template.docx").getPath(), InvitationTest.class
.getResource("/").getPath());
with Invitation having
- Code: Select all
WordprocessingMLPackage template = WordprocessingMLPackage
.load(new File(templateFilePath));
resulting in the following docx4j stack trace
org.docx4j.openpackaging.exceptions.Docx4JException: Couldn't load file from C:\Users\Karsten%20Tinnefeld\Desktop\hello.world.docx4j\target\test-classes\template.docx
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:186)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:169)
at com.myucel.docx4j.Invitation.invite(Invitation.java:44) ...