Environment (Required on creation):
- Tomcat (standalone and non-standalone webapp)
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
- Cannot use webapps
Steps to reproduce (Required on creation):
- Start Tomcat distro
- Go to webapp login page
Observed Behavior (Required on creation):
- An error is displayed
- Login is not possible
- localhost.log shows
28-Jan-2021 15:03:27.306 SCHWERWIEGEND [http-nio-8080-exec-5] org.apache.catalina.core.ApplicationContext.log Servlet.init() for servlet [Admin Api] threw exception java.lang.NoSuchFieldError: SERVER_SENT_EVENTS_TYPE at org.jboss.resteasy.core.ResourceMethodInvoker.isSseResourceMethod(ResourceMethodInvoker.java:184) at org.jboss.resteasy.core.ResourceMethodInvoker.<init>(ResourceMethodInvoker.java:169) at org.jboss.resteasy.core.ResourceMethodRegistry.processMethod(ResourceMethodRegistry.java:355) at org.jboss.resteasy.core.ResourceMethodRegistry.register(ResourceMethodRegistry.java:278) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:229) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:201) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:187) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:164) at org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:81) at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:517) at org.jboss.resteasy.spi.ResteasyDeployment.startInternal(ResteasyDeployment.java:288) at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:93) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:140) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:42) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1134) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1089) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:761) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)
Expected behavior (Required on creation):
- Webapp use is possible
Root Cause (Required on prioritization):
- Tomcat webapp has both JAX-RS 2.0 and JAX-RS 2.1 API on the classpath
- The current Resteasy version requires 2.1
- Depending on which classes are loaded first
Solution Ideas (Optional):
- Make sure we only include one JAX-RS API Jar
- Check other distros
- Apply this commit on 7.12: https://github.com/camunda/camunda-bpm-platform-ee-maintenance/commit/df7d2f096df360c3112ce014f8dc7879bbec486d#diff-1aca71d8ab0258c2025e7b338eb601f6d3fb367d5f6e461a9a7a48694d682d10
Hints (Optional):
Distro assessment
Tomcat:
- it's correct in the non-EE webapp
Wildfly/JBoss:
- does not contain JAX-RS implementation
WLS
- does not contain JAX-RS implementation
WAS 8
- does not contain JAX-RS implementation
WAS 9
- Uses Jersey
Run
- doesn't exist in 7.12
- uses Jersey