velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nbu...@gmail.com>
Subject Re: CustomResourceLoader Not Found in Tomcat 4.x
Date Thu, 01 Jun 2006 18:04:50 GMT
try putting the velocity-dep-1.4.jar in with your application's
library jars instead of in Tomcat's common lib.

On 6/1/06, Sachin Dharmapurikar <sachin@akanksha.com> wrote:
> Hi Everybody,
>
> I am novice user of Velocity. I am using Velocity 1.4 in my application. I wrote a custom
Resource Loader which loads the template from String. I tested my application in Eclipse with,
>
> velocity-dep-1.4.jar
> velocity-1.4.jar
>
> Files in the classpath. My program just works fine in Eclipse. Then I created a war file
for my application. My Resource Loader is our application war file.
>
> I put velocity-dep-1.4.jar in the Tomcat_home/common/lib directory and started the container.
>
> I am getting ClassNotFoundException for my Resource Loader class. I do not understand
why that's happening. There are many classes in the same application jar and those works fine,
except the custom class loader.
>
> My initialization code for Velocity is as follows –
>
> Properties p = new Properties();
> p.put("resource.loader", "string");
> p.put("string.loader.description", "Database String Loader");
> p.put("string.resource.loader.class", "com.myapp.util.StringResourceLoader");
> Velocity.init(p);
>
> StringResourceLoader resides in the application directory.
>
> Thanks,
> Sachin
>
>
>

---------------------------------------------------------------------
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