Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

docx4j in a web app inside of JBoss AS

 
Jacob Davis
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic