You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Edward Muller <em...@learningpatterns.com> on 2001/06/20 19:54:36 UTC

SampleServlet2 problem using ClasspathResourceLoader version

I've gotten SampleServlet to work, but I am trying to SampleServlet2 to
work. I followed the directions in the README.txt file to setup the
ClasspathResourceLoader version, but this is what I get them I go to the
servlet.. 

BTW: the fileloader version works fine.

velocity.log

Wed Jun 20 11:28:11 EDT 2001 AvalonLogSystem initialized using logfile
/var/tomcat/webapps/vexample/velocity.log
Wed Jun 20 11:28:11 EDT 2001   [info]   [info] Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
Wed Jun 20 11:28:11 EDT 2001   [info] Resource Loader Instantiated:
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
Wed Jun 20 11:28:11 EDT 2001   [info] ClasspathResourceLoader :
initialization starting.
Wed Jun 20 11:28:11 EDT 2001   [info] ClasspathResourceLoader :
initialization complete.
Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Literal
Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Macro
Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Parse
Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Include
Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Foreach
Wed Jun 20 11:28:11 EDT 2001   [info] Created: 20 parsers.
Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : initialization
starting.
Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : adding VMs from VM
library template : VM_global_library.vm
Wed Jun 20 11:28:11 EDT 2001  [error] ResourceManager : unable to find
resource 'VM_global_library.vm' in any resource loader.
Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : error using  VM
library template VM_global_library.vm :
org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'VM_global_library.vm'
Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : allowInline = true :
VMs can be defined inline in templates
Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro :
allowInlineToOverride = false : VMs defined inline may NOT replace
previous VM definitions
Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : allowInlineLocal =
false : VMs defined inline will be  global in scope if allowed.
Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : messages on  : VM
system will output logging messages
Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : initialization
complete.
Wed Jun 20 11:28:11 EDT 2001   [info] Velocity successfully started.
Wed Jun 20 11:28:11 EDT 2001  [error] ResourceManager : unable to find
resource 'sample.vm' in any resource loader.


And here is what I get in the web browser:
VelocityServlet : Error processing the templatejava.lang.Exception:
handleRequest(Context) returned null - no template selected!
java.lang.Exception: handleRequest(Context) returned null - no template
selected! at java.lang.Throwable.(Throwable.java:96) at
java.lang.Exception.(Exception.java:44) at
org.apache.velocity.servlet.VelocityServlet.handleRequest(VelocityServlet.java:561) at org.apache.velocity.servlet.VelocityServlet.doRequest(VelocityServlet.java:333) at org.apache.velocity.servlet.VelocityServlet.doGet(VelocityServlet.java:294) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java) at org.apache.tomcat.core.Handler.service(Handler.java) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java) at org.apache.tomcat.core.ContextManager.service(ContextManager.java) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java) at java.lang.Thread.run(Thread!
.java:498)

I'm still new to TomCat/Velocity/Servlets so there may be something I've
done wrong. I've checked the settings files, but they all look okay.

Can anyone help me?

P.S. Sorry if this post comes in twice. I had some mailer problems.

--
Edward Muller
Director of Information Services
LearningPatterns.com Inc.

Direct: 212-486-9064 x 115
Fax: 212-202-3822
Email: emuller@learningpatterns.com

http://www.learningpatterns.com


Re: SampleServlet2 problem using ClasspathResourceLoader version

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Thanks for the persistance in helping to work this out.

geir

Edward Muller wrote:
> 
> Geir and myself tracked this down to some sort of problem with the rpm
> version of Tomcat 3.2.2 that I was using. As soon as I grabbed the
> tomcat 3.22 -tar.gz files and used it things went smoothly.
> 
> The rpms I installed Tomcat from I found at:
> 
> http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.2/rpms/
> 
> So I'm not sure what's up.....
> 
> Maybe greater minds than mind can figure it out and fix it. :-)
> 

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Re: SampleServlet2 problem using ClasspathResourceLoader version

Posted by Edward Muller <em...@learningpatterns.com>.
Geir and myself tracked this down to some sort of problem with the rpm
version of Tomcat 3.2.2 that I was using. As soon as I grabbed the
tomcat 3.22 -tar.gz files and used it things went smoothly.

The rpms I installed Tomcat from I found at:

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.2/rpms/

So I'm not sure what's up..... 

Maybe greater minds than mind can figure it out and fix it. :-)

On 20 Jun 2001 13:54:36 -0400, Edward Muller wrote:
> I've gotten SampleServlet to work, but I am trying to SampleServlet2 to
> work. I followed the directions in the README.txt file to setup the
> ClasspathResourceLoader version, but this is what I get them I go to the
> servlet.. 
> 
> BTW: the fileloader version works fine.
> 
> velocity.log
> 
> Wed Jun 20 11:28:11 EDT 2001 AvalonLogSystem initialized using logfile
> /var/tomcat/webapps/vexample/velocity.log
> Wed Jun 20 11:28:11 EDT 2001   [info]   [info] Default Properties File:
> org/apache/velocity/runtime/defaults/velocity.properties
> Wed Jun 20 11:28:11 EDT 2001   [info] Resource Loader Instantiated:
> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> Wed Jun 20 11:28:11 EDT 2001   [info] ClasspathResourceLoader :
> initialization starting.
> Wed Jun 20 11:28:11 EDT 2001   [info] ClasspathResourceLoader :
> initialization complete.
> Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
> org.apache.velocity.runtime.directive.Literal
> Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
> org.apache.velocity.runtime.directive.Macro
> Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
> org.apache.velocity.runtime.directive.Parse
> Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
> org.apache.velocity.runtime.directive.Include
> Wed Jun 20 11:28:11 EDT 2001   [info] Loaded Pluggable Directive:
> org.apache.velocity.runtime.directive.Foreach
> Wed Jun 20 11:28:11 EDT 2001   [info] Created: 20 parsers.
> Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : initialization
> starting.
> Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : adding VMs from VM
> library template : VM_global_library.vm
> Wed Jun 20 11:28:11 EDT 2001  [error] ResourceManager : unable to find
> resource 'VM_global_library.vm' in any resource loader.
> Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : error using  VM
> library template VM_global_library.vm :
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find
> resource 'VM_global_library.vm'
> Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : allowInline = true :
> VMs can be defined inline in templates
> Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro :
> allowInlineToOverride = false : VMs defined inline may NOT replace
> previous VM definitions
> Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : allowInlineLocal =
> false : VMs defined inline will be  global in scope if allowed.
> Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : messages on  : VM
> system will output logging messages
> Wed Jun 20 11:28:11 EDT 2001   [info] Velocimacro : initialization
> complete.
> Wed Jun 20 11:28:11 EDT 2001   [info] Velocity successfully started.
> Wed Jun 20 11:28:11 EDT 2001  [error] ResourceManager : unable to find
> resource 'sample.vm' in any resource loader.
> 
> 
> And here is what I get in the web browser:
> VelocityServlet : Error processing the templatejava.lang.Exception:
> handleRequest(Context) returned null - no template selected!
> java.lang.Exception: handleRequest(Context) returned null - no template
> selected! at java.lang.Throwable.(Throwable.java:96) at
> java.lang.Exception.(Exception.java:44) at
> org.apache.velocity.servlet.VelocityServlet.handleRequest(VelocityServlet.java:561) at org.apache.velocity.servlet.VelocityServlet.doRequest(VelocityServlet.java:333) at org.apache.velocity.servlet.VelocityServlet.doGet(VelocityServlet.java:294) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java) at org.apache.tomcat.core.Handler.service(Handler.java) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java) at org.apache.tomcat.core.ContextManager.service(ContextManager.java) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java) at java.lang.Thread.run(Thre!
ad!
> .java:498)
> 
> I'm still new to TomCat/Velocity/Servlets so there may be something I've
> done wrong. I've checked the settings files, but they all look okay.
> 
> Can anyone help me?
> 
> P.S. Sorry if this post comes in twice. I had some mailer problems.
> 
> --
> Edward Muller
> Director of Information Services
> LearningPatterns.com Inc.
> 
> Direct: 212-486-9064 x 115
> Fax: 212-202-3822
> Email: emuller@learningpatterns.com
> 
> http://www.learningpatterns.com
--
Edward Muller
Director of Information Services
LearningPatterns.com Inc.

Direct: 212-487-9064 x 115
Fax: 212-202-3822
Email: emuller@learningpatterns.com

http://www.learningpatterns.com