The URL is the root URL for my web app, i.e. something like
myhost.org/FooApp   or myhost.org/FooApp/

The welcome-files entry in web.xml includes index.jsp, and that's what I'm expecting to run.  It's a fairly simple JSP, for what that's worth.

Also, the other JSPs in my webapp seem to run fine.


On Fri, Nov 7, 2008 at 9:45 AM, Kevan Miller <kevan.miller@gmail.com> wrote:
Hi Doug,


On Nov 7, 2008, at 1:29 AM, Doug Reeder wrote:

I have an app (developed in NetBeans) which passes all the verifier tests and runs fine in GlassFish.  I'm able to deploy and start it running in Geronimo (2.1.3, Jetty), but when I try to actually access one of the JSPs, I get the following error:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
       at java.lang.String.charAt(String.java:558)
       at org.apache.jasper.compiler.JspUtil.makeJavaIdentifier(JspUtil.java:962)
       at org.apache.jasper.JspCompilationContext.getServletClassName(JspCompilationContext.java:371)
       at org.apache.jasper.JspCompilationContext.getClassFileName(JspCompilationContext.java:511)
       at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:403)
       at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:351)
       at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:582)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
       at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
       at org.apache.geronimo.jetty6.InternalJettyServletHolder.handle(InternalJettyServletHolder.java:65)
       at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
       at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
       at org.apache.geronimo.jetty6.handler.JettySecurityHandler.handle(JettySecurityHandler.java:114)
       at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
       at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
       at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
       at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.access$101(TwistyWebAppContext.java:40)
       at org.apache.geronimo.jetty6.handler.TwistyWebAppContext$TwistyHandler.handle(TwistyWebAppContext.java:65)
       at org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.handle(ThreadClassloaderHandler.java:46)
       at org.apache.geronimo.jetty6.handler.InstanceContextHandler.handle(InstanceContextHandler.java:58)
       at org.apache.geronimo.jetty6.handler.UserTransactionHandler.handle(UserTransactionHandler.java:48)
       at org.apache.geronimo.jetty6.handler.ComponentContextHandler.handle(ComponentContextHandler.java:47)
       at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.handle(TwistyWebAppContext.java:59)
       at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
       at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
       at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
       at org.mortbay.jetty.Server.handle(Server.java:324)
       at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
       at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
       at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
       at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:214)
       at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:344)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:613)

1) Is there an analog to the verifier tool for Geronimo?

No.



2) Where should I be looking to fix this? None of the source code files in the stack trace are mine!

Tomcat source code, in this case. Jetty uses the Jasper compiler for JSP compilation. In particular -- http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/TOMCAT_6_0_18/java/org/apache/jasper/JspCompilationContext.java?revision=678601&view=markup

What's the URI of your JSP?

Tomcat is looking for the last '/' character in your URI, creating a substring based on the remainder of the URI, and trying to create a unique java classname based on this substring. In your case, the substring is a zero length string. Massaging your uri should work-around the problem...

--kevan