org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization. [[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 java.util.List br.com.alexandreesl.handson.rest.ProductRest.getProducts() and public java.util.List br.com.alexandreesl.handson.rest.CustomerRest.getCustomers() at matching regular expression /. 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@14c14bf']

Stack Overflow | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization

    Stack Overflow | 8 months ago
    org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization. [[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 java.util.List br.com.alexandreesl.handson.rest.ProductRest.getProducts() and public java.util.List br.com.alexandreesl.handson.rest.CustomerRest.getCustomers() at matching regular expression /. 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@14c14bf']
  2. 0

    Spring Boot Kotlin Jersey ModelValidationException

    Stack Overflow | 8 months ago | greyfox
    org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization. [[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 javax.ws.rs.core.Response com.joescodeshack.igdb.controller.GenreController.getGenres() and public final java.util.List com.joescodeshack.igdb.controller.GenreController.getGenres() at matching regular expression /genre. 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@1b6cce78']
  3. 0

    Jersey ModelValidationException

    Stack Overflow | 1 year ago | maddy
    org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization. [[FATAL] A HTTP GET method, public javax.ws.rs.core.Response RestFulApp.Crud.MyResource.create(int,int,int,int), should not consume any form parameter.; source='ResourceMethod{httpMethod=GET, consumedTypes=[application/json], producedTypes=[application/json], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class RestFulApp.Crud.MyResource, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@c8e6a64]}, definitionMethod=public javax.ws.rs.core.Response RestFulApp.Crud.MyResource.create(int,int,int,int), parameters=[Parameter [type=int, source=animalname, defaultValue=null], Parameter [type=int, source=animaltype, defaultValue=null], Parameter [type=int, source=animalpassword, defaultValue=null], Parameter [type=int, source=animalemailid, defaultValue=null]], responseType=class javax.ws.rs.core.Response}, nameBindings=[]}']
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    deploy restapi as war into tomcat it's doesn't works

    GitHub | 4 months ago | Kerbores
    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']
  6. 0

    Crash when adding parameter that is a pojo

    Stack Overflow | 2 years ago | Jemil Riahi
    org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization. [[FATAL] No injection source found for a parameter of type public javax.ws.rs.core.Response com.car.resource.AdminResource.removeUser(com.car.core.User,java.lang.String) at index 0.; source='ResourceMethod{httpMethod=POST, consumedTypes=[application/json], producedTypes=[text/html], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.car.resource.AdminResource, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@74294c1a]}, definitionMethod=public javax.ws.rs.core.Response com.car.resource.AdminResource.removeUser(com.car.core.User,java.lang.String), parameters=[Parameter [type=class com.car.core.User, source=null, defaultValue=null], Parameter [type=class java.lang.String, source=null, defaultValue=null]], responseType=class javax.ws.rs.core.Response}, nameBindings=[]}']
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.glassfish.jersey.server.model.ModelValidationException

    Validation of the application resource model has failed during application initialization. [[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 java.util.List br.com.alexandreesl.handson.rest.ProductRest.getProducts() and public java.util.List br.com.alexandreesl.handson.rest.CustomerRest.getCustomers() at matching regular expression /. 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@14c14bf']

    at org.glassfish.jersey.server.ApplicationHandler.initialize()
  2. jersey-core-server
    ApplicationHandler$3.call
    1. org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:555)[jersey-server-2.23.1.jar:na]
    2. org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:184)[jersey-server-2.23.1.jar:na]
    3. org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350)[jersey-server-2.23.1.jar:na]
    4. org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347)[jersey-server-2.23.1.jar:na]
    4 frames
  3. Jersey Core
    Errors.processWithException
    1. org.glassfish.jersey.internal.Errors.process(Errors.java:315)[jersey-common-2.23.1.jar:na]
    2. org.glassfish.jersey.internal.Errors.process(Errors.java:297)[jersey-common-2.23.1.jar:na]
    3. org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255)[jersey-common-2.23.1.jar:na]
    3 frames
  4. jersey-core-server
    ApplicationHandler.<init>
    1. org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:347)[jersey-server-2.23.1.jar:na]
    1 frame
  5. jersey-container-servlet-core
    ServletContainer.init
    1. org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:392)[jersey-container-servlet-core-2.23.1.jar:na]
    2. org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177)[jersey-container-servlet-core-2.23.1.jar:na]
    3. org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)[jersey-container-servlet-core-2.23.1.jar:na]
    3 frames
  6. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:158)[tomcat-embed-core-8.5.4.jar:8.5.4]
    1 frame
  7. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1194)[tomcat-embed-core-8.5.4.jar:8.5.4]
    2. org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)[tomcat-embed-core-8.5.4.jar:8.5.4]
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)[tomcat-embed-core-8.5.4.jar:8.5.4]
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)[tomcat-embed-core-8.5.4.jar:8.5.4]
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)[tomcat-embed-core-8.5.4.jar:8.5.4]
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)[tomcat-embed-core-8.5.4.jar:8.5.4]
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[tomcat-embed-core-8.5.4.jar:8.5.4]
    8. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)[tomcat-embed-core-8.5.4.jar:8.5.4]
    9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)[tomcat-embed-core-8.5.4.jar:8.5.4]
    9 frames
  8. Grizzly HTTP
    SocketProcessorBase.run
    1. org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)[tomcat-embed-core-8.5.4.jar:8.5.4]
    2. org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)[tomcat-embed-core-8.5.4.jar:8.5.4]
    3. org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)[tomcat-embed-core-8.5.4.jar:8.5.4]
    4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)[tomcat-embed-core-8.5.4.jar:8.5.4]
    5. org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)[tomcat-embed-core-8.5.4.jar:8.5.4]
    5 frames
  9. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_102]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_102]
    2 frames
  10. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-8.5.4.jar:8.5.4]
    1 frame
  11. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_102]
    1 frame