velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <>
Subject Re: uhm, it seems like there's a problem
Date Tue, 06 Mar 2001 16:27:11 GMT

Hm - There is only one instance of the Velocity Runtime in a servlet's
webapp - you should be able to call init() until the cows come home -
only the first should 'take' and the rest should do nothing.

I assume that you are using something like Tomcat 3.2 or so, and those
servlets were in the same webapp?

I will make sure my tree is refreshed, and see what's up...



David Esposito wrote:
> When I just ran all of my tests on last night's build, I was only testing
> one of my servlets ... so it ran init() only once ... but I just tried to
> run another servlet and I get a
> javax.servlet.ServletException: Error configuring the loader:
> java.lang.ClassCastException: default.contentType doesn't map to a String
> object
>         at
> org.apache.velocity.servlet.VelocityServlet.init(
>         at org.apache.tomcat.core.ServletWrapper.doInit(
>         at org.apache.tomcat.core.Handler.init(
>         at org.apache.tomcat.core.ServletWrapper.init(
>         at org.apache.tomcat.core.Handler.service(
>         at org.apache.tomcat.core.ServletWrapper.service(
>         at
> org.apache.tomcat.core.ContextManager.internalService(
> 7)
>         at org.apache.tomcat.core.ContextManager.service(
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
>         at
> org.apache.tomcat.service.TcpWorkerThread.runIt(
>         at
> org.apache.tomcat.util.ThreadPool$
>         at Source)
> If I stop and restart my JVM, each servlet works fine ... it seems like
> there is something wrong with the way that the first call to init() leaves
> velocity and therefore it crashes on each subsequent call to Velocity's
> init() ...

Geir Magnusson Jr.                     
Developing for the web?  See

View raw message