velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "E.R. van Es" <e...@cdls.nl>
Subject Re: Second Deploy
Date Wed, 28 Dec 2005 08:45:07 GMT
Hi,

 I'll drop in here for a sec because I've had the same problem deploying 
applications on JBoss (wich uses tomcat).  I deployed as packed .war 
file (not unpacked .war directory) and the JBoss deployer unpacked my 
project in a temp directory with a random directory name.  On 
initialization of velocity (I extended VelocityServlet) it used that 
temp directory as root path for finding templates (I use 
servletConfig().getServletContext().getRealPath("/") in my 
loadConfiguration() to determine the path).  On re-deploying, the 
previous deployement was destroyed, and a NEW random named directory 
created in the temp directory where jboss unpacked the second 
deployement.  However I had velocity in the server lib's so on running 
the second deployement, velocity looked for templates in the OLD temp 
dir (because velocity already initialized with the old directory) wich 
obviously didn't existed anymore.  My simplest work-around was to deploy 
my application as unpacked directory, wich is not renamed by jboss 
(because it won't have to unpack into a temp dir).

Hope this helps,
Eric


Will Glass-Husain wrote:

> Hi Sunny,
>
> I'm switching over to the velocity-user list (which is a better place 
> to ask questions).
>
> What framework are you using?  JetSpeed, Turbine, VelocityViewServlet?
>
> WILL
>
> ----- Original Message ----- From: "Sunny" <sunnydreamfly@gmail.com>
> To: <velocity-dev@jakarta.apache.org>
> Sent: Tuesday, December 27, 2005 8:20 PM
> Subject: Second Deploy
>
>
> Hi:
>      we have a question.when I first deploy a portlet(It use 
> velocity),it's
> ok!but second,I deploy the same portlet,it's error.
>   like this:
>              VelocityViewServlet : Error processing the template
>              Unable to find resource 
> '/WEB-INF/vm/portletManager/deploy.vm'
>
>              org.apache.velocity.exception.ResourceNotFoundException:
> Unable to find resource '/WEB-INF/vm/portletManager/deploy.vm'
>              at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource (
> ResourceManagerImpl.java:458)
>              at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(
> ResourceManagerImpl.java:341)
>              at org.apache.velocity.runtime.RuntimeInstance.getTemplate (
> RuntimeInstance.java:831)
>              at org.apache.velocity.runtime.RuntimeInstance.getTemplate(
> RuntimeInstance.java:813)
>
>   but deploy.vm is exist. next,I restart tomcat ! the error is clear 
> away!
> This error come out every second deploy the same portlet!
>
>   Thanks!
>
>
> china hangzhou
>
>
> Sunny
>
>
> sunjin_sunny@hotmail.com
>
>
> ---------------------------------------------------------------------
> 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