Hello Katrin,
embedded glassfish support in jersey test framework is not complete yet
(and additionally it currently uses old non-final build).
I recommend using default grizzly container if it fits your needs. If
not.. well, you still can deploy on "full" glassfish and test your
resources/applications with something like:
mvn test
-Dtest.containerFactory=com.sun.jersey.test.framework.spi.container.external.ExternalTestContainerFactory
-DenableLogging -DJERSEY_HTTP_PORT=8080 -Ptest
or if you have some simple testcase, I can try run it with my
modifications and eventually provide it to you (create branch or
something like it, its not ready to trunk and additionally it needs jdk
1.6 and we didn't manage to figure out how to use it and keep jersey
usable/compilable on jdk 1.5).
Regards,
Pavel
Regards,
Pavel
Katrin Egle wrote:
> Hi,
>
> I'm trying to get the jersey-test-framework-1.1.2-ea with an embedded
> glassfish working. My problem is, that it seams that the server starts
> correctly, but then there is a UnsupportedOperationException:
> org.glassfish.embed.ScatteredArchive.entries(String) is not supported
> yet.
>
> Why does this method get called, when it is not supported yet?
>
> Here is my stack-trace:
> -------------------
> com.sun.jersey.test.framework.spi.container.TestContainerException:
> org.glassfish.embed.EmbeddedException:
> java.lang.UnsupportedOperationException:
> org.glassfish.embed.ScatteredArchive.entries(String) is not supported
> yet.
> at
> com.sun.jersey.test.framework.spi.container.embedded.glassfish.EmbeddedGlassFishTestContainerFactory$EmbeddedGlassFishTestContainer.start(EmbeddedGlassFishTestContainerFactory.java:141)
>
> at com.sun.jersey.test.framework.JerseyTest.setUp(JerseyTest.java:264)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> 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.RunBefores.evaluate(RunBefores.java:27)
>
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
>
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
>
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> 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.run(ParentRunner.java:220)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
>
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>
> Caused by: org.glassfish.embed.EmbeddedException:
> java.lang.UnsupportedOperationException:
> org.glassfish.embed.ScatteredArchive.entries(String) is not supported
> yet.
> at
> org.glassfish.embed.EmbeddedDeployer.deploy(EmbeddedDeployer.java:152)
> at
> com.sun.jersey.test.framework.spi.container.embedded.glassfish.EmbeddedGlassFishTestContainerFactory$EmbeddedGlassFishTestContainer.start(EmbeddedGlassFishTestContainerFactory.java:139)
>
> ... 24 more
> Caused by: java.lang.UnsupportedOperationException:
> org.glassfish.embed.ScatteredArchive.entries(String) is not supported
> yet.
> at
> org.glassfish.embed.ScatteredArchive.entries(ScatteredArchive.java:182)
> at
> org.glassfish.persistence.jpa.JPASniffer.handles(JPASniffer.java:82)
> at
> com.sun.enterprise.v3.server.SnifferManager.getSniffers(SnifferManager.java:127)
>
> at
> org.glassfish.embed.EmbeddedDeployer.deploy(EmbeddedDeployer.java:132)
> ... 25 more
> -----------
>
> I hope you can help me. If you need more information just let me know.
>
> Thanks,
> Katrin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>