users@grizzly.java.net

Re: grizzly , servlet 3.0 and maven 2

From: Rajiv Mordani <rajiv.mordani_at_sun.com>
Date: Tue, 17 Mar 2009 10:23:23 -0700
Hi Harsha,
    We will start publishing the servlet 3.0 API jars to maven soon. Jeanfrancois will reply to the other issue of updating the implementation.

Thanks

- Rajiv

harsha aswath wrote:
Hi,

I am trying to use grizzly 1.9.9 with servlet 3.0 api . I could not find the servlet api 3.0 jars in the java.net maven repository. I found one version in http://download.java.net/maven/glassfish/org/glassfish/javax.servlet/ which I assume is the version used in glassfish. With this I get the following error

java.lang.AbstractMethodError: com.sun.grizzly.http.servlet.HttpServletRequestImpl.isInitial()Z
at com.server.grizzly.GrizzlyServiceHandler.service(GrizzlyServiceHandler.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:188)
at com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:137)
at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:278)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:726)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:615)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:895)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:162)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

My class looks like this

public class GrizzlyServiceHandler extends HttpServlet {
    @Override
    public void service(HttpServletRequest request, HttpServletResponse response) {
if (request.isInitial()) {



and I start grizzly with the following code 


GrizzlyWebServer server = ...;
GrizzlyAdapter adapter =...;
server.addGrizzlyAdapter(adapter,new String[]{"/"});
server.start();



I then observed that grizzly is using servlet 2.5 . I made sure that servlet 3.0 is in the classpath, I get this error. Is there a clean grizzly example which works with servlet 3.0 apis ?

java.lang.AbstractMethodError: com.sun.grizzly.http.servlet.HttpServletRequestImpl.isAsyncStarted()Z
        at com.server.grizzly.GrizzlyServiceHandler.service(GrizzlyServiceHandler.java:24)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:188)
        at com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:137)
        at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:278)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:726)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:615)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:895)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:162)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

Thanks
Harsha