File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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?
 
 
subject: docx4j in a web app inside of JBoss AS
 
Similar Threads
Struts2
No error at deployment, but at application test
set a data source in domain mode in JBoss AS7
JBoss AS 7.1.0 CR1b problem with hornetq-ra
ClientAbortException throw at the end of REST request