You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Rich Baldwin <Ri...@noaa.gov> on 2002/01/16 23:07:19 UTC

Don't understand why velocity won't work

I'm trying to get the 1st 2 servlet examples to work.  I have looked
through the velocity users list and the
readme files checking and rechecking possible errors (ie. properties
files, jar file location, web.xml file,
classes, etc.).  Can't seem to figure this one out.

When I go to http://my.ip.com:8080/velexample/servlet/SampleServlet, I
get an empty/blank page
returned.  Nothing gets logged in the ~/webapp/velexample/velocity.log
file.  In the catalina.out file
I get the following error logged.  Any suggestions to the cause of this
one?

Thanks!!! Rich

catalina.out>
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
java.lang.ClassCastException: java.util.Vector
java.lang.ClassCastException: java.util.Vector
        at
org.apache.velocity.runtime.log.LogManager.createLogSystem(LogManager.java:9

9)
        at
org.apache.velocity.runtime.RuntimeInstance.initializeLogger(RuntimeInstance

.java:468)
        at
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:259)

        at
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:438)

        at
org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:260)

        at org.apache.velocity.app.Velocity.init(Velocity.java:149)
        at
org.apache.velocity.servlet.VelocityServlet.init(VelocityServlet.java:205)

        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
        at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)

        at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java

:396)
        at
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja

va:243)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja

va:201)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)

        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164

)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.

java:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170

        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)

        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java

:163)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:

1011)
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106

)
        at java.lang.Thread.run(Thread.java:484)
SampleServlet : template not found
org.apache.velocity.exception.ResourceNotFoundExcept
ion: Unable to find resource 'sample.vm'






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Don't understand why velocity won't work

Posted by Gabriel Sidler <si...@teamup.ch>.
Don't have a solution, but have you noticed the end
of the error message:

> >       at java.lang.Thread.run(Thread.java:484)
> > SampleServlet : template not found
> > org.apache.velocity.exception.ResourceNotFoundExcept
> > ion: Unable to find resource 'sample.vm'

Gabe


--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Don't understand why velocity won't work

Posted by "Geir Magnusson Jr." <ge...@earthlink.net>.
I'll try and repeat the problem.  Just to make sure, you are using vel 1.2,
release distro ?



On 1/16/02 5:07 PM, "Rich Baldwin" <Ri...@noaa.gov> wrote:

> I'm trying to get the 1st 2 servlet examples to work.  I have looked
> through the velocity users list and the
> readme files checking and rechecking possible errors (ie. properties
> files, jar file location, web.xml file,
> classes, etc.).  Can't seem to figure this one out.
> 
> When I go to http://my.ip.com:8080/velexample/servlet/SampleServlet, I
> get an empty/blank page
> returned.  Nothing gets logged in the ~/webapp/velexample/velocity.log
> file.  In the catalina.out file
> I get the following error logged.  Any suggestions to the cause of this
> one?
> 
> Thanks!!! Rich
> 
> catalina.out>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.1
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.1
> java.lang.ClassCastException: java.util.Vector
> java.lang.ClassCastException: java.util.Vector
>       at
> org.apache.velocity.runtime.log.LogManager.createLogSystem(LogManager.java:9
> 
> 9)
>       at
> org.apache.velocity.runtime.RuntimeInstance.initializeLogger(RuntimeInstance
> 
> .java:468)
>       at
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:259)
> 
>       at
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:438)
> 
>       at
> org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:260)
> 
>       at org.apache.velocity.app.Velocity.init(Velocity.java:149)
>       at
> org.apache.velocity.servlet.VelocityServlet.init(VelocityServlet.java:205)
> 
>       at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
>       at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
> 
>       at
> org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
> 
> :396)
>       at
> org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
> 
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>       at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> 
> FilterChain.java:247)
>       at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> 
> ain.java:193)
>       at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> 
> va:243)
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 66)
>       at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>       at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> 
> va:201)
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 66)
>       at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>       at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
> 
>       at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> 
> )
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 66)
>       at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> 
> java:170)
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 64)
>       at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> 
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 64)
>       at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> 
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 64)
>       at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>       at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> 
> :163)
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 66)
>       at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>       at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> 
> 1011)
>       at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
> 
> )
>       at java.lang.Thread.run(Thread.java:484)
> SampleServlet : template not found
> org.apache.velocity.exception.ResourceNotFoundExcept
> ion: Unable to find resource 'sample.vm'
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"He who throws mud only loses ground." - Fat Albert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Don't understand why velocity won't work

Posted by "Geir Magnusson Jr." <ge...@yahoo.com>.
On 1/17/02 12:07 PM, "Rich Baldwin" <Ri...@noaa.gov> wrote:

> Hey, it works !!!
> 
> Sloppiness on my part.  In common/lib, I had velocity-1.0.1-rc1.jar and
> velocity-dep-1.2.jar while
> WEB-INF/lib/ had velocity-1.2.jar

A note for the archive : putting in common/lib will result in misery and
pain as the included VelocityServlet base class uses the singleton model,
sharing the velocity engine for each instance of VelocityServlet.  This
means that the first servlet that configures it wins, and all other
servlets, across all webapps have to share this config.

So this is bad.

What people do is not have it in common/lib, but just keep in WEB-INF/lib
for each webapp, guaranteeing clean partitioning.

If you don't want to do that, you don't have to - you can use the separate
runtime instances of Velocity, but not via the included convenience class
VelocityServlet (write your own...)

> 
> Thanks much, Rich
> 
> "Geir Magnusson Jr." wrote:
> 
>> On 1/16/02 5:07 PM, "Rich Baldwin" <Ri...@noaa.gov> wrote:
>> 
>>> I'm trying to get the 1st 2 servlet examples to work.  I have looked
>>> through the velocity users list and the
>>> readme files checking and rechecking possible errors (ie. properties
>>> files, jar file location, web.xml file,
>>> classes, etc.).  Can't seem to figure this one out.
>> 
>> For a sanity check, I just verified, using a fresh tomcat 4.0.1, the current
>> velocity tree (close enough to 1.2 :) :
>> 
>> 1) made a webapps/velexample directory under tomcat, added WEB-INF dir, and
>>    added lib and classes under that.
>> 2) did a
>> 
>>    ant examples
>> 
>>   in the /build directory of velocity
>> 
>> 3) copied the velocity-dep-1.3-dev.jar to /lib, copied the template.jar from
>> the examples/sample_servlet2 to /lib, copied web.xml to /WEB-INF, copied the
>> SampleServlet2.class to /classes and copied the velocity.propertes to
>> /velexample
>> 
>> 4) (I think I noted all I did...)
>> 
>> 5) I then started tomcat, and pointed my browser at
>> 
>> http://127.0.0.1:8080/velexample/servlet/SampleServlet2
>> 
>> And it worked.
>> 
>> I also tried it using the fileresourceloader (note - there are two velocity
>> properties files in sampleservlet2 - ) and it worked.
>> 
>> I will look over the instructions to make sure they are clear.
>> 
>> Now, as for your problem - are you using the stock examples, or have you
>> added anything to the properties file?  It seems that something is amiss
>> creating the logger.  I have a guess what it is, and will add some defensive
>> code, but recheck....
>> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Don't understand why velocity won't work

Posted by Rich Baldwin <Ri...@noaa.gov>.
Hey, it works !!!

Sloppiness on my part.  In common/lib, I had velocity-1.0.1-rc1.jar and
velocity-dep-1.2.jar while
WEB-INF/lib/ had velocity-1.2.jar

Thanks much, Rich

"Geir Magnusson Jr." wrote:

> On 1/16/02 5:07 PM, "Rich Baldwin" <Ri...@noaa.gov> wrote:
>
> > I'm trying to get the 1st 2 servlet examples to work.  I have looked
> > through the velocity users list and the
> > readme files checking and rechecking possible errors (ie. properties
> > files, jar file location, web.xml file,
> > classes, etc.).  Can't seem to figure this one out.
>
> For a sanity check, I just verified, using a fresh tomcat 4.0.1, the current
> velocity tree (close enough to 1.2 :) :
>
> 1) made a webapps/velexample directory under tomcat, added WEB-INF dir, and
>    added lib and classes under that.
> 2) did a
>
>    ant examples
>
>   in the /build directory of velocity
>
> 3) copied the velocity-dep-1.3-dev.jar to /lib, copied the template.jar from
> the examples/sample_servlet2 to /lib, copied web.xml to /WEB-INF, copied the
> SampleServlet2.class to /classes and copied the velocity.propertes to
> /velexample
>
> 4) (I think I noted all I did...)
>
> 5) I then started tomcat, and pointed my browser at
>
> http://127.0.0.1:8080/velexample/servlet/SampleServlet2
>
> And it worked.
>
> I also tried it using the fileresourceloader (note - there are two velocity
> properties files in sampleservlet2 - ) and it worked.
>
> I will look over the instructions to make sure they are clear.
>
> Now, as for your problem - are you using the stock examples, or have you
> added anything to the properties file?  It seems that something is amiss
> creating the logger.  I have a guess what it is, and will add some defensive
> code, but recheck....
>
> >
> > When I go to http://my.ip.com:8080/velexample/servlet/SampleServlet, I
> > get an empty/blank page
> > returned.  Nothing gets logged in the ~/webapp/velexample/velocity.log
> > file.  In the catalina.out file
> > I get the following error logged.  Any suggestions to the cause of this
> > one?
> >
> > Thanks!!! Rich
> >
> > catalina.out>
> > Starting service Tomcat-Standalone
> > Apache Tomcat/4.0.1
> > Starting service Tomcat-Apache
> > Apache Tomcat/4.0.1
> > java.lang.ClassCastException: java.util.Vector
> > java.lang.ClassCastException: java.util.Vector
> >       at
> > org.apache.velocity.runtime.log.LogManager.createLogSystem(LogManager.java:9
> >
> > 9)
> >       at
> > org.apache.velocity.runtime.RuntimeInstance.initializeLogger(RuntimeInstance
> >
> > .java:468)
> >       at
> > org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:259)
> >
> >       at
> > org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:438)
> >
> >       at
> > org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:260)
> >
> >       at org.apache.velocity.app.Velocity.init(Velocity.java:149)
> >       at
> > org.apache.velocity.servlet.VelocityServlet.init(VelocityServlet.java:205)
> >
> >       at
> > org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
> >       at
> > org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
> >
> >       at
> > org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
> >
> > :396)
> >       at
> > org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
> >
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> >
> > FilterChain.java:247)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> >
> > ain.java:193)
> >       at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> >
> > va:243)
> >       at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> >
> > 66)
> >       at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >
> >       at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >       at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> >
> > va:201)
> >       at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> >
> > 66)
> >       at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >
> >       at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >       at
> > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
> >
> >       at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> >
> > )
> >       at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> >
> > 66)
> >       at
> > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> >
> > java:170)
> >       at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> >
> > 64)
> >       at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> >
> >       at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> >
> > 64)
> >       at
> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> >
> >       at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> >
> > 64)
> >       at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >
> >       at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >       at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> >
> > :163)
> >       at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> >
> > 66)
> >       at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >
> >       at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >       at
> > org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> >
> > 1011)
> >       at
> > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
> >
> > )
> >       at java.lang.Thread.run(Thread.java:484)
> > SampleServlet : template not found
> > org.apache.velocity.exception.ResourceNotFoundExcept
> > ion: Unable to find resource 'sample.vm'
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
> --
> Geir Magnusson Jr.                                     geirm@optonline.net
> System and Software Consulting
> "We will be judged not by the monuments we build, but by the monuments we
> destroy" - Ada Louise Huxtable
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Don't understand why velocity won't work

Posted by "Geir Magnusson Jr." <ge...@earthlink.net>.
On 1/16/02 5:07 PM, "Rich Baldwin" <Ri...@noaa.gov> wrote:

> I'm trying to get the 1st 2 servlet examples to work.  I have looked
> through the velocity users list and the
> readme files checking and rechecking possible errors (ie. properties
> files, jar file location, web.xml file,
> classes, etc.).  Can't seem to figure this one out.


For a sanity check, I just verified, using a fresh tomcat 4.0.1, the current
velocity tree (close enough to 1.2 :) :

1) made a webapps/velexample directory under tomcat, added WEB-INF dir, and
   added lib and classes under that.
2) did a 

   ant examples

  in the /build directory of velocity

3) copied the velocity-dep-1.3-dev.jar to /lib, copied the template.jar from
the examples/sample_servlet2 to /lib, copied web.xml to /WEB-INF, copied the
SampleServlet2.class to /classes and copied the velocity.propertes to
/velexample

4) (I think I noted all I did...)

5) I then started tomcat, and pointed my browser at

http://127.0.0.1:8080/velexample/servlet/SampleServlet2

And it worked.

I also tried it using the fileresourceloader (note - there are two velocity
properties files in sampleservlet2 - ) and it worked.

I will look over the instructions to make sure they are clear.


Now, as for your problem - are you using the stock examples, or have you
added anything to the properties file?  It seems that something is amiss
creating the logger.  I have a guess what it is, and will add some defensive
code, but recheck....


> 
> When I go to http://my.ip.com:8080/velexample/servlet/SampleServlet, I
> get an empty/blank page
> returned.  Nothing gets logged in the ~/webapp/velexample/velocity.log
> file.  In the catalina.out file
> I get the following error logged.  Any suggestions to the cause of this
> one?
> 
> Thanks!!! Rich
> 
> catalina.out>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.1
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.1
> java.lang.ClassCastException: java.util.Vector
> java.lang.ClassCastException: java.util.Vector
>       at
> org.apache.velocity.runtime.log.LogManager.createLogSystem(LogManager.java:9
> 
> 9)
>       at
> org.apache.velocity.runtime.RuntimeInstance.initializeLogger(RuntimeInstance
> 
> .java:468)
>       at
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:259)
> 
>       at
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:438)
> 
>       at
> org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:260)
> 
>       at org.apache.velocity.app.Velocity.init(Velocity.java:149)
>       at
> org.apache.velocity.servlet.VelocityServlet.init(VelocityServlet.java:205)
> 
>       at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
>       at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
> 
>       at
> org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
> 
> :396)
>       at
> org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
> 
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>       at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> 
> FilterChain.java:247)
>       at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> 
> ain.java:193)
>       at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> 
> va:243)
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 66)
>       at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>       at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> 
> va:201)
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 66)
>       at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>       at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
> 
>       at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> 
> )
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 66)
>       at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> 
> java:170)
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 64)
>       at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> 
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 64)
>       at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> 
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 64)
>       at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>       at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> 
> :163)
>       at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 
> 66)
>       at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>       at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> 
> 1011)
>       at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
> 
> )
>       at java.lang.Thread.run(Thread.java:484)
> SampleServlet : template not found
> org.apache.velocity.exception.ResourceNotFoundExcept
> ion: Unable to find resource 'sample.vm'
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"We will be judged not by the monuments we build, but by the monuments we
destroy" - Ada Louise Huxtable


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>