velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Lybarger" <Mark.Lybar...@CBC-Companies.com>
Subject RE: Example for Newbie
Date Fri, 08 Oct 2004 19:15:50 GMT
Steve,

I think velocity requires ORO, Logkit and Commons Collections libraries. Are these also in
your web-inf/lib folder? or did you use the jar-dep target to build a complete velocity jar?

> -----Original Message-----
> From: Steve O'Hara [mailto:sohara@pivotal-solutions.co.uk]
> Sent: Thursday, October 07, 2004 2:10 PM
> To: Velocity Users List
> Subject: Example for Newbie
> 
> 
> 
> Apologies if this is too stupid for a response but......
> I'm new to Velocity and have just tried the servlet example 
> which I can't
> get to work.
> I'm using Tomcat 4.x.x and have created the webapp directory 
> as described in
> the readme:-
> 
> -> velexample
>      sample.vm
>      -> WEB-INF
>          -> classes
>              SampleServlet.class
>          -> lib
>              velocity-1.4.jar
> 
> I've created the context in Tomcat:-
> 
> <Context path="/velexample"
>  docBase="E:\Useful
> Stuff\Java\Velocity\velocity-1.4\examples\servlet_example1\velexample"
>  debug="1" reloadable="false"> </Context>
> 
> When I try and run the servlet with
> http://localhost:8080/velexample/servlet/SampleServlet
> I get the following error:-
> 
> java.lang.NoClassDefFoundError
> 	at org.apache.velocity.app.Velocity.init(Velocity.java:106)
> 	at
> org.apache.velocity.servlet.VelocityServlet.initVelocity(Veloc
> ityServlet.jav
> a:193)
> 	at
> org.apache.velocity.servlet.VelocityServlet.init(VelocityServl
> et.java:162)
> 	at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardW
> rapper.java:91
> 8)
> 	at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrap
> per.java:655)
> 	at
> org.apache.catalina.servlets.InvokerServlet.serveRequest(Invok
> erServlet.java
> :415)
>       ..................
> 
> Now I'm assuming that it can't find a class file or jar, but 
> which one.  The
> class compiled ok using a simple javac command (not using Ant).
> 
> I realise this is pretty basic so apologies.......
> 
> Steve
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message