Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

docx4j in a web app inside of JBoss AS  RSS feed

Jacob Davis
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was able to successfully create a simple project with docx4j ( ). This simple project successfully created and wrote on a .docx document. Now I am trying to accomplish the same thing inside of a bigger project. This bigger project is a webapp running in JBoss AS 7.1. However, at my first docx4j related line of code:

It runs into an error:

Also, when I stop and restart my server without rebuilding my EAR, this error doesn't show up and instead I get a NoSuchElementException from the same method call (createPackage()). I believe it has to do with the fact that JBoss has its own JAXB implementation, but JAXBContext is initialized within the docx4j library. Here is the code (from

From what I have observed, it seems that I might need to put a file specifying which jaxb implementation to use in every package listed in each JAXBContext instance above. Is this correct? Is there anything I am missing?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!