cannot access class com.sun.javafx.event.EventHandlerManager (in module javafx.base) - java

Yes, this question has been asked before, but none of the answers provided there solved the issue so:
I'm using ControlsFX 11 on a test project, every time I try to run the project I get this error:
Caused by: java.lang.IllegalAccessError: class org.controlsfx.control.textfield.AutoCompletionBinding (in module org.controlsfx.controls) cannot access class com.sun.javafx.event.EventHandlerManager (in module javafx.base) because module javafx.base does not export com.sun.javafx.event to module org.controlsfx.controls
I tried adding:
--add-exports javafx.base/com.sun.javafx.event=org.controlsfx.controls
And:
--add-exports javafx.base/com.sun.javafx.event=ALL-UNNAMED
Neither of them solved the issue. I'm using IntelliJ IDE and JDK 18.0. This is the full run:
D:\jdk18\bin\java.exe "-javaagent:D:\IntelliJ IDEA 2022.1\lib\idea_rt.jar=53684:D:\IntelliJ IDEA 2022.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\Windows 10\.m2\repository\org\openjfx\javafx-controls\18-ea+6\javafx-controls-18-ea+6.jar;C:\Users\Windows 10\.m2\repository\org\openjfx\javafx-graphics\18-ea+6\javafx-graphics-18-ea+6.jar;C:\Users\Windows 10\.m2\repository\org\openjfx\javafx-base\18-ea+6\javafx-base-18-ea+6.jar;C:\Users\Windows 10\.m2\repository\org\openjfx\javafx-fxml\18-ea+6\javafx-fxml-18-ea+6.jar" -p "C:\Users\Windows 10\.m2\repository\org\openjfx\javafx-fxml\18-ea+6\javafx-fxml-18-ea+6-win.jar;C:\Users\Windows 10\IdeaProjects\test32\controlsfx-11.1.0.jar;C:\Users\Windows 10\IdeaProjects\test32\target\classes;C:\Users\Windows 10\.m2\repository\org\openjfx\javafx-controls\18-ea+6\javafx-controls-18-ea+6-win.jar;C:\Users\Windows 10\.m2\repository\org\openjfx\javafx-base\18-ea+6\javafx-base-18-ea+6-win.jar;C:\Users\Windows 10\.m2\repository\org\openjfx\javafx-graphics\18-ea+6\javafx-graphics-18-ea+6-win.jar" -m com.example.test32/com.example.test32.HelloApplication --add-exports javafx.base/com.sun.javafx.event=org.controlsfx.controls
Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at javafx.graphics#18-ea/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:465)
at javafx.graphics#18-ea/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:364)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1081)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics#18-ea/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:901)
at javafx.graphics#18-ea/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalAccessError: class org.controlsfx.control.textfield.AutoCompletionBinding (in module org.controlsfx.controls) cannot access class com.sun.javafx.event.EventHandlerManager (in module javafx.base) because module javafx.base does not export com.sun.javafx.event to module org.controlsfx.controls
at org.controlsfx.controls/org.controlsfx.control.textfield.AutoCompletionBinding.<init>(AutoCompletionBinding.java:538)
at org.controlsfx.controls/impl.org.controlsfx.autocompletion.AutoCompletionTextFieldBinding.<init>(AutoCompletionTextFieldBinding.java:107)
at org.controlsfx.controls/impl.org.controlsfx.autocompletion.AutoCompletionTextFieldBinding.<init>(AutoCompletionTextFieldBinding.java:92)
at org.controlsfx.controls/org.controlsfx.control.textfield.TextFields.bindAutoCompletion(TextFields.java:187)
at org.controlsfx.controls/org.controlsfx.control.textfield.TextFields.bindAutoCompletion(TextFields.java:181)
at com.example.test32/com.example.test32.HelloController.initialize(HelloController.java:25)
at javafx.fxml#18-ea/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2655)
at javafx.fxml#18-ea/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
at javafx.fxml#18-ea/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2516)
at com.example.test32/com.example.test32.HelloApplication.start(HelloApplication.java:14)
at javafx.graphics#18-ea/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
at javafx.graphics#18-ea/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
at javafx.graphics#18-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics#18-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
at javafx.graphics#18-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics#18-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics#18-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
... 1 more
Exception running application com.example.test32.HelloApplication
Process finished with exit code 1

Related

Question about java.lang.NoClassDefFoundError: quickfix/MessageStoreFactory

I have a problem when I run my Java application for a FIX application. I have added all the QuickFIX/J jars to build the FIX application. But when I run my jar I always get this error:
Application: TestMarketdataRequest
Exception in thread "main" java.lang.NoClassDefFoundError: quickfix/MessageStoreFactory
at com.dxtr.fastmatch.FastmatchMDRequest.<init>(FastmatchMDRequest.java:14)
at com.dxtr.fastmatch.FastmatchMDRequest.main(FastmatchMDRequest.java:19)
Caused by: java.lang.ClassNotFoundException: quickfix.MessageStoreFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 2 more
My question: How do I fix this and why do I get this error when I did add QuickFIX/J in my depedencies?
Include the dependency jar in your classpath when you run the main class using the -cp option:
java -cp quickfixj.jar MainClass
-classpath classpath
-cp classpath
Specifies a list of directories, JAR files, and ZIP archives to search for class files. Separate class path entries with semicolons (;). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.
More on the docs.
this is closed. i have add executable jar in my pom. so it is closed right now thanks all

Exception in thread "main" java.lang.reflect.InvocationTargetException while installing maven project

I'm trying to install maven project but facing an
exception: Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test
(default-test)
There are test failures.
When I looked at the .dump file I see this:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.RuntimeException: Class java/lang/UnknownError could not be instrumented.
org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:140)
org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:101)
at org.jacoco.agent.rt.internal_c13123e.PreMain.createRuntime(PreMain.java:55)
at org.jacoco.agent.rt.internal_c13123e.PreMain.premain(PreMain.java:47)
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
at java.base/java.lang.Class.getField(Class.java:1999)
org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at line: 422
I'm pretty sure there is no any problems in the code as it works well on other computers. Skipping tests is not an option because it is an integration-tests module
The answer below helped. For me it was a problem between Jacoco version and my JDK.
There are two options to solve this:
Make sure that there is an appropriate version for your JDK and upgrade jacoco
Use an older JDK
Just to add to the given answer. My issue was due to the fact that I was using Java 14. JaCoCo needed an older version. So I downloaded and installed JDK 1.8.0. Now in IntelliJ:
Go to project structure (top right)
Click on Project under Project Settings
Then select JDK 1.8

trying to run javafx program on intellij jre11 [duplicate]

This question already has answers here:
IntelliJ can't recognize JavaFX 11 with OpenJDK 11
(7 answers)
Closed 4 years ago.
i have installed intellij and i'm trying to open a new javafx but i can't manage to run it (even the basic one that is default and should just open a simple window)
i'm using jdk 11(i have to) so i downloaded javafx like said in this post:
Error: JavaFX runtime components are missing, and are required to run this application with JDK 11
but i get this error
"C:\Program Files\Java\jdk-11.0.1\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA
2018.2.5\lib\idea_rt.jar=59874:C:\Program Files\JetBrains\IntelliJ IDEA 2018.2.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\itzik\IdeaProjects\untitled3\out\production\untitled3;C:\Program Files\Java\javafx-sdk-11\lib\src.zip;C:\Program Files\Java\javafx-sdk-11\lib\javafx-swt.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.web.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.base.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.fxml.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.media.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.swing.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.controls.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.graphics.jar" sample.Main
Error: JavaFX runtime components are missing, and are required to run this application
Process finished with exit code 1
and if i try to do this line in solution
then in Run->Edit Configurations -> VM Options, put:
--module-path="C:\Program Files\Java\javafx-sdk-11\lib" --add-modules=javafx.controls
error changes to:
"C:\Program Files\Java\jdk-11.0.1\bin\java.exe" "--module-path=C:\Program Files\Java\javafx-sdk-11\lib"
--add-modules=javafx.controls "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA
2018.2.5\lib\idea_rt.jar=59984:C:\Program Files\JetBrains\IntelliJ IDEA 2018.2.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\itzik\IdeaProjects\untitled3\out\production\untitled3;C:\Program Files\Java\javafx-sdk-11\lib\src.zip;C:\Program Files\Java\javafx-sdk-11\lib\javafx-swt.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.web.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.base.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.fxml.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.media.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.swing.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.controls.jar;C:\Program Files\Java\javafx-sdk-11\lib\javafx.graphics.jar" sample.Main Exception in Application start method java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464) at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051) Caused by: java.lang.RuntimeException: Exception in Application start method at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900) at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.IllegalAccessError: class com.sun.javafx.fxml.FXMLLoaderHelper (in unnamed module #0x555df7da) cannot access class com.sun.javafx.util.Utils (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.util to unnamed module #0x555df7da at com.sun.javafx.fxml.FXMLLoaderHelper.<clinit>(FXMLLoaderHelper.java:38) at javafx.fxml.FXMLLoader.<clinit>(FXMLLoader.java:2056) at sample.Main.start(Main.java:13) at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174) ... 1 more Exception running application sample.Main
Process finished with exit code 1
i'm trying to fix this problem for over 2 hours searching the web but nothing works =\
tried to set the language level to 8\10\11 in project structure and still doesn't work
regular java program with hello world does work, just java fx does problems...
If you are using JavaFX in Java 11, you need to add the JavaFX jar file.
JavaFX is decoupled with the JDK after JDK 10 so download JavaFX for Java 11 and add it as an external library.
found a solution, in run --> edit configuration ---> VM option
--module-path="C:\Program Files\Java\javafx-sdk-11\lib" --add-modules=javafx.controls --add-exports=javafx.graphics/com.sun.javafx.util=ALL-UNNAMED --add-modules javafx.controls --add-exports=javafx.graphics/com.sun.javafx.util=ALL-UNNAMED --add-exports=javafx.base/com.sun.javafx.reflect=ALL-UNNAMED --add-exports=javafx.base/com.sun.javafx.beans=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.glass.utils=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED

IntelliJ IDEA - Error: JavaFX runtime components are missing, and are required to run this application [duplicate]

This question already has answers here:
IntelliJ can't recognize JavaFX 11 with OpenJDK 11
(7 answers)
Closed 4 years ago.
I'm running IntelliJ IDEA Ultimate 2018.2.5 with JDK 11.0.1 and JavaFX 11 from OpenJFX. I know it's a common error and I tried many of the proposed fixes but nothing works.
No matter which JavaFX project I try to run I get the error:
Error: JavaFX runtime components are missing, and are required to run this application
If I add the following to the VM options
--module-path="C:\Program Files\Java\javafx-sdk-11\lib" --add-modules=javafx.controls
I get these errors:
Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalAccessError: class com.sun.javafx.fxml.FXMLLoaderHelper (in unnamed module #0x5fce9dc5) cannot access class com.sun.javafx.util.Utils (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.util to unnamed module #0x5fce9dc5
at com.sun.javafx.fxml.FXMLLoaderHelper.<clinit>(FXMLLoaderHelper.java:38)
at javafx.fxml.FXMLLoader.<clinit>(FXMLLoader.java:2056)
at sample.Main.start(Main.java:13)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
... 1 more
Exception running application sample.Main
I tried reinstalling without any luck. I have also tried to change
getClass().getResource(...) to getClass().getClassLoader().getResource(...) or to something like Parent root = FXMLLoader.load(getClass().getResource("/sample.fxml")); but still doesn't work.
There are similar questions like this or this other one.
Before JavaFX 11, whenever you were calling something JavaFX related, you had all the javafx modules available within the SDK.
But now you have to include the modules/dependencies you need.
Your error says that you are using FXML but it can't be resolved, but you have just added the javafx.controls module:
--add-modules=javafx.controls
As you can see in the JavaDoc the javafx.controls module depends on javafx.graphics and java.base, but none of those modules includes the FXML classes.
If you need FXML classes like the FXMLLoader, you need to include javafx.fxml module:
--module-path="C:\Program Files\Java\javafx-sdk-11\lib" \
--add-modules=javafx.controls,javafx.fxml
The same will apply if you need media or webkit, those have their own modules.

Jars in my grails project not being picked up when deployed to tomcat 5.5

I am running a grails test run-app all day with my application and it is fine. I type "grails prod war" to get a war, and dump it in the webapps folder of my tomcat install. Now i get the message like so:
11.11.2010 16:35:11 *ERROR* GrailsExceptionResolver: Executing action [index] of controller [ResumeController] caused e
xception: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Context (GrailsExceptionResolver.ja
va, line 72)
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [index] of controll
er [ResumeController] caused exception: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Cont
ext
at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382)
at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
at java.lang.Thread.run(Unknown Source)
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: Could not initialize
class org.docx4j.jaxb.Context
... 3 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Context
at org.docx4j.openpackaging.contenttype.ContentTypeManager.parseContentTypesFile(ContentTypeManager.java:599)
at org.docx4j.openpackaging.io.LoadFromZipNG.process(LoadFromZipNG.java:199)
at org.docx4j.openpackaging.io.LoadFromZipNG.get(LoadFromZipNG.java:188)
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:188)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:169)
at com.iai.skillsdb.DocxHelpers.DocxParser.openDocx4j(DocxParser.java:70)
at ResumeController$_closure8.doCall(ResumeController.groovy:164)
at ResumeController$_closure8.doCall(ResumeController.groovy)
at ResumeController.invokeMethod(ResumeController.groovy)
at ResumeController$_closure1.doCall(ResumeController.groovy:41)
at ResumeController$_closure1.doCall(ResumeController.groovy)
... 3 more
What is causing this? I have the docx4j jar in my WAR for sure, and it is there in the web-inf lib folder as well.
You're getting a java.lang.NoClassDefFoundError, not a java.lang.ClassNotFoundException. The class is being loaded, but a class that it depends on (directly or indirectly via another class) isn't there. You're most likely missing a jar that docx4j requires as a dependency.
Make sure that you have the correct version of docx4j and that there is absolutely no other version of docx4j in your classpath, there may be a version of this lib that did not have the 'Content' class implemented.

Categories