You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jon Stevens <jo...@latchkey.com> on 2001/01/04 01:24:24 UTC

messing around

Craig,

Ok, so I just decided to mess around with the URI a bit and just got this
interesting error. If you want to play around, the setup is the *same* as
what is in Scarab's CVS.

URL attempted:

http://localhost:8080/servlet/scarab/template/Register.vm

Error:

A Servlet Exception Has Occurred

Exception Report:

javax.servlet.ServletException: Class org.apache.turbine.Turbine is not a
Servlet
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:743)
        at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:544)
        at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:552)
        at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:321)
        at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:236)
        at 
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:386)
        at 
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:144)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:215)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:251)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:196)
        at 
org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:464)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
        at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161
)
        at 
org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
        at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:159)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
        at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
818)
        at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897)
        at java.lang.Thread.run(Thread.java:484)

Root Cause:

java.lang.ClassCastException: org.apache.turbine.Turbine
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:740)
        at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:544)
        at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:552)
        at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:321)
        at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:236)
        at 
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:386)
        at 
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:144)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:215)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:251)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:196)
        at 
org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:464)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
        at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161
)
        at 
org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
        at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:159)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
        at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
818)
        at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897)
        at java.lang.Thread.run(Thread.java:484)



Re: messing around

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Jon Stevens wrote:

> Craig,
>
> Ok, so I just decided to mess around with the URI a bit and just got this
> interesting error. If you want to play around, the setup is the *same* as
> what is in Scarab's CVS.
>
> URL attempted:
>
> http://localhost:8080/servlet/scarab/template/Register.vm
>
> Error:
>
> A Servlet Exception Has Occurred
>
> Exception Report:
>
> javax.servlet.ServletException: Class org.apache.turbine.Turbine is not a
> Servlet
>

Fixed.  The problem was a little more subtle than I first thought ... the parent
class loader (which, among other things, makes the servlet API classes
available) of the webapp class loader was not getting initialized correctly when
you put your own <Loader> element in server.xml.  This works now.

Craig





Re: messing around

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Jon Stevens wrote:

> Craig,
>
> Ok, so I just decided to mess around with the URI a bit and just got this
> interesting error. If you want to play around, the setup is the *same* as
> what is in Scarab's CVS.
>
> URL attempted:
>
> http://localhost:8080/servlet/scarab/template/Register.vm
>
> Error:
>
> A Servlet Exception Has Occurred
>
> Exception Report:
>
> javax.servlet.ServletException: Class org.apache.turbine.Turbine is not a
> Servlet
>

Fixed.  The problem was a little more subtle than I first thought ... the parent
class loader (which, among other things, makes the servlet API classes
available) of the webapp class loader was not getting initialized correctly when
you put your own <Loader> element in server.xml.  This works now.

Craig

Re: messing around

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Jon Stevens wrote:

> Now I get this:
>
> HTTP Status 500 - No Context configured to process this
> request
>
> Using this url:
>
> http://localhost:8080/servlet/scarab/template/Register.vm
>

This URL wants the root context, because there is no "/scarab"prefix on the front.

>
> And this in my server.xml:
>
>         <Context path="/scarab" docBase="scarab" reloadable="true">
>            <!-- <Loader checkInterval="3"
>                 className="org.apache.catalina.loader.StandardLoader"/> -->
>         </Context>
>

And this path means you are defining a context at path "/scarab" and therefore no
root webapp exists.  Go back to path="" and this will work.  (Or, add "/scarab" to
the front of the URI.)

>
> Again, you can always do your own testing by checking out the Scarab CVS
> sandbox. :-)
>

I'm using it.

The problem is that when you use <Loader> yourself, the parent class loader is not
getting initialized.  Fix is in the process of getting debugged.

>
> -jon (feeling like a bleeding edge bug finder) stevens
>

Craig



Re: messing around

Posted by Jon Stevens <jo...@latchkey.com>.
on 1/3/2001 7:07 PM, "Jon Stevens" <jo...@latchkey.com> wrote:

> Now I get this:
> 
> HTTP Status 500 - No Context configured to process this
> request
> 
> Using this url:
> 
> http://localhost:8080/servlet/scarab/template/Register.vm
> 
> And this in my server.xml:
> 
> <Context path="/scarab" docBase="scarab" reloadable="true">
> <!-- <Loader checkInterval="3"
> className="org.apache.catalina.loader.StandardLoader"/> -->
> </Context>
> 
> 
> Again, you can always do your own testing by checking out the Scarab CVS
> sandbox. :-)
> 
> -jon (feeling like a bleeding edge bug finder) stevens

p.s. Using this URI:

http://localhost:8080/scarab/servlet/scarab/template/Register.vm

things work just fine and Turbine's internal URI management handles
navigation just fine.

-jon

-- 
Honk if you love peace and quiet.



Re: messing around

Posted by Jon Stevens <jo...@latchkey.com>.
Now I get this:

HTTP Status 500 - No Context configured to process this
request

Using this url:

http://localhost:8080/servlet/scarab/template/Register.vm

And this in my server.xml:

        <Context path="/scarab" docBase="scarab" reloadable="true">
           <!-- <Loader checkInterval="3"
                className="org.apache.catalina.loader.StandardLoader"/> -->
        </Context>


Again, you can always do your own testing by checking out the Scarab CVS
sandbox. :-)

-jon (feeling like a bleeding edge bug finder) stevens


on 1/3/2001 6:09 PM, "Craig R. McClanahan" <Cr...@eng.sun.com>
wrote:

> Jon Stevens wrote:
> 
>> Craig,
>> 
>> Ok, so I just decided to mess around with the URI a bit and just got this
>> interesting error. If you want to play around, the setup is the *same* as
>> what is in Scarab's CVS.
>> 
>> URL attempted:
>> 
>> http://localhost:8080/servlet/scarab/template/Register.vm
>> 
>> Error:
>> 
>> A Servlet Exception Has Occurred
>> 
>> Exception Report:
>> 
>> javax.servlet.ServletException: Class org.apache.turbine.Turbine is not a
>> Servlet
>> 
> 
> Could you do me a favor and try it with the <Loader> entry in conf/server.xml
> commented out?  It worked for me when I did that, which means something odd is
> going on when configuring a loader by hand versus the defaults.  That is going
> to take a little more digging to understand, but I'll figure it out
> eventually.
> 
> Craig
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org
> 

-- 
Honk if you love peace and quiet.



Re: messing around

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Jon Stevens wrote:

> Craig,
>
> Ok, so I just decided to mess around with the URI a bit and just got this
> interesting error. If you want to play around, the setup is the *same* as
> what is in Scarab's CVS.
>
> URL attempted:
>
> http://localhost:8080/servlet/scarab/template/Register.vm
>
> Error:
>
> A Servlet Exception Has Occurred
>
> Exception Report:
>
> javax.servlet.ServletException: Class org.apache.turbine.Turbine is not a
> Servlet
>

Could you do me a favor and try it with the <Loader> entry in conf/server.xml
commented out?  It worked for me when I did that, which means something odd is
going on when configuring a loader by hand versus the defaults.  That is going
to take a little more digging to understand, but I'll figure it out eventually.

Craig