문제

I have an application with a working setup including jersey-1.12 and grizzly 2.3.

Jersey-test-framework-grizzly2 version 1.12 works fine with grizzly 2.3

However when I tried updating all the jersey-related jars to 1.18 I've run into a:

10:32:01     [junit] java.lang.NoClassDefFoundError: org/glassfish/grizzly/servlet/DispatcherType
10:32:01     [junit]    at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.grizzlyDispatcherTypes(GrizzlyWebTestContainerFactory.java:264)
10:32:01     [junit]    at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.instantiateGrizzlyWebServer(GrizzlyWebTestContainerFactory.java:248)
10:32:01     [junit]    at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.<init>(GrizzlyWebTestContainerFactory.java:145)
10:32:01     [junit]    at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.<init>(GrizzlyWebTestContainerFactory.java:102)
10:32:01     [junit]    at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory.create(GrizzlyWebTestContainerFactory.java:95)
10:32:01     [junit]    at com.sun.jersey.test.framework.JerseyTest.getContainer(JerseyTest.java:347)
10:32:01     [junit]    at com.sun.jersey.test.framework.JerseyTest.<init>(JerseyTest.java:170)

Apparently the jersey-test-framework-grizzly2-1.18 version imports the DispatcherType class, which is only present in grizzly 2.2.x, thus making it unusable with any other version (thus an later version is only compatible with earlier dependency)

What are my options here? Is the DispatcherType included somewhere else in grizzly 2.3+? Can I use older (1.17 doesn't appear to have this import) version of jersey-test-framework with more recent main jars? Am I forced to downgrade grizzly to 2.2.x to upgrade jersey?

도움이 되었습니까?

해결책

So far downgrading grizzly to 2.2.21 is working fine. I was unable to find a way to get jersey-1.18 to work with grizzly 2.3

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top