deploy restapi as war into tomcat it's doesn't works
See original GitHub issuewhen I use restapi by add dependency into pom
<dependency> <groupId>org.camunda.bpm.extension.springboot</groupId> <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId> <version>2.0.0</version> </dependency>
it works well when I run Application.java
but when I deploy the war into tomcat8.5.9 and start some error in console:
WARNING: Both resources, resource Builder{names=[[unnamed], [unnamed]], path=‘/{id}’, methodBuilders=[], childResourceBuilders=[], childResources=[], resourceMethods=[], subResourceLocator=httpMethod=null, consumedTypes=[], producedTypes=[], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=interface org.camunda.bpm.engine.rest.history.HistoricDetailRestService, handlerConstructors=[]}, definitionMethod=public abstract org.camunda.bpm.engine.rest.sub.history.HistoricDetailResource org.camunda.bpm.engine.rest.history.HistoricDetailRestService.historicDetail(java.lang.String), parameters=[Parameter [type=class java.lang.String, source=id, defaultValue=null]], responseType=interface org.camunda.bpm.engine.rest.sub.history.HistoricDetailResource}, nameBindings=[], handlerClasses=[interface org.camunda.bpm.engine.rest.history.HistoricDetailRestService], handlerInstances=[], parentResource=<no parent>, extended=false} and resource Resource{“/{id}”, 0 child resources, 0 resource methods, 1 sub-resource locator, 1 method handler classes, 0 method handler instances}, contains sub resource locators on the same path /{id}.
WARNING: A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricDetailRestService.getHistoricDetails(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer,boolean) and public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.getHistoricTaskInstances(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer) at matching regular expression /variable-instance. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.
WARNING: A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricDetailRestService.getHistoricDetails(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer,boolean) and public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.getHistoricVariableInstances(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer,boolean) at matching regular expression /variable-instance. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.
WARNING: A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.getHistoricTaskInstances(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer) and public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.getHistoricVariableInstances(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer,boolean) at matching regular expression /variable-instance. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.
WARNING: A resource model has ambiguous (sub-)resource method for HTTP method POST and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.queryHistoricTaskInstances(org.camunda.bpm.engine.rest.dto.history.HistoricTaskInstanceQueryDto,java.lang.Integer,java.lang.Integer) and public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.queryHistoricVariableInstances(org.camunda.bpm.engine.rest.dto.history.HistoricVariableInstanceQueryDto,java.lang.Integer,java.lang.Integer,boolean) at matching regular expression /variable-instance. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.
WARNING: A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricDetailRestService.getHistoricDetailsCount(javax.ws.rs.core.UriInfo) and public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.getHistoricTaskInstancesCount(javax.ws.rs.core.UriInfo) at matching regular expression /count. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.
WARNING: A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricDetailRestService.getHistoricDetailsCount(javax.ws.rs.core.UriInfo) and public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.getHistoricVariableInstancesCount(javax.ws.rs.core.UriInfo) at matching regular expression /count. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.
WARNING: A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.getHistoricTaskInstancesCount(javax.ws.rs.core.UriInfo) and public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.getHistoricVariableInstancesCount(javax.ws.rs.core.UriInfo) at matching regular expression /count. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.
WARNING: A resource model has ambiguous (sub-)resource method for HTTP method POST and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.queryHistoricTaskInstancesCount(org.camunda.bpm.engine.rest.dto.history.HistoricTaskInstanceQueryDto) and public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.queryHistoricVariableInstancesCount(org.camunda.bpm.engine.rest.dto.history.HistoricVariableInstanceQueryDto) at matching regular expression /count. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.
WARNING: A resource, Resource{“plugin/welcomePlugins”, 0 child resources, 0 resource methods, 0 sub-resource locator, 0 method handler classes, 0 method handler instances}, with path “plugin/welcomePlugins” is empty. It has no resource (or sub resource) methods neither sub resource locators defined.
2017-01-06 10:55:33.439 ERROR 10480 — [ost-startStop-1] o.a.c.c.C.[.[localhost].[/luma3.0-app] : StandardWrapper.Throwable
org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization. [[FATAL] Both resources, resource Builder{names=[[unnamed], [unnamed]], path=‘/{id}’, methodBuilders=[], childResourceBuilders=[], childResources=[], resourceMethods=[], subResourceLocator=httpMethod=null, consumedTypes=[], producedTypes=[], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=interface org.camunda.bpm.engine.rest.history.HistoricDetailRestService, handlerConstructors=[]}, definitionMethod=public abstract org.camunda.bpm.engine.rest.sub.history.HistoricDetailResource org.camunda.bpm.engine.rest.history.HistoricDetailRestService.historicDetail(java.lang.String), parameters=[Parameter [type=class java.lang.String, source=id, defaultValue=null]], responseType=interface org.camunda.bpm.engine.rest.sub.history.HistoricDetailResource}, nameBindings=[], handlerClasses=[interface org.camunda.bpm.engine.rest.history.HistoricDetailRestService], handlerInstances=[], parentResource=<no parent>, extended=false} and resource Resource{“/{id}”, 0 child resources, 0 resource methods, 1 sub-resource locator, 1 method handler classes, 0 method handler instances}, contains sub resource locators on the same path /{id}.; source=‘org.glassfish.jersey.server.model.Resource$Builder$1@7c707e30’, [WARNING] A resource, Resource{“plugin/welcomePlugins”, 0 child resources, 0 resource methods, 0 sub-resource locator, 0 method handler classes, 0 method handler instances}, with path “plugin/welcomePlugins” is empty. It has no resource (or sub resource) methods neither sub resource locators defined.; source=‘Resource{“plugin/welcomePlugins”, 0 child resources, 0 resource methods, 0 sub-resource locator, 0 method handler classes, 0 method handler instances}’, [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricDetailRestService.getHistoricDetails(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer,boolean) and public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.getHistoricTaskInstances(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer) at matching regular expression /variable-instance. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source=‘org.glassfish.jersey.server.model.RuntimeResource@31f87966’, [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricDetailRestService.getHistoricDetails(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer,boolean) and public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.getHistoricVariableInstances(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer,boolean) at matching regular expression /variable-instance. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source=‘org.glassfish.jersey.server.model.RuntimeResource@31f87966’, [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.getHistoricTaskInstances(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer) and public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.getHistoricVariableInstances(javax.ws.rs.core.UriInfo,java.lang.Integer,java.lang.Integer,boolean) at matching regular expression /variable-instance. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source=‘org.glassfish.jersey.server.model.RuntimeResource@31f87966’, [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method POST and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.queryHistoricTaskInstances(org.camunda.bpm.engine.rest.dto.history.HistoricTaskInstanceQueryDto,java.lang.Integer,java.lang.Integer) and public abstract java.util.List org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.queryHistoricVariableInstances(org.camunda.bpm.engine.rest.dto.history.HistoricVariableInstanceQueryDto,java.lang.Integer,java.lang.Integer,boolean) at matching regular expression /variable-instance. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source=‘org.glassfish.jersey.server.model.RuntimeResource@31f87966’, [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricDetailRestService.getHistoricDetailsCount(javax.ws.rs.core.UriInfo) and public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.getHistoricTaskInstancesCount(javax.ws.rs.core.UriInfo) at matching regular expression /count. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source=‘org.glassfish.jersey.server.model.RuntimeResource@65a731b0’, [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricDetailRestService.getHistoricDetailsCount(javax.ws.rs.core.UriInfo) and public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.getHistoricVariableInstancesCount(javax.ws.rs.core.UriInfo) at matching regular expression /count. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source=‘org.glassfish.jersey.server.model.RuntimeResource@65a731b0’, [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.getHistoricTaskInstancesCount(javax.ws.rs.core.UriInfo) and public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.getHistoricVariableInstancesCount(javax.ws.rs.core.UriInfo) at matching regular expression /count. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source=‘org.glassfish.jersey.server.model.RuntimeResource@65a731b0’, [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method POST and input mime-types as defined by"@Consumes" and “@Produces” annotations at Java methods public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricTaskInstanceRestService.queryHistoricTaskInstancesCount(org.camunda.bpm.engine.rest.dto.history.HistoricTaskInstanceQueryDto) and public abstract org.camunda.bpm.engine.rest.dto.CountResultDto org.camunda.bpm.engine.rest.history.HistoricVariableInstanceRestService.queryHistoricVariableInstancesCount(org.camunda.bpm.engine.rest.dto.history.HistoricVariableInstanceQueryDto) at matching regular expression /count. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source=‘org.glassfish.jersey.server.model.RuntimeResource@65a731b0’] at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:555) ~[jersey-server-2.23.2.jar:na] at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:184) ~[jersey-server-2.23.2.jar:na] at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350) ~[jersey-server-2.23.2.jar:na] at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347) ~[jersey-server-2.23.2.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.23.2.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.23.2.jar:na] at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255) ~[jersey-common-2.23.2.jar:na] at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:347) ~[jersey-server-2.23.2.jar:na] at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:392) ~[jersey-container-servlet-core-2.23.2.jar:na] at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177) ~[jersey-container-servlet-core-2.23.2.jar:na] at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369) ~[jersey-container-servlet-core-2.23.2.jar:na] at javax.servlet.GenericServlet.init(GenericServlet.java:158) ~[servlet-api.jar:3.1.FR] at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1183) [catalina.jar:8.5.9] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992) [catalina.jar:8.5.9] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4913) [catalina.jar:8.5.9] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5223) [catalina.jar:8.5.9] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.5.9] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) [catalina.jar:8.5.9] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) [catalina.jar:8.5.9] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) [catalina.jar:8.5.9] at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107) [catalina.jar:8.5.9] at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841) [catalina.jar:8.5.9] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_66] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_66] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66]
2017-01-06 10:55:33.441 ERROR 10480 — [ost-startStop-1] o.a.c.c.C.[.[localhost].[/luma3.0-app] : Servlet [org.camunda.bpm.spring.boot.starter.rest.CamundaJerseyResourceConfig] in web application [/luma3.0-app] threw load() exception
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (5 by maintainers)
Top GitHub Comments
Since the spring boot starter moved to the core platform, issues are tracked in jira.camunda.com, so you should check there if this is still open.
Hi guys, I ran into this problem last week, and today finally find a solution. The suggestion to extend the CamundaJerseyResourceConfig and annotate it with @Component won’t work for me, it also throws NullPointerException upon deploy. My solution is: remove the camunda-spring-boot-starter-rest dependency from pom.xml and added dependencies related to it, these are: camunda-bpm-spring-boot-starter camunda-engine-rest-jaxrs2 spring-boot-starter-jersey So, making these changes, the WAR file successfully deployed to Wildfly 25.0. One big disadvantage is: when you try to display the deployments in Wildfly Management it throws an error and displays nothing, but the application is working correctly.