velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Ike <jeich...@optonline.net>
Subject Re: veltools ServletException on init() for toolbox.xml
Date Sat, 05 Apr 2003 05:11:59 GMT

I am still having a problem with this and I can't seem to find any
similar problem through searching the net.  I have much of the backend
and Actions now done, but not being able to use the LinkTool because
the ToolBox is not loading is being rough.

My ISP uses Tomcat 4.1.24 and Java 1.4.1 so I am limited by those
requirements.   I would like to be able to use Struts 1.1 as it has
some great enhancements.

Has anybody been able to get Velocity-Tools working in a similar
environment?   It is the only part of my setup that appears to not be
working.   If you have any ideas why, please let me know as this is my
first crack at this environment.  If not is there perhaps a
workaround?   I would hate to have to back off to JSP.

Details lie below and thanks if you have any input.

John Ike




On Wed, 02 Apr 2003 19:10:37 -0500, you wrote:

>
>Hey all.  This is my first time posting, but I have been reading your
>list and building my first Velocity/Struts project.
>
>I am can utilize Velocity/Struts/Tomcat without problem or Exceptoin
>until I place the toolbox.xml as was laid out in the velocity-tools
>examples into the WEB-INF directory and the Tomcat tries to load these
>classes during initialization.
>
>I have placed the ServletException for the Servlet.init() failure at
>the bottom of this file as well as configuration information.
>
>Though I am using the below tools, I have tried many variations of
>libraries in hopes that one of the variations would work.  I have not
>been successful.   Does anybody know what the problem might be or else
>have a working version that takes into account the required ISP
>versions for Java and Tomcat?
>
>
> I am using:
>
>	Java 1.4.1 (restricted to use this)
>	Tomcat 4.1.24 (restricted to using this)
>	jakarta-struts-1.1-rc1
>	velocity-dep-1.3.1.jar (just released)
>	jakarta-velocity-tools (current build from CVS)
>	jakarta-velocity-dvsl (current build from CVS)
>
>Thank you for any help.  Details below.
>
>John Ike
>
>
>
>
>StandardWrapper[:invoker]: Loading container servlet invoker
>StandardContext[]: Servlet  threw load() exception:
>javax.servlet.ServletException: Servlet.init
>() for servlet velocity threw exception
>javax.servlet.ServletException: Servlet.init() for servlet velocity
>threw exception at
>org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:963)
>        at
>org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
>        at
>org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
>        at
>org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
>        at
>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
>        at
>org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>        at
>org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>        at
>org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:307)
>        at
>org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
>        at
>org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:559)
>        at
>org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401)
>        at
>org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
>        at
>org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358)
>        at
>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
>        at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
>        at
>org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>        at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>        at
>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>        at
>org.apache.catalina.core.StandardService.start(StandardService.java:497)
>        at
>org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
>        at
>org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>        at
>org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>        at
>org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:324)
>        at
>org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>
>
>
>Later during Tomcat initialization it throws:
>----------------------------------------------------------------
>
>StandardContext[]: Servlet  threw load() exception:
>javax.servlet.ServletException: Servlet.init
>() for servlet velocity threw exception
>javax.servlet.ServletException: Servlet.init() for servlet velocity
>threw exception
>        at
>org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:963)
>        at
>org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
>        at
>org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
>        at
>org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
>        at
>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
>        at
>org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>        at
>org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>        at
>org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:307)
>        at
>org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
>        at
>org.apache.catalina.connector.warp.WarpConfigurationHandler.deploy(Unknown
>Source)
>        at
>org.apache.catalina.connector.warp.WarpConfigurationHandler.handle(Unknown
>Source)
>        at
>org.apache.catalina.connector.warp.WarpConnection.run(Unknown Source)
>        at java.lang.Thread.run(Thread.java:536)
>
>
>--------------------------------------------------
>
>web.xml
>------------
>  <!-- Define Velocity template compiler -->
>  <servlet>
>    <servlet-name>velocity</servlet-name>
>
><servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</servlet-class>
>
>    <init-param>
>      <param-name>org.apache.velocity.toolbox</param-name>
>      <param-value>/WEB-INF/toolbox.xml</param-value>
>   </init-param>
>
>    <init-param>
>      <param-name>org.apache.velocity.properties</param-name>
>      <param-value>/WEB-INF/velocity.properties</param-value>
>   </init-param>
>
>   <load-on-startup>10</load-on-startup>
>  </servlet>
>
>  <!-- Action Servlet Mapping -->
>  <servlet-mapping>
>    <servlet-name>action</servlet-name>
>    <url-pattern>*.do</url-pattern>
>  </servlet-mapping>
>
>
>  <!-- Map *.vm files to Velocity -->
>  <servlet-mapping>
>    <servlet-name>velocity</servlet-name>
>    <url-pattern>*.vm</url-pattern>
>  </servlet-mapping>
>
>
>
>-----------------------------------------------------
>
>toolbox.xml:
>-----------------
>
>Exactly out of example and I verified that all the classes were
>available within the jar.
>
><?xml version="1.0"?>
>
><toolbox>
>  <tool>
>     <key>toolLoader</key>
>     <class>org.apache.velocity.tools.generic.ToolLoader</class>
>  </tool>
>  <tool>
>     <key>link</key>
>     <class>org.apache.velocity.tools.struts.StrutsLinkTool</class>
>  </tool>
>  <tool>
>     <key>msg</key>
>     <class>org.apache.velocity.tools.struts.MessageTool</class>
>  </tool>
>  <tool>
>     <key>errors</key>
>     <class>org.apache.velocity.tools.struts.ErrorsTool</class>
>  </tool>
>  <tool>
>     <key>form</key>
>     <class>org.apache.velocity.tools.struts.FormTool</class>
>  </tool>
></toolbox>
>
>
>
>
>
>
>
>
>---------------------------------------------------------------------
>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