recently I tried to deploy my application, which utilizes docx4j, to a JBoss 6.2 EAP Server. Unfortunately the process of generating docx documents does not work anymore on EAP 6.2 though everything is fine on JBoss 7.1.1.
A few exceptions that caught my attention:
- Code: Select all
Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper from [Module "deployment.ProfilerApp.ear:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
- Code: Select all
Caused by: java.lang.NoClassDefFoundError: com/sun/xml/internal/bind/marshaller/NamespacePrefixMapper
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_45]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_45]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
- Code: Select all
13:41:23,345 WARN [org.jboss.modules] (http-/127.0.0.1:8080-2) Failed to define class org.docx4j.jaxb.NamespacePrefixMapperSunInternal in Module "deployment.ProfilerApp.ear:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/docx4j/jaxb/NamespacePrefixMapperSunInternal (Module "deployment.ProfilerApp.ear:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
The errors are thrown while executing the following line of code:
- Code: Select all
WordprocessingMLPackage wml = WordprocessingMLPackage.load(new File("template.docx"));
In my pom.xml I added the following dependency:
- Code: Select all
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version>3.0.0</version>
</dependency>
Any idea what needs to be changed? Any help is highly appreciated! Thanks in advance