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 java.lang.String com.thincserver.test.UserReport.getUserData(java.lang.String,int) at index 0.; source='ResourceMethod{httpMethod=GET, consumedTypes=[], producedTypes=[], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.thincserver.test.UserReport, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@1a1d2fe0]}, definitionMethod=public java.lang.String com.thincserver.test.UserReport.getUserData(java.lang.String,int), parameters=[Parameter [type=class java.lang.String, source=data_type, defaultValue=null], Parameter [type=int, source=userId, defaultValue=null]], responseType=class java.lang.String}, nameBindings=[]}']

Stack Overflow | Stack | 1 year 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

    Rest ModelValidationException exception for String parameter

    Stack Overflow | 1 year ago | Stack
    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 java.lang.String com.thincserver.test.UserReport.getUserData(java.lang.String,int) at index 0.; source='ResourceMethod{httpMethod=GET, consumedTypes=[], producedTypes=[], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.thincserver.test.UserReport, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@1a1d2fe0]}, definitionMethod=public java.lang.String com.thincserver.test.UserReport.getUserData(java.lang.String,int), parameters=[Parameter [type=class java.lang.String, source=data_type, defaultValue=null], Parameter [type=int, source=userId, defaultValue=null]], responseType=class java.lang.String}, nameBindings=[]}']
  2. 0

    No injection source found for a parameter of type public javax.ws.rs.core.Response

    GitHub | 3 years ago | salimane
    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.salimane.swagger.api.resource.v1.UserResource.createUser2(java.lang.String,com.salimane.swagger.api.model.User,java.util.List) at index 1.; source='ResourceMethod{httpMethod=POST, consumedTypes=[], producedTypes=[application/json, application/xml], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.salimane.swagger.api.resource.v1.UserResource, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@1cab6b8]}, handlingMethod=public javax.ws.rs.core.Response com.salimane.swagger.api.resource.v1.UserResource.createUser2(java.lang.String,com.salimane.swagger.api.model.User,java.util.List), parameters=[Parameter [type=class java.lang.String, source=username, defaultValue=null], Parameter [type=class com.salimane.swagger.api.model.User, source=Created user object, defaultValue=null], Parameter [type=interface java.util.List, source=List of user object, defaultValue=null]], responseType=class javax.ws.rs.core.Response}, nameBindings=[]}', [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 javax.ws.rs.core.Response com.salimane.swagger.api.resource.v1.UserResource.createUser2(java.lang.String,com.salimane.swagger.api.model.User,java.util.List) and public javax.ws.rs.core.Response com.salimane.swagger.api.resource.v1.UserResource.createUser(com.salimane.swagger.api.model.User) at matching regular expression /v1/user. 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@23a1eaf3']
  3. 0

    Jersey: The requested resource is not available | Social marketing - SEO and Inbound Marketing

    gseosem.com | 2 years 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.lang.String org.test.messanger.MessageResource.getIt() and public java.lang.String org.test.messanger.MyResource.getIt() at matching regular expression /messages. 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@200a28e2']
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Probleme with my Servlet and @FormDataParam Jersey

    Stack Overflow | 2 years ago
    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 java.lang.String fr.checksem.semrecsys.Gestion.insertSKOS(java.io.InputStream,org.openrdf.rio.RDFFormat) at index 0.; source='ResourceMethod{httpMethod=POST, consumedTypes=[multipart/form-data], producedTypes=[text/plain; charset=utf-8], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class fr.checksem.semrecsys.Gestion, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@1a533161]}, definitionMethod=public java.lang.String fr.checksem.semrecsys.Gestion.insertSKOS(java.io.InputStream,org.openrdf.rio.RDFFormat), parameters=[Parameter [type=class java.io.InputStream, source=fichier, defaultValue=null], Parameter [type=class org.openrdf.rio.RDFFormat, source=Format, defaultValue=null]], responseType=class java.lang.String}, nameBindings=[]}']
  6. 0

    MULTIPART_FORM_DATA: No injection source found for a parameter of type public javax.ws.rs.core.Response

    Stack Overflow | 2 years ago | Swarup Saha
    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.jerser.service.UploadFileService.uploadFile(java.io.InputStream,com.sun.jersey.core.header.FormDataContentDisposition) at index 0.; source='ResourceMethod{httpMethod=POST, consumedTypes=[multipart/form-data], producedTypes=[], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.jerser.service.UploadFileService, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@d3e2d4]}, definitionMethod=public javax.ws.rs.core.Response com.jerser.service.UploadFileService.uploadFile(java.io.InputStream,com.sun.jersey.core.header.FormDataContentDisposition), parameters=[Parameter [type=class java.io.InputStream, source=file, defaultValue=null], Parameter [type=class com.sun.jersey.core.header.FormDataContentDisposition, source=file, 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] No injection source found for a parameter of type public java.lang.String com.thincserver.test.UserReport.getUserData(java.lang.String,int) at index 0.; source='ResourceMethod{httpMethod=GET, consumedTypes=[], producedTypes=[], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.thincserver.test.UserReport, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@1a1d2fe0]}, definitionMethod=public java.lang.String com.thincserver.test.UserReport.getUserData(java.lang.String,int), parameters=[Parameter [type=class java.lang.String, source=data_type, defaultValue=null], Parameter [type=int, source=userId, defaultValue=null]], responseType=class java.lang.String}, nameBindings=[]}']

    at org.glassfish.jersey.server.ApplicationHandler.initialize()
  2. jersey-core-server
    ApplicationHandler$3.run
    1. org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:502)
    2. org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:166)
    3. org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:327)
    3 frames
  3. Jersey Core
    Errors.processWithException
    1. org.glassfish.jersey.internal.Errors$2.call(Errors.java:289)
    2. org.glassfish.jersey.internal.Errors$2.call(Errors.java:286)
    3. org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    4. org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    5. org.glassfish.jersey.internal.Errors.processWithException(Errors.java:286)
    5 frames
  4. jersey-core-server
    ApplicationHandler.<init>
    1. org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:324)
    1 frame
  5. jersey-container-servlet-core
    ServletContainer.init
    1. org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:336)
    2. org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:170)
    3. org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:358)
    3 frames
  6. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:158)
    1 frame
  7. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
    2. org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
    3. org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1031)
    4. org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4914)
    5. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5201)
    6. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    7. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    8. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    8 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames