-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't generate PDFs under WildFly 13: java.lang.NoClassDefFoundError: org/w3c/dom/css/CSSPrimitiveValue #232
Comments
Indeed, WF/JBoss classloaders were the culprit here. The workaround is to create a jboss-deployment-structure.xml and declare there all the extra classes from rt.jar your .WAR will require. In my case, this: <?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<deployment>
<dependencies>
<system export="true">
<paths>
<path name="org/w3c/dom/css"/>
</paths>
</system>
</dependencies>
</deployment>
</jboss-deployment-structure> Workaround source: https://stackoverflow.com/questions/12492717/jboss-7-1-1-add-rt-jar-of-jre-to-classpath So yeah, that was supermegahyper fun... NOT! This also most likely means everything has been working on prior WF releases due to pure sheer luck!? I'm... confused. But hey, at least I can advance with testing here! |
I just ran into this myself while trying to put Turns out I'll look if we can remove it or replace it with something supported. Edit: I looked through @danfickle What do you think? Would you accept a pull request for this (including tests, of course)? |
Hi @zimmi, I'm working on this now. I think the easiest solution is to recreate CSSValue and CSSPrimitiveValue, or at least the parts we need (the constants), and then change the imports. I'll do this now. On a related note, after many minutes Googling I can't seem to find a way to test the module path of something without a module-info.java. Any ideas? |
OK, done! |
Wow, that's awesome! You fixed everything while I was sleeping. :) To avoid depending on internal API in the future, static analysis would be best I think. The maven-jdeps-plugin could be used for that. It's available since Java 8, so it should work. |
Thanks everyone. Closing now. Please reopen if required. |
Right now we're certifying our internal apps to work with the latest shiny stuff. Recently, the WildFly folks switched to a quarterly release model (starting with WF12), so I've decided to check if everything was working as intented with the latest release (as of June 21 that would be WF13). I got very surprised when I was unable to generate PDFs at all - instead I got the following stackdump:
That's on a nearly out-of-the-box WildFly 13 setup (all I've done was to setup my JDBC drivers, datasources and JPA provider - nothing else!) using OpenJDK 8 (not 9, not 10 - good ol' Java 8).
I'm able to generate PDFs without issues under WF11 (didn't bothered testing with WF12).
AFAIK CSSPrimitiveValue IS a core Java class (I've checked - it's there on rt.jar) - so, what class of classpath shenanigans (no pun intended!) is playing WildFly on me this time?! For now this is a showstopper for our future WildFly deployments, as staying on WF11 is not a viable longtime option :/
The text was updated successfully, but these errors were encountered: