We try to use camunda cockpit and rest engine on tomee and can't get it up and running.
Versions:
tomee-jaxrs: 1.6.0
camunda: 7.0.0
When I call the rest engine first, it works, but a subsequent call of the camunda webapp fails with:
Jan 10, 2014 5:11:20 PM org.camunda.bpm.engine.rest.exception.ExceptionHandler toResponse
Warnung: javax.ws.rs.WebApplicationException
at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:162)
at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:91)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:237)
at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.onMessage(CxfRsHttpListener.java:170)
at org.apache.openejb.server.rest.RsServlet.service(RsServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
...
If I call the cockpit first, it works (including the embedded est engine on path /camunda/api/engine), but a subsequent call of the rest api causes an exception:
java.lang.ClassCastException: org.jboss.resteasy.core.ThreadLocalResteasyProviderFactory cannot be cast to org.jboss.resteasy.spi.ResteasyProviderFactory
org.jboss.resteasy.spi.ResteasyProviderFactory.getInstance(ResteasyProviderFactory.java:353)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:222)
org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:59)
org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)
Does anybody have experience with tomee and camunda?
Any ideas how this could be resolved?
Many thanks and regards,
Jens.
jackson-core-asl-1.9.11.jar
jackson-jaxrs-1.9.11.jar
jackson-mapper-asl-1.9.11.jar
<filter> <filter-name>Resteasy</filter-name> <filter-class> org.jboss.resteasy.plugins.server.servlet.FilterDispatcher </filter-class> <init-param> <param-name>javax.ws.rs.Application</param-name> <param-value>org.camunda.bpm.engine.rest.impl.application.DefaultApplication</param-value> </init-param> </filter>
<filter-mapping> <filter-name>Resteasy</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>Just a quick update: the problem is resolved. According to a colleague, the problem was the webapp was not 100% conforming to JEE standards, but I currently don't know the details. The details will follow ;-)
Hi Christian,
as mentioned by my colleague Jens i will provide a solution for this problem.
I've opened an issue in Jira for this. (https://app.camunda.com/jira/browse/CAM-1734)
I will provide the solution via github branch at the end of next week.
Regards,
Thomas