Tomcat Startup Error

When I start Tomcat5.0.25, I got an error message:
SEVERE: Error reading tld listeners java.io.EOFException
java.io.EOFException
        at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream
.java:2165)
        at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputS
tream.java:2631)
        at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:734
)
        at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
        at org.apache.catalina.startup.TldConfig.processCache(TldConfig.java:387
)
        at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:288)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
260)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:823)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)

        at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDe
ployer.java:903)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav
a:252)
        at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
        at org.apache.commons.digester.Rule.end(Rule.java:276)
        at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
        at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester
.java:76)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1567)
        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:488)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
ava:482)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427
)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:964)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:349)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:4
76)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:229
8)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)

Any idea? Thanks.
3v0luti0nAsked:
Who is Participating?
 
CeldricCommented:
You know, maybe theres something missing in your web.xml
-->SEVERE: Error reading tld listeners java.io.EOFException
You see, I use a SessionListener in one of my programs and I have to declare
it in web.xml like so:
      <listener>
            <listener-class>
            listeners.SessionListener
            </listener-class>
      </listener>
Maybe you havent declared the listeners in your web.xml and thats the error thats ocurring.

Or, when I use Struts (which uses TLD's) I have to add them to my web.xml like so:
 <taglib>
  <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
 </taglib>
So, maybe one of them should work, Im gonna do some research later.

Regards!
0
 
CeldricCommented:
How many jdk's do you have installed in your computer?
Post your environment variables:

Java_home
Classpath
Path
Tomcat_home

I think the error is generated because tomcat cant find the xml tag libraries and its using
the wrong jdk.

Regards.
0
 
3v0luti0nAuthor Commented:
Here is my environment variables:
java_home=C:\j2sdk1.4.2_01
classpath=.;C:\eclipse\plugins\org.junit_3.8.1\junit.jar
path=.;C:\j2sdk1.4.2_01
catalina_home=C:\Program Files\Apache Software Foundation\Tomcat 5.0
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
DrWarezzCommented:
Can you post a copy of your web.xml file please?  (the WEB-INF\web.xml one)  :-)
I've had many troubles in the past with Tomcat, and alot of them have been due to the web.xml file.

gL,
[r.D]
0
 
3v0luti0nAuthor Commented:
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<display-name>Reagent Management</display-name>

      
      <servlet>
            <servlet-name>SearchServlet</servlet-name>
            <servlet-class>net.mycompany.reagent.SearchServlet</servlet-class>
      </servlet>
 
    <servlet>
            <servlet-name>RegisterServlet</servlet-name>
            <servlet-class>net.mycompany.reagent.RegisterServlet</servlet-class>
      </servlet>


<servlet-mapping>
            <servlet-name>SearchServlet</servlet-name>
            <url-pattern>/search</url-pattern>
</servlet-mapping>

<servlet-mapping>
            <servlet-name>RegisterServlet</servlet-name>
            <url-pattern>/register</url-pattern>
</servlet-mapping>

<session-config>
            <session-timeout>60</session-timeout>
</session-config>

<resource-ref>
             <description>Oracle Datasource</description>
             <res-ref-name>jdbc/reagentoracle</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Container</res-auth>
</resource-ref>

</web-app>

By the way, this problem just happened recently and I can't figure out why.

Thanks for your help.
0
 
DrWarezzCommented:
Okay, nothing APPEARS wrong there, but just so that we can be 100% sure, change your web.xml files content to the following (just temporarily):


<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<display-name>Reagent Management</display-name>

</web-app>


Save it, and then try and run the server :-) gL,

[r.D]
0
 
DrWarezzCommented:
Hey V,
I'm happy with a 50:50 split {DrWarezz & Celdric}

:-)

[r.D]
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.