try following:
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-grizzly2</artifactId>
<version>1.8</version>
</dependency>
artifactId should be "jersey-grizzly2", not jersey-grizzly (you are
using grizzly 2.x api; grizzly 1.x can still be used but starting the
server is slightly different - if you want/need to use grizzly 1.x see
helloworld sample from jersey 1.6 or maybe even older).
Regards,
Pavel
On 7/27/11 12:32 AM, Peter Tap wrote:
>
> Folks,
>
> I am trying to host Grizzly HTTP server for my Jersey-based Web
> service. Following the "Hello World" sample at jersey.java.net, I have
> added the following dependency in my Maven pom.xml file:
>
> <dependency>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-grizzly</artifactId>
> <version>1.8</version>
> </dependency>
>
> However, during the build I get the following error:
>
> The type com.sun.grizzly.http.SelectorThread cannot be resolved. It is
> indirectly referenced from required .class files.
>
> The line this error is reported at is the following:
>
> HttpServer server =
> GrizzlyWebContainerFactory.create("http://0.0.0.0:8083/MyTest",
> initParams);
>
> Can someone please tell me if there is another Maven dependency I need
> to add?
>
> Thank you in advance for your help.
>
> Regards,
> Peter
>
>
>