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=[]}']

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web33

Stack trace

  • 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(ApplicationHandler.java:502) at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:166) at org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:327) at org.glassfish.jersey.internal.Errors$2.call(Errors.java:289) at org.glassfish.jersey.internal.Errors$2.call(Errors.java:286) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:286) at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:324) at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:336) at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:170) at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:358) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1031) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4914) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5201) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitor2 times, last one
Unknown visitor
Unknown visitorOnce,
25 more bugmates