Closed aantakli closed 9 years ago
Can you post the stack trace from your server log for when this occurs, please?
Stacktrace:
ERROR [de.dfki.asr.compass.rest.exceptionmappers.CatchAll](default task-68) Unhandled REST exception: java.lang.ClassNotFoundException: org.eclipse.persistence.jaxb.JAXBContextFactory from [Module "deployment.deployment-1.0.0.ear.webapp-1.0.0.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:510) [jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:1.0.4.Final]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:194) [jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:1.0.4.Final]
at javax.xml.bind.ContextFinder.find(ContextFinder.java:392) [jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:1.0.4.Final]
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618) [jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:1.0.4.Final]
at org.jboss.resteasy.plugins.providers.jaxb.JAXBContextWrapper.
Looks like we're missing a reference to Moxy. Yep, there it is. compass-rest
should depend on Moxy as well, same as compass-database-initialization
(Here I'm hoping that maven is smart enough to figure out to only include one moxy
jar if we do it like this...). XML via REST sort of creeped in at some point, since a downstream project needed it. Presumedly everything would be fine if compass-database-initialization
was included in the custom deployment, providing the dependency.
The fix should probably result in a hotfix release.
Unfortunately, just fixing the dependency doesn't quite cut it. There remains the issue that the JaxbContextProvider
is only included in database-initialization
, but that's needed to set up everything correctly.
This has some dependency implications (since JaxbContextProvider
needs to be available at the EAR level for database-initialization
, but rest
is only included at the WAR level) which need sorting out.
So much for this being an easy fix.
there is a bug in the custom-compass rest api. I get an error (about JaxbContextFactory) when I want to see a specific project (.../projects/1). Everything else works.