Re: classloading

2005-06-07 Thread Stephen Morris
As it turns out, method ResourceLoaderFactory.getLoader was already modified to use the thread context classloader. Using a snapshot from yesterday (with no modification), the problem goes away! Thanks to all who participated in this discussion and fix... very enlightening. Is there a tuto

Re: classloading

2005-06-07 Thread Will Glass-Husain
quired. Best, WILL - Original Message - From: "Nathan Bubna" <[EMAIL PROTECTED]> To: "Velocity Users List" Sent: Tuesday, June 07, 2005 9:15 AM Subject: Re: classloading good thought. and i'm fairly sure the answer is no, there's not really much argume

Re: classloading

2005-06-07 Thread Shinobu Kawai
Hi Steve, > I'm having a similar problem with Velocity (1.4) being able to > instantiate a custom resource loader [see stack trace below]. > > Would the fix to class >ClasspathResourceLoader > fix this problem also if applied to class: > > org.apache.velocity.runtime.resource.loader.Resource

Re: classloading

2005-06-07 Thread Shinobu Kawai
Hi max, > I'm talking about > > FieldMethodizer > RuntimeInstance > LogManager > ResourceManagerImpl > ResourceLoaderFactory > Generator I guess you can start by filing an issue. :) http://issues.apache.org/bugzilla/enter_bug.cgi?product=Velocity > While on the subject of things that "messes

Re: classloading

2005-06-07 Thread Nathan Bubna
good thought. and i'm fairly sure the answer is no, there's not really much argument for the current state of things. one of the original developers might have one, but as things have developed over the years, the consensus has been that these are largely annoyances. it's just that they apparent

Re: classloading

2005-06-07 Thread Max Rydahl Andersen
On Tue, 07 Jun 2005 17:13:01 +0200, Nathan Bubna <[EMAIL PROTECTED]> wrote: patches would help :) yes - but before doing so just wanted to know if there were any argument for how it is done now ,) -max On 6/7/05, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: On Mon, 06 Jun 2005 20:17:

Re: classloading

2005-06-07 Thread Nathan Bubna
patches would help :) On 6/7/05, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: > On Mon, 06 Jun 2005 20:17:38 +0200, Shinobu Kawai > <[EMAIL PROTECTED]> wrote: > > > Hi max, > > > >> Any particular reason why velocity only do Class.forName() where > >> it should first look in thread context clas

Re: classloading

2005-06-07 Thread Max Rydahl Andersen
On Mon, 06 Jun 2005 20:17:38 +0200, Shinobu Kawai <[EMAIL PROTECTED]> wrote: Hi max, Any particular reason why velocity only do Class.forName() where it should first look in thread context classloader and THEN do Class.forName() ? (it gives some issues when running in environments with chan

Re: classloading

2005-06-06 Thread Stephen Morris
I'm having a similar problem with Velocity (1.4) being able to instantiate a custom resource loader [see stack trace below]. Would the fix to class ClasspathResourceLoader fix this problem also if applied to class: org.apache.velocity.runtime.resource.loader.ResourceLoaderFactory.getLoade

Re: classloading

2005-06-06 Thread Shinobu Kawai
Hi max, > Any particular reason why velocity only do Class.forName() where > it should first look in thread context classloader and THEN do > Class.forName() ? > > (it gives some issues when running in environments with changing > classloaders, like > J2EE and Eclipse) Are we talking about the C

classloading

2005-06-05 Thread Max Rydahl Andersen
hi guys, Any particular reason why velocity only do Class.forName() where it should first look in thread context classloader and THEN do Class.forName() ? (it gives some issues when running in environments with changing classloaders, like J2EE and Eclipse) /max --

Re: Classloading problem of using velocity with tomcat

2005-01-23 Thread Shinobu Kawai Yoshida
Hi Carfield, > I think ServletContext#getResourceAsStream() will work either, so I > try to add the following properities, but I find that > > org.apache.velocity.tools.view.servlet.WebappLoader > > Is not exist in velocity-1.5-dev.jar... where can I find it? Or in > fact just juse classpathload

Re: Classloading problem of using velocity with tomcat

2005-01-21 Thread Carfield Yim
I think ServletContext#getResourceAsStream() will work either, so I try to add the following properities, but I find that org.apache.velocity.tools.view.servlet.WebappLoader Is not exist in velocity-1.5-dev.jar... where can I find it? Or in fact just juse classpathloader is already able to load t

Re: Classloading problem of using velocity with tomcat

2005-01-21 Thread Shinobu Kawai Yoshida
Hi Carfield, > You mean I should set the classloader using the following statement? > >// by default, load resources with webapp resource loader >velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); >velocity.setProperty("webapp.resource.loader.class", >

Re: Classloading problem of using velocity with tomcat

2005-01-21 Thread Carfield Yim
You mean I should set the classloader using the following statement? // by default, load resources with webapp resource loader velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); velocity.setProperty("webapp.resource.loader.class",

Re: Classloading problem of using velocity with tomcat

2005-01-21 Thread Shinobu Kawai Yoshida
Hi Barbara, > Right now, I believe most of the Velocity convenience servlets are > using the Singleton model. Hopefully, that will change. I have > written my own servlet extending HttpServlet which uses the > VelocityEngine object. The latest VelocityViewServlet in the SVN repository uses the

Re: Classloading problem of using velocity with tomcat

2005-01-20 Thread Carfield Yim
> Again, you have a choice. You can put the Velocity jar either in > Tomcat/common/lib, or in WEB-INF/lib. With the latest set of source code, > you can then put the the templates at the WEB-APP level or (if the velocity > jar is at the container level) in the container level. This will be > rel

Re: Classloading problem of using velocity with tomcat

2005-01-20 Thread Barbara Baughman
; > - Original Message - > From: "Carfield Yim" <[EMAIL PROTECTED]> > To: "Velocity Users List" > Sent: Thursday, January 20, 2005 9:35 AM > Subject: Re: Classloading problem of using velocity with tomcat > > > > On Thu, 20 Jan 2005 08:4

Re: Classloading problem of using velocity with tomcat

2005-01-20 Thread Will Glass-Husain
ursday, January 20, 2005 9:35 AM Subject: Re: Classloading problem of using velocity with tomcat On Thu, 20 Jan 2005 08:45:06 -0800, Will Glass-Husain <[EMAIL PROTECTED]> wrote: Hi Carfield, You can't set the ClassLoader. Velocity looks for the resources in the Thead.getContextClassLo

Re: Classloading problem of using velocity with tomcat

2005-01-20 Thread Carfield Yim
On Thu, 20 Jan 2005 08:45:06 -0800, Will Glass-Husain <[EMAIL PROTECTED]> wrote: > Hi Carfield, > > You can't set the ClassLoader. Velocity looks for the resources in the > Thead.getContextClassLoader, or the system one (if not found) > > Typical practice: > > Put the velocity jar either in you

Re: Classloading problem of using velocity with tomcat

2005-01-20 Thread Will Glass-Husain
n WEB-INF/jar. Best, WILL - Original Message - From: "Carfield Yim" <[EMAIL PROTECTED]> To: "Will Glass-Husain" <[EMAIL PROTECTED]> Cc: "Velocity Users List" Sent: Thursday, January 20, 2005 6:02 AM Subject: Re: Classloading problem of using ve

Re: Classloading problem of using velocity with tomcat

2005-01-20 Thread Carfield Yim
Hi, just build the library. However, I can't find the relevant API document that how to set the classloader using... Would you give me a pointer about that? On Mon, 17 Jan 2005 08:05:51 -0800, Will Glass-Husain <[EMAIL PROTECTED]> wrote: > Which resource loader are you using? > > If you're using

Re: Classloading problem of using velocity with tomcat

2005-01-17 Thread Will Glass-Husain
t; <[EMAIL PROTECTED]> To: "Velocity Users List" Sent: Monday, January 17, 2005 5:04 AM Subject: Classloading problem of using velocity with tomcat When my cowork deploy the application using velocity at tomcat, they find that if there is velocity jar at tomcat common library dir

Classloading problem of using velocity with tomcat

2005-01-17 Thread Carfield Yim
When my cowork deploy the application using velocity at tomcat, they find that if there is velocity jar at tomcat common library directory, the application will throw a ResourceNotFoundException. I think it relate to the classloader using, but there is no API method call can allow me to change the