aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes docx4j in a web app inside of JBoss AS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "docx4j in a web app inside of JBoss AS" Watch "docx4j in a web app inside of JBoss AS" New topic
Author

docx4j in a web app inside of JBoss AS

Jacob Davis
Greenhorn

Joined: Apr 24, 2013
Posts: 1
I was able to successfully create a simple project with docx4j ( http://www.docx4java.org ). 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 http://www.docx4java.org/trac/docx4j/browser/trunk/docx4j/src/main/java/org/docx4j/jaxb/Context.java):



From what I have observed, it seems that I might need to put a jaxb.properties 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.
 
subject: docx4j in a web app inside of JBoss AS