You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Sunny <su...@gmail.com> on 2005/12/28 05:20:48 UTC
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
Re: Second Deploy
Posted by "E.R. van Es" <er...@cdls.nl>.
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" <su...@gmail.com>
> To: <ve...@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
Re: Second Deploy
Posted by Will Glass-Husain <wg...@forio.com>.
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" <su...@gmail.com>
To: <ve...@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