You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tom Bednarz <li...@bednarz.ch> on 2004/04/06 09:49:12 UTC

Tomcat 5, Velocity and XML Parser issues

Hi,

I just experienced a problem with Velocity and Tomcat 5.0.19. I use Velocity 1.3, Velocity Tools 1.0, Struts 1.1 and Tomcat 5.0.19.

When starting my Web-App I got the following error:

2004-04-05 16:18:02 StandardContext[/Echnaton] Velocity   [info] Velocity successfully started.
2004-04-05 16:18:02 StandardContext[/Echnaton] Velocity   [info] Using toolbox configuration file '/WEB-INF/toolbox.xml'
2004-04-05 16:18:02 StandardContext[/Echnaton] Velocity   [info] ServletToolboxManager: Loading toolbox...
2004-04-05 16:18:02 StandardContext[/Echnaton]StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader
 at org.apache.velocity.tools.view.XMLToolboxManager.load(XMLToolboxManager.java:205)
 at org.apache.velocity.tools.view.servlet.ServletToolboxManager.getInstance(ServletToolboxManager.java:211)
 at org.apache.velocity.tools.view.servlet.VelocityViewServlet.initToolbox(VelocityViewServlet.java:252)
 at org.apache.velocity.tools.view.servlet.VelocityViewServlet.init(VelocityViewServlet.java:219)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3959)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4284)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
 at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
 at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
 at org.apache.catalina.core.StandardService.start(StandardService.java:519)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
 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.start(Bootstrap.java:297)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)


On the Velocity-user mailinglist I was told to copy the dom4j.jar file into $CATALINA_HOME/common/endorsed and that solved the problem. So far (Tomcat 4.x) I put the dom4j.jar into the lib directory of the WEB-INF of my web app. 

Could anybody please explain me what this endorsed directory is all about? Which libraries do I need to put where and why is it NOT possible to put libraries such as dom4j.jar into my Web-Application. Or is there anything I am doing wrong when deploying my web app to Tomcat 5?

Any clarification, additional documentation etc is greatly appreciated.

Tom

Re: SERVLET MAP TO TOMCAT

Posted by jitender ahuja <aj...@aalayance.com>.
Hi, I am a bit more experienced than and working with the same issues. Yet
can point u some thing I know.

 u need to specify the context (container, if not the same as
install_dir/webapps/ROOT/WEB-INF/classes) in server.xml in the server.xml
file in conf folder inside the install_dir. For me , the install dir. is ::
D:\tomcat\4.1.29\jakarta-tomcat-4.1.29\, and it is on windows platform.
Also, u need to specify for a servlet the URL of the servlets, sevlet name
in the deployment descriptor file ( basically the configuration file for ur
web application), i.e. web.xml inside the folder's root dir.
You can go through this link too: http://cymulacrum.net

Any further queries u can post to me directly too at my email id:
jitenderahuja400@yahoo.co.in
regards
Jitender

----- Original Message ----- 
From: "wwwdir zala" <ww...@yahoo.co.in>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, April 06, 2004 2:55 PM
Subject: SERVLET MAP TO TOMCAT


>
>  Hello Friends,
>
> I m novice in Tomcat4.
>
> I have created Sevlet MyServlet . I want to kept this servlet in to
Tomcat4.0.
>
> What syntax i need to write into " WEB.XML" ?
>
> do i need other configuration
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway - Enter today


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: SERVLET MAP TO TOMCAT

Posted by jitender ahuja <aj...@aalayance.com>.
Hi, I am a bit more experienced than and working with the same issues. Yet
can point u some thing I know.

 u need to specify the context (container, if not the same as
install_dir/webapps/ROOT/WEB-INF/classes) in server.xml in the server.xml
file in conf folder inside the install_dir. For me , the install dir. is ::
D:\tomcat\4.1.29\jakarta-tomcat-4.1.29\, and it is on windows platform.
Also, u need to specify for a servlet the URL of the servlets, sevlet name
in the deployment descriptor file ( basically the configuration file for ur
web application), i.e. web.xml inside the folder's root dir.
You can go through this link too: http://cymulacrum.net

Any further queries u can post to me directly too at my email id:
jitenderahuja400@yahoo.co.in
regards
Jitender

----- Original Message ----- 
From: "wwwdir zala" <ww...@yahoo.co.in>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, April 06, 2004 2:55 PM
Subject: SERVLET MAP TO TOMCAT


>
>  Hello Friends,
>
> I m novice in Tomcat4.
>
> I have created Sevlet MyServlet . I want to kept this servlet in to
Tomcat4.0.
>
> What syntax i need to write into " WEB.XML" ?
>
> do i need other configuration
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway - Enter today


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


SERVLET MAP TO TOMCAT

Posted by wwwdir zala <ww...@yahoo.co.in>.
 Hello Friends,

I m novice in Tomcat4.

I have created Sevlet MyServlet . I want to kept this servlet in to Tomcat4.0. 

What syntax i need to write into " WEB.XML" ? 

do i need other configuration 


---------------------------------
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today