Solved

Tomcat Startup Error

Posted on 2004-10-29
3,523 Views
Last Modified: 2012-08-13
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.
0
Question by:3v0luti0n
    7 Comments
     
    LVL 1

    Expert Comment

    by:Celdric
    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
     

    Author Comment

    by:3v0luti0n
    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
     
    LVL 9

    Expert Comment

    by:DrWarezz
    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
     

    Author Comment

    by:3v0luti0n
    <!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
     
    LVL 1

    Accepted Solution

    by:
    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
     
    LVL 9

    Assisted Solution

    by:DrWarezz
    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
     
    LVL 9

    Expert Comment

    by:DrWarezz
    Hey V,
    I'm happy with a 50:50 split {DrWarezz & Celdric}

    :-)

    [r.D]
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
    One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now