velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
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...

Thanks.

geir

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(VelocityServlet.java:194)
>         at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
>         at org.apache.tomcat.core.Handler.init(Handler.java:215)
>         at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
>         at org.apache.tomcat.core.Handler.service(Handler.java:254)
>         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>         at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
>         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:210)
>         at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>         at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>         at java.lang.Thread.run(Unknown 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.                               geirm@optonline.com
Developing for the web?  See http://jakarta.apache.org/velocity/

Mime
View raw message