It seems like some of the jersey template related stuff is too magical. It
would be far better if path resolution was required to be explicitly
defined in the code, such as @Template (autoResolve = true) or something
like that. Even though I read the docs, it wasn't obvious that it was
resolving to package/Class/index.jsp by default, for example. So, even
running it in tomcat, and it still didn't work.
I was posting on the wrong thread. This is related to this thread...
I'm going to see if I can define exactly why I couldn't figure it out
initially, so that perhaps I can suggest an update to the docs. But, one
of the aspects of it not working, leading me in wild goose chase, was that
the grizzly container does not work with templates.
Was it not working with the light weight containers documented anywhere in
the docs? It certainly doesn't appear that it was.
Okay, I saw two warnings in the entire user guide. One of them was...
Warning
Do not use ApacheConnectorProvider nor GrizzlyConnectorProvider neither
JettyConnectorProvider connector implementations with Jersey Multipart
features. See Header modification issue
<
https://jersey.java.net/documentation/latest/user-guide.html#connectors.warning>
warning
for more details.
So, there should probably be one similar to that at the top of the MVC
section, saying something like...
Warning
Do not use ApacheConnectorProvider nor GrizzlyConnectorProvider neither
JettyConnectorProvider connector implementations with Jersey MVC features.
The Templates engines will not work with the light weight http containers.
Add some other Jersey related technical babble to explain.
I am of course referring to putting that at the top of this section...
https://jersey.java.net/documentation/latest/user-guide.html#mvc
Also, wherever it says "@Template("index.foo")", is completely wrong, and
it won't compile.
This works...
@GET
@Template(name = "index2.jsp")
public String getTemplate()
{
return "mymodel";
}
But this does not...
@GET
@Template("index2.jsp")
public String getTemplate()
{
return "mymodel";
}
Yet all the documentation uses the latter one.
On Fri, Feb 19, 2016 at 5:54 PM, Trenton D. Adams <trenton.d.adams_at_gmail.com
> wrote:
> Good day,
>
> I've followed the guide, and see no indication on how to get rid of my
> errors.
>
> I have done the following...
>
> 1. Setup jersey as a filter
> 2. added
>
> <init-param>
> <param-name>jersey.config.server.provider.classnames</param-name>
> <param-value>org.glassfish.jersey.server.mvc.jsp.JspMvcFeature</param-value>
> </init-param>
>
> 3. added the following in my resource config
>
> property(MvcFeature.TEMPLATE_BASE_PATH, "/WEB-INF/jsp");
> register(JspMvcFeature.class);
>
> 4. added the following to my resource class...
>
> @GET
> @Produces(MediaType.TEXT_HTML)
> @Path("/index")
> public Viewable getTemplate()
> {
> return new Viewable("/index.jsp", "mymodel");
> }
>
> 5. added the following to my pom.xml...
>
> <dependency>
> <groupId>org.glassfish.jersey.ext</groupId>
> <artifactId>jersey-mvc-jsp</artifactId>
> <version>${jersey.version}</version>
> </dependency>
>
>
> And all I get when my unit test tries to call /myresource/index is the
> following. Any help would be appreciated...
>
>
> [17:50:34 trenta_at_developer-VirtualBox ~/java/simple-service]
> $ mvn clean install
> [INFO] Scanning for projects...
> [INFO]
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building simple-service 1.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ simple-service
> ---
> [INFO] Deleting
> /home/trenta/LocalDocuments/development/java/simple-service/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
> simple-service ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> /home/trenta/LocalDocuments/development/java/simple-service/src/main/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
> simple-service ---
> [INFO] Compiling 6 source files to
> /home/trenta/LocalDocuments/development/java/simple-service/target/classes
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:testResources
> (default-testResources) @ simple-service ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> /home/trenta/LocalDocuments/development/java/simple-service/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @
> simple-service ---
> [INFO] Compiling 1 source file to
> /home/trenta/LocalDocuments/development/java/simple-service/target/test-classes
> [INFO]
> [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @
> simple-service ---
> [INFO] Surefire report directory:
> /home/trenta/LocalDocuments/development/java/simple-service/target/surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running com.example.MyResourceTest
> Feb 19, 2016 5:50:55 PM org.glassfish.grizzly.http.server.NetworkListener
> start
> INFO: Started listener bound to [localhost:9090]
> Feb 19, 2016 5:50:55 PM org.glassfish.grizzly.http.server.HttpServer start
> INFO: [HttpServer] Started.
> Feb 19, 2016 5:50:55 PM org.glassfish.grizzly.http.server.NetworkListener
> shutdownNow
> INFO: Stopped listener bound to [localhost:9090]
> Feb 19, 2016 5:50:55 PM org.glassfish.grizzly.http.server.NetworkListener
> start
> INFO: Started listener bound to [localhost:9090]
> Feb 19, 2016 5:50:55 PM org.glassfish.grizzly.http.server.HttpServer start
> INFO: [HttpServer-1] Started.
> Feb 19, 2016 5:50:55 PM org.glassfish.jersey.internal.Errors logErrors
> WARNING: The following warnings have been detected: WARNING: Unknown HK2
> failure detected:
> MultiException stack 1 of 3
> org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object
> available for injection at
> SystemInjecteeImpl(requiredType=ServletContext,parent=JspTemplateProcessor,qualifiers={},position=1,optional=false,self=false,unqualified=null,1683449129)
> at
> org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:75)
> at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:211)
> at
> org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:228)
> at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357)
> at
> org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
> at
> org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
> at
> org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
> at
> org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
> at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
> at
> org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
> at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
> at
> org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
> at
> org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
> at
> org.glassfish.jersey.internal.inject.ProviderToService.apply(ProviderToService.java:58)
> at
> org.glassfish.jersey.internal.inject.ProviderToService.apply(ProviderToService.java:54)
> at
> jersey.repackaged.com.google.common.collect.Iterators$8.transform(Iterators.java:799)
> at
> jersey.repackaged.com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
> at java.util.AbstractCollection.addAll(AbstractCollection.java:341)
> at java.util.LinkedHashSet.<init>(LinkedHashSet.java:169)
> at
> jersey.repackaged.com.google.common.collect.Sets.newLinkedHashSet(Sets.java:325)
> at
> org.glassfish.jersey.internal.inject.Providers.getClasses(Providers.java:392)
> at
> org.glassfish.jersey.internal.inject.Providers.getCustomProviders(Providers.java:202)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.getTemplateProcessors(ViewableMessageBodyWriter.java:215)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.resolve(ViewableMessageBodyWriter.java:152)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:127)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:88)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.server.mvc.internal.TemplateMethodInterceptor.aroundWriteTo(TemplateMethodInterceptor.java:77)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:711)
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
> at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
> at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
> at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
> 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.process(Errors.java:267)
> at
> org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
> at
> org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
> at
> org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
> at
> org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
> at
> org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224)
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
> at java.lang.Thread.run(Thread.java:745)
> MultiException stack 2 of 3
> java.lang.IllegalArgumentException: While attempting to resolve the
> dependencies of org.glassfish.jersey.server.mvc.jsp.JspTemplateProcessor
> errors were found
> at
> org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:246)
> at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357)
> at
> org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
> at
> org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
> at
> org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
> at
> org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
> at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
> at
> org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
> at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
> at
> org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
> at
> org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
> at
> org.glassfish.jersey.internal.inject.ProviderToService.apply(ProviderToService.java:58)
> at
> org.glassfish.jersey.internal.inject.ProviderToService.apply(ProviderToService.java:54)
> at
> jersey.repackaged.com.google.common.collect.Iterators$8.transform(Iterators.java:799)
> at
> jersey.repackaged.com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
> at java.util.AbstractCollection.addAll(AbstractCollection.java:341)
> at java.util.LinkedHashSet.<init>(LinkedHashSet.java:169)
> at
> jersey.repackaged.com.google.common.collect.Sets.newLinkedHashSet(Sets.java:325)
> at
> org.glassfish.jersey.internal.inject.Providers.getClasses(Providers.java:392)
> at
> org.glassfish.jersey.internal.inject.Providers.getCustomProviders(Providers.java:202)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.getTemplateProcessors(ViewableMessageBodyWriter.java:215)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.resolve(ViewableMessageBodyWriter.java:152)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:127)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:88)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.server.mvc.internal.TemplateMethodInterceptor.aroundWriteTo(TemplateMethodInterceptor.java:77)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:711)
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
> at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
> at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
> at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
> 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.process(Errors.java:267)
> at
> org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
> at
> org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
> at
> org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
> at
> org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
> at
> org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224)
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
> at java.lang.Thread.run(Thread.java:745)
> MultiException stack 3 of 3
> java.lang.IllegalStateException: Unable to perform operation: resolve on
> org.glassfish.jersey.server.mvc.jsp.JspTemplateProcessor
> at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:386)
> at
> org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
> at
> org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
> at
> org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
> at
> org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
> at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
> at
> org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
> at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
> at
> org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
> at
> org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
> at
> org.glassfish.jersey.internal.inject.ProviderToService.apply(ProviderToService.java:58)
> at
> org.glassfish.jersey.internal.inject.ProviderToService.apply(ProviderToService.java:54)
> at
> jersey.repackaged.com.google.common.collect.Iterators$8.transform(Iterators.java:799)
> at
> jersey.repackaged.com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
> at java.util.AbstractCollection.addAll(AbstractCollection.java:341)
> at java.util.LinkedHashSet.<init>(LinkedHashSet.java:169)
> at
> jersey.repackaged.com.google.common.collect.Sets.newLinkedHashSet(Sets.java:325)
> at
> org.glassfish.jersey.internal.inject.Providers.getClasses(Providers.java:392)
> at
> org.glassfish.jersey.internal.inject.Providers.getCustomProviders(Providers.java:202)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.getTemplateProcessors(ViewableMessageBodyWriter.java:215)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.resolve(ViewableMessageBodyWriter.java:152)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:127)
> at
> org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:88)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.server.mvc.internal.TemplateMethodInterceptor.aroundWriteTo(TemplateMethodInterceptor.java:77)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86)
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
> at
> org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:711)
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
> at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
> at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
> at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
> 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.process(Errors.java:267)
> at
> org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
> at
> org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
> at
> org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
> at
> org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
> at
> org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224)
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
> at java.lang.Thread.run(Thread.java:745)
>
>
> Feb 19, 2016 5:50:55 PM org.glassfish.grizzly.http.server.NetworkListener
> shutdownNow
> INFO: Stopped listener bound to [localhost:9090]
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.144 sec
> <<< FAILURE!
> testIndex(com.example.MyResourceTest) Time elapsed: 0.177 sec <<< ERROR!
> javax.ws.rs.InternalServerErrorException: HTTP 500 Request failed.
> at
> org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1020)
> at
> org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816)
> at
> org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92)
> at
> org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:700)
> 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.process(Errors.java:228)
> at
> org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
> at
> org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:696)
> at
> org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:420)
> at
> org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:316)
> at com.example.MyResourceTest.testIndex(MyResourceTest.java:62)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
> at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
> at
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
> at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
>
>