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.insame.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=MethodHandler{handlerClass=class com.insame.service.UploadFileService, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@47bee27a]}, handlingMethod=public javax.ws.rs.core.Response com.insame.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=[]}']

Stack Overflow | Sami | 4 years 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

    Uploading file using Jersey over RESTfull service and The resource configuration is not modifiable?

    Stack Overflow | 4 years ago | Sami
    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.insame.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=MethodHandler{handlerClass=class com.insame.service.UploadFileService, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@47bee27a]}, handlingMethod=public javax.ws.rs.core.Response com.insame.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=[]}']
  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

    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=[]}']
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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=[]}']
  6. 0

    Web service deployment failed with error - [FATAL] No injection source found for a parameter of type

    Stack Overflow | 2 years ago | Shruthi Rao
    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 com.mystay.beans.wrapper.MyStayWrapper com.mystay.web.GenericResource.placeOrderForShService(java.io.InputStream,java.io.InputStream,com.sun.jersey.core.header.FormDataContentDisposition,com.sun.jersey.core.header.FormDataContentDisposition,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) at index 0.; source='ResourceMethod{httpMethod=POST, consumedTypes=[multipart/form-data], producedTypes=[application/json], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.mystay.web.GenericResource, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@5d63e264]}, definitionMethod=public com.mystay.beans.wrapper.MyStayWrapper com.mystay.web.GenericResource.placeOrderForShService(java.io.InputStream,java.io.InputStream,com.sun.jersey.core.header.FormDataContentDisposition,com.sun.jersey.core.header.FormDataContentDisposition,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String), parameters=[Parameter [type=class java.io.InputStream, source=image, defaultValue=null], Parameter [type=class java.io.InputStream, source=voice, defaultValue=null], Parameter [type=class com.sun.jersey.core.header.FormDataContentDisposition, source=image, defaultValue=null], Parameter [type=class com.sun.jersey.core.header.FormDataContentDisposition, source=voice, defaultValue=null], Parameter [type=class java.lang.String, source=reserId, defaultValue=null], Parameter [type=class java.lang.String, source=serId, defaultValue=null], Parameter [type=class java.lang.String, source=jsonValue, defaultValue=null], Parameter [type=class java.lang.String, source=MenuId, defaultValue=null], Parameter [type=class java.lang.String, source=totalCost, defaultValue=null], Parameter [type=class java.lang.String, source=token, defaultValue=null]], responseType=class com.mystay.beans.wrapper.MyStayWrapper}, nameBindings=[]}', [FATAL] No injection source found for a parameter of type public com.mystay.beans.wrapper.MyStayWrapper com.mystay.web.GenericResource.uploadFile(java.io.InputStream,java.io.InputStream,com.sun.jersey.core.header.FormDataContentDisposition,com.sun.jersey.core.header.FormDataContentDisposition,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) at index 0.; source='ResourceMethod{httpMethod=POST, consumedTypes=[multipart/form-data], producedTypes=[application/json], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.mystay.web.GenericResource, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@468a1fa3]}, definitionMethod=public com.mystay.beans.wrapper.MyStayWrapper com.mystay.web.GenericResource.uploadFile(java.io.InputStream,java.io.InputStream,com.sun.jersey.core.header.FormDataContentDisposition,com.sun.jersey.core.header.FormDataContentDisposition,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String), parameters=[Parameter [type=class java.io.InputStream, source=image, defaultValue=null], Parameter [type=class java.io.InputStream, source=voice, defaultValue=null], Parameter [type=class com.sun.jersey.core.header.FormDataContentDisposition, source=image, defaultValue=null], Parameter [type=class com.sun.jersey.core.header.FormDataContentDisposition, source=voice, defaultValue=null], Parameter [type=class java.lang.String, source=reserId, defaultValue=null], Parameter [type=class java.lang.String, source=serId, defaultValue=null], Parameter [type=class java.lang.String, source=locationCode, defaultValue=null], Parameter [type=class java.lang.String, source=reorder, defaultValue=null], Parameter [type=class java.lang.String, source=token, defaultValue=null]], responseType=class com.mystay.beans.wrapper.MyStayWrapper}, nameBindings=[]}', [FATAL] No injection source found for a parameter of type public com.mystay.beans.wrapper.MyStayWrapper com.mystay.web.GenericResource.uploadFile(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) at index 0.; source='ResourceMethod{httpMethod=POST, consumedTypes=[multipart/form-data], producedTypes=[application/json], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.mystay.web.GenericResource, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@4d4ac7c0]}, definitionMethod=public com.mystay.beans.wrapper.MyStayWrapper com.mystay.web.GenericResource.uploadFile(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String), parameters=[Parameter [type=class java.lang.String, source=serId, defaultValue=null], Parameter [type=class java.lang.String, source=amenities, defaultValue=null], Parameter [type=class java.lang.String, source=Capacity, defaultValue=null], Parameter [type=class java.lang.String, source=currentDate, defaultValue=null], Parameter [type=class java.lang.String, source=currentTime, defaultValue=null], Parameter [type=class java.lang.String, source=MenuId, defaultValue=null], Parameter [type=class java.lang.String, source=token, defaultValue=null]], responseType=class com.mystay.beans.wrapper.MyStayWrapper}, nameBindings=[]}', [FATAL] No injection source found for a parameter of type public com.mystay.beans.wrapper.MyStayWrapper com.mystay.web.GenericResource.insertReservationByUser(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) at index 0.; source='ResourceMethod{httpMethod=POST, consumedTypes=[multipart/form-data], producedTypes=[application/json], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.mystay.web.GenericResource, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@1624152d]}, definitionMethod=public com.mystay.beans.wrapper.MyStayWrapper com.mystay.web.GenericResource.insertReservationByUser(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String), parameters=[Parameter [type=class java.lang.String, source=propertyId, defaultValue=null], Parameter [type=class java.lang.String, source=FirstName, defaultValue=null], Parameter [type=class java.lang.String, source=LastName, defaultValue=null], Parameter [type=class java.lang.String, source=CheckInDate, defaultValue=null], Parameter [type=class java.lang.String, source=NumberOfNights, defaultValue=null], Parameter [type=class java.lang.String, source=EmailId, defaultValue=null], Parameter [type=class java.lang.String, source=PropertyName, defaultValue=null], Parameter [type=class java.lang.String, source=token, defaultValue=null]], responseType=class com.mystay.beans.wrapper.MyStayWrapper}, 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 javax.ws.rs.core.Response com.insame.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=MethodHandler{handlerClass=class com.insame.service.UploadFileService, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@47bee27a]}, handlingMethod=public javax.ws.rs.core.Response com.insame.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=[]}']

    at org.glassfish.jersey.server.ApplicationHandler.initialize()
  2. jersey-core-server
    ApplicationHandler$3.run
    1. org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:410)
    2. org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:157)
    3. org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:280)
    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:277)
    1 frame
  5. jersey-container-servlet-core
    ServletContainer.init
    1. org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:262)
    2. org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167)
    2 frames