I am having the same issue with 1.0b21, I haven't yet been able to dig
into the issue however.

I am using Jetty 6.0 as the servlet engine, so I don't think it's
servlet container specific.

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Steffen Eichenberg
Sent: Tuesday, November 28, 2006 9:28 AM
To: [email protected]
Subject: NPE in b21 class com.noelios.restlet.http.HttpServerCall

Hello,


today i switched from b19 to b21 and found what seems like a new bug.

My application is running as a servlet in Tomcat 5.5. I am using the
standard ServerServlet, which redirects to my class which is derived
from Application.

When the first call is issued from my client to the server i am getting
the following stack trace:


java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        java.util.ArrayList.RangeCheck(ArrayList.java:547)
        java.util.ArrayList.get(ArrayList.java:322)
        
com.noelios.restlet.http.HttpServerCall.<init>(HttpServerCall.java:66)
        
com.noelios.restlet.ext.servlet.ServletCall.<init>(ServletCall.java:70)
        
com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java
:119)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



The code line is:

   setServerProtocol(server.getProtocols().get(0)); // Assumes that
server connectors support only one protocol


when guarding the line with a test for 'null', everything works just
fine.

  if ((server.getProtocols() != null) && 
      (server.getProtocols().size() > 0)) {
    setServerProtocol(server.getProtocols().get(0)); // Assumes that
server connectors support only one protocol
  } else {
    setServerProtocol(null);
  }


Is this a bug, or did i forgot to initialize something?


Ciao,
  Steffen

Reply via email to