Make sure struts.jar is not in the tomcat classpath. It should only be in
the WEB-INF/lib directory of your webapps. This is not a bug because struts
and the example app are known to work your platforms.
Hal
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 2:46 PM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat 3.2.1
I've found the problem and will post it as a bug. I just wanted to see if
anyone else has run into this situation. We've tested it on several
machines
here and have encountered the same error.
First of all the environment.
struts - 1.0-b1 - installed in c:\jakarta-struts-1.0-b1
tomcat - 3.2.1 - installed in c:\jakarta-tomcat-3.2.1
jdk - 1.3.0_02 - installed in c:\jdk1.3.0_02
MS Windows 2000
Also tested on NT 4.0
The struts-example.war installed in Tomcat's webapp directory run and
behaves as
expected.
If I add c:\jakarta-struts-1.0-b1\lib\struts.jar to my Windows CLASSPATH,
then
run tomcat, I get several errors.
1. During Tomcat startup, I get:
2001-03-07 01:12:39 - path="/struts-example" :database: init
2001-03-07 01:12:39 - path="/struts-example" :database: Initializing
database
servlet
2001-03-07 01:12:39 - path="/struts-example" :database: Loading database
from
'/WEB-INF/database.xml'
2001-03-07 01:12:39 - path="/struts-example" :database: Database load
exception
- org.xml.sax.SAXException: org.apache.struts.example.User
at org.apache.struts.digester.Digester.startElement(Digester.java:501)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:716)
at
org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:283)
at
org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:178)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
at org.apache.tomcat.core.Handler.init(Handler.java:215)
at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:130)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
2. When I open a browser (IE 5.5) and goto
http://localhost:8080/struts-example,
I get:
Error 500
javax.servlet.jsp.JspException: Missing message for key index.title
at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
at
_0002findex_0002ejspindex_jsp_3._jspService(_0002findex_0002ejspindex_jsp_3.
java:90)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
I will post this as a bug, has anyone else noticed this behavior?
-Donnie Hall
Enron Broadband Services
I'm a new member to your group and am having a strange problem.
I was happily writing struts code when suddenly I was unable to find
applicationresources.properties and struts-config.xml from my app. I went
back
to the struts-example and it fails too. The only way I can make it work the
example work again is to add
c:\jakarta-tomcat\webapps\struts-example\WEB-INF\classes to my classpath and
restart Tomcat. Of course, this is not the correct way to do this and only
works for the current application. Any ideas, before I start uninstalling
everything from my hard disk.
Thanks,
Donnie Hall
Enron Broadband Services.