Question

starting Tomcat

Asked by: komlaaa

Hi,
I launch Tomcat, it starts normaly but before it completely started, it shut down by itself.
Why is that? How could i resolve this?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-09-23 at 11:03:03ID21572149
Tags

tomcat

Topics

Java Programming Language

,

Java Servlets

Participating Experts
5
Points
250
Comments
21

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. TOMCAT INSTALLATION IN LINUX
    tomcat is stored at /usr/tomcat/jakarta1... tomcat 3.2.1 first command TOMCAT_HOME=/usr/tomcat/jakarta1;export TOMCAT_HOME JAVA_HOME=<DIRECTORY OF JAVA> on using the command /usr/bin/startup.sh CLASS PATH IS ASSIGNED TO STARTING TOMCAT ..CHECKING FOR ERRORS java.io...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: kawasPosted on 2005-09-23 at 11:05:04ID: 14946824

check your error logs in tomcat/logs/

if you need help deciphering it, post the error and we will see what we can do

 

by: komlaaaPosted on 2005-09-23 at 12:37:11ID: 14947617

I look at logs, my guess is the problem is with context setup in server.xml
:
//////////////////// HERE IS A SNIPPET FROM server.xml FILE //////////////////
<Context path="/webapp000" docBase="webapp000">
<Resource name="jdbc/webapp000" scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/webapp000">
...
...
</Context>

2005-10-23 15:25:12 StandardContext[/webapp000]: Error configuring application listener of class listeners.SessionListener
java.lang.ClassFormatError: Illegal class name "WEB-INF/classes/listeners/SessionListener" in class file listeners/SessionListener
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1649)
      at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:931)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1373)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1252)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3179)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3554)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
      at org.apache.catalina.core.StandardService.start(StandardService.java:450)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
      at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
      at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
      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:585)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)

2005-10-23 15:25:12 StandardContext[/webapp000]: Skipped installing application listeners due to previous error(s)
2005-10-23 15:25:12 StandardContext[/webapp000]: Context startup failed due to previous errors

 

by: matthewdflemingPosted on 2005-09-23 at 13:00:52ID: 14947820

What version of tomcat is this?  If you remove the webapp "webapp000" does the server start?

 

by: objectsPosted on 2005-09-23 at 14:57:21ID: 14948572

what does your web.xml look like?

 

by: todd_farmerPosted on 2005-09-23 at 16:40:02ID: 14949164

Is webapp000 an application you have the source for?  If so, what package does the listener.SessionListener say it is in?

 

by: actonwangPosted on 2005-09-23 at 23:19:44ID: 14950057

Do you have :

<listener>    
      <listener-class>listeners.SessionListener</listener-class>  
</listener>

in your web.xml?

Remove these lines and try to start tomcat again.

BTW: if so , o you have this class in classes or lib jar files?

Acton
 

 

by: komlaaaPosted on 2005-09-24 at 16:00:09ID: 14952236

>What version of tomcat is this?
4.1.31

> If you remove the webapp "webapp000" does the server start?
You are for that, if i remove "webapp000" it starts fine.

 

by: komlaaaPosted on 2005-09-24 at 16:01:52ID: 14952239

>what does your web.xml look like?
/////////////////// web.xml ///////////////////////////
<?xml version="1.0" encoding="ISO-8859-1"?>

<!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>Tomcat Examples</display-name>
    <description>
      Tomcat Example servlets and JSP pages.
    </description>

    <!-- Define servlet-mapped and path-mapped example filters -->
    <filter>
        <filter-name>Servlet Mapped Filter</filter-name>
        <filter-class>filters.ExampleFilter</filter-class>
      <init-param>
          <param-name>attribute</param-name>
          <param-value>filters.ExampleFilter.SERVLET_MAPPED</param-value>
      </init-param>
    </filter>
    <filter>
        <filter-name>Path Mapped Filter</filter-name>
        <filter-class>filters.ExampleFilter</filter-class>
      <init-param>
          <param-name>attribute</param-name>
          <param-value>filters.ExampleFilter.PATH_MAPPED</param-value>
      </init-param>
    </filter>
    <filter>
        <filter-name>Request Dumper Filter</filter-name>
        <filter-class>filters.RequestDumperFilter</filter-class>
    </filter>

    <!-- Example filter to set character encoding on each request -->
    <filter>
        <filter-name>Set Character Encoding</filter-name>
        <filter-class>filters.SetCharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>EUC_JP</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>Compression Filter</filter-name>
        <filter-class>compressionFilters.CompressionFilter</filter-class>

        <init-param>
          <param-name>compressionThreshold</param-name>
          <param-value>10</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
    </filter>

    <!-- Define filter mappings for the defined filters -->
    <filter-mapping>
        <filter-name>Servlet Mapped Filter</filter-name>
      <servlet-name>invoker</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>Path Mapped Filter</filter-name>
      <url-pattern>/servlet/*</url-pattern>
    </filter-mapping>


<!-- Example filter mapping to apply the "Set Character Encoding" filter
     to *all* requests processed by this web application -->
<!--
    <filter-mapping>
        <filter-name>Set Character Encoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->

<!--
    <filter-mapping>
      <filter-name>Compression Filter</filter-name>
      <url-pattern>/CompressionTest</url-pattern>
    </filter-mapping>
-->

<!--
    <filter-mapping>
        <filter-name>Request Dumper Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->

    <!-- Define example application events listeners -->
    <listener>
        <listener-class>listeners.ContextListener</listener-class>
    </listener>
    <listener>
        <listener-class>listeners.SessionListener</listener-class>
    </listener>

    <!-- Define servlets that are included in the example application -->

    <servlet>
        <servlet-name>SendMailServlet</servlet-name>
        <servlet-class>SendMailServlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>
            snoop
        </servlet-name>
        <servlet-class>
            SnoopServlet
        </servlet-class>
<!--
        <init-param>
            <param-name>foo</param-name>
            <param-value>bar</param-value>
        </init-param>
-->
        <run-as>
            <description>Security role for anonymous access</description>
            <role-name>tomcat</role-name>
        </run-as>
    </servlet>

    <servlet>
      <servlet-name>
          servletToJsp
      </servlet-name>
      <servlet-class>
          servletToJsp
      </servlet-class>
    </servlet>
        <servlet>
        <servlet-name>
            CompressionFilterTestServlet
        </servlet-name>
        <servlet-class>
            compressionFilters.CompressionFilterTestServlet
        </servlet-class>

    </servlet>

    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>
            CompressionFilterTestServlet
        </servlet-name>
        <url-pattern>
            /CompressionTest
        </url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>SendMailServlet</servlet-name>
        <url-pattern>/SendMailServlet</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>
            snoop
        </servlet-name>
        <url-pattern>
            /snoop
        </url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>
            servletToJsp
        </servlet-name>
        <url-pattern>
            /servletToJsp
        </url-pattern>
    </servlet-mapping>

    <taglib>
        <taglib-uri>
         http://jakarta.apache.org/tomcat/debug-taglib
        </taglib-uri>
        <taglib-location>
           /WEB-INF/jsp/debug-taglib.tld
        </taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>
         http://jakarta.apache.org/tomcat/examples-taglib
        </taglib-uri>
        <taglib-location>
           /WEB-INF/jsp/example-taglib.tld
        </taglib-location>
    </taglib>

    <resource-ref>
      <res-ref-name>mail/Session</res-ref-name>
      <res-type>javax.mail.Session</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>

    <security-constraint>
      <display-name>Example Security Constraint</display-name>
      <web-resource-collection>
         <web-resource-name>Protected Area</web-resource-name>
       <!-- Define the context-relative URL(s) to be protected -->
         <url-pattern>/jsp/security/protected/*</url-pattern>
       <!-- If you list http methods, only those methods are protected -->
       <http-method>DELETE</http-method>
         <http-method>GET</http-method>
         <http-method>POST</http-method>
       <http-method>PUT</http-method>
      </web-resource-collection>
      <auth-constraint>
         <!-- Anyone with one of the listed roles may access this area -->
         <role-name>tomcat</role-name>
       <role-name>role1</role-name>
      </auth-constraint>
    </security-constraint>

    <!-- Default login configuration uses form-based authentication -->
    <login-config>
      <auth-method>FORM</auth-method>
      <realm-name>Example Form-Based Authentication Area</realm-name>
      <form-login-config>
        <form-login-page>/jsp/security/protected/login.jsp</form-login-page>
        <form-error-page>/jsp/security/protected/error.jsp</form-error-page>
      </form-login-config>
    </login-config>

    <!-- Security roles referenced by this web application -->
    <security-role>
      <role-name>role1</role-name>
    </security-role>
    <security-role>
      <role-name>tomcat</role-name>
    </security-role>

    <!-- Environment entry examples -->
    <!--env-entry>
      <env-entry-description>
         The maximum number of tax exemptions allowed to be set.
      </env-entry-description>
      <env-entry-name>maxExemptions</env-entry-name>
      <env-entry-value>15</env-entry-value>
      <env-entry-type>java.lang.Integer</env-entry-type>
    </env-entry-->
    <env-entry>
      <env-entry-name>minExemptions</env-entry-name>
      <env-entry-value>1</env-entry-value>
      <env-entry-type>java.lang.Integer</env-entry-type>
    </env-entry>
    <env-entry>
      <env-entry-name>foo/name1</env-entry-name>
      <env-entry-value>value1</env-entry-value>
      <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    <env-entry>
      <env-entry-name>foo/bar/name2</env-entry-name>
      <env-entry-value>true</env-entry-value>
      <env-entry-type>java.lang.Boolean</env-entry-type>
    </env-entry>
    <env-entry>
      <env-entry-name>name3</env-entry-name>
      <env-entry-value>1</env-entry-value>
      <env-entry-type>java.lang.Integer</env-entry-type>
    </env-entry>
    <env-entry>
      <env-entry-name>foo/name4</env-entry-name>
      <env-entry-value>10</env-entry-value>
      <env-entry-type>java.lang.Integer</env-entry-type>
    </env-entry>

    <!-- EJB Reference -->
    <ejb-ref>
      <description>Example EJB Reference</description>
      <ejb-ref-name>ejb/Account</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <home>com.mycompany.mypackage.AccountHome</home>
      <remote>com.mycompany.mypackage.Account</remote>
    </ejb-ref>

    <!-- Local EJB Reference -->
    <ejb-local-ref>
      <description>Example Local EJB Reference</description>
      <ejb-ref-name>ejb/ProcessOrder</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>com.mycompany.mypackage.ProcessOrderHome</local-home>
      <local>com.mycompany.mypackage.ProcessOrder</local>
    </ejb-local-ref>


</web-app>

 

 

by: komlaaaPosted on 2005-09-24 at 16:08:56ID: 14952246

>>
Do you have :

<listener>    
     <listener-class>listeners.SessionListener</listener-class>  
</listener>

>>
yes

 

by: todd_farmerPosted on 2005-09-24 at 16:36:39ID: 14952303

The problem appears to be in your listeners.SessionListener class.  Can you provide that source code?

 

by: actonwangPosted on 2005-09-24 at 19:50:53ID: 14952717

Hi, komalaaa:

          If I am right, did you copy <tomcat>\webapps\examples\WEB-INF\web.xml into your webapp000\WEB-INFO\ directory?

          There are a lot of specific configurations in this web.xml. You might not be able to simply copy it into your own webapp without some modification. For this error, I guess under your own webapp000\WEB-INFO\classes, you don't have listeners directory which should include ContextListener.class and SessionListener.class.  

         This should be the reason for your error.

          I already pointed it out to you  and let you check on those classes on your classes directory.

         If you really want to borrow some functions from samples app or build yours from it, you can simply add your classes or jsp files into examples directory. Also you can be free to change the examples directory as your "webapp000".

Acton
         

 

by: komlaaaPosted on 2005-09-24 at 19:52:19ID: 14952720

>The problem appears to be in your listeners.SessionListener class.  Can you provide that source code?

/*
 * Copyright 1999,2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package listeners;


import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;


/**
 * Example listener for context-related application events, which were
 * introduced in the 2.3 version of the Servlet API.  This listener
 * merely documents the occurrence of such events in the application log
 * associated with our servlet context.
 *
 * @author Craig R. McClanahan
 * @version $Revision: 1.3 $ $Date: 2004/08/26 22:03:27 $
 */

public final class SessionListener
    implements ServletContextListener,
             HttpSessionAttributeListener, HttpSessionListener {


    // ----------------------------------------------------- Instance Variables


    /**
     * The servlet context with which we are associated.
     */
    private ServletContext context = null;


    // --------------------------------------------------------- Public Methods


    /**
     * Record the fact that a servlet context attribute was added.
     *
     * @param event The session attribute event
     */
    public void attributeAdded(HttpSessionBindingEvent event) {

      log("attributeAdded('" + event.getSession().getId() + "', '" +
          event.getName() + "', '" + event.getValue() + "')");

    }


    /**
     * Record the fact that a servlet context attribute was removed.
     *
     * @param event The session attribute event
     */
    public void attributeRemoved(HttpSessionBindingEvent event) {

      log("attributeRemoved('" + event.getSession().getId() + "', '" +
          event.getName() + "', '" + event.getValue() + "')");

    }


    /**
     * Record the fact that a servlet context attribute was replaced.
     *
     * @param event The session attribute event
     */
    public void attributeReplaced(HttpSessionBindingEvent event) {

      log("attributeReplaced('" + event.getSession().getId() + "', '" +
          event.getName() + "', '" + event.getValue() + "')");

    }


    /**
     * Record the fact that this web application has been destroyed.
     *
     * @param event The servlet context event
     */
    public void contextDestroyed(ServletContextEvent event) {

      log("contextDestroyed()");
      this.context = null;

    }


    /**
     * Record the fact that this web application has been initialized.
     *
     * @param event The servlet context event
     */
    public void contextInitialized(ServletContextEvent event) {

      this.context = event.getServletContext();
      log("contextInitialized()");

    }


    /**
     * Record the fact that a session has been created.
     *
     * @param event The session event
     */
    public void sessionCreated(HttpSessionEvent event) {

      log("sessionCreated('" + event.getSession().getId() + "')");

    }


    /**
     * Record the fact that a session has been destroyed.
     *
     * @param event The session event
     */
    public void sessionDestroyed(HttpSessionEvent event) {

      log("sessionDestroyed('" + event.getSession().getId() + "')");

    }


    // -------------------------------------------------------- Private Methods


    /**
     * Log a message to the servlet context application log.
     *
     * @param message Message to be logged
     */
    private void log(String message) {

      if (context != null)
          context.log("SessionListener: " + message);
      else
          System.out.println("SessionListener: " + message);

    }


    /**
     * Log a message and associated exception to the servlet context
     * application log.
     *
     * @param message Message to be logged
     * @param throwable Exception to be logged
     */
    private void log(String message, Throwable throwable) {

      if (context != null)
          context.log("SessionListener: " + message, throwable);
      else {
          System.out.println("SessionListener: " + message);
          throwable.printStackTrace(System.out);
      }

    }


}

 

by: actonwangPosted on 2005-09-24 at 20:00:25ID: 14952737

Hi, komlaaa:

            Did you check my last post?
            Should be no problem with this source code.  Tomcat internal web classloader couldn't find this class under WEB-INF\classes.
            It is similar to "No Class Found" error but since Tomcat has its own classloader and also you should not have lib directory so it only searchs for WEB-INFO\classes for listener classess.

Acton

 

by: actonwangPosted on 2005-09-24 at 20:05:43ID: 14952746

komlaaa,

      You also can use simple web.xml  I gave to you in your last related question as your start point to your application.

      Every element in your web.xml takes some meaning ...

      You might refer to this doc to configure your web.xml step by step:

      http://e-docs.bea.com/wls/docs61/webapp/web_xml.html


Acton

 

by: komlaaaPosted on 2005-09-24 at 20:54:19ID: 14952834

>...it only searchs for WEB-INFO\classes for listener classess
But do i have to have that The listner anse Session classes in order for my webapp to work?

 

by: komlaaaPosted on 2005-09-24 at 20:55:28ID: 14952836

Typo
*anse ===> should be and

 

by: todd_farmerPosted on 2005-09-24 at 20:58:19ID: 14952842

You need the listener classes or you need to comment that part of the web.xml out:

<!--
   <listener>
        <listener-class>listeners.ContextListener</listener-class>
    </listener>
    <listener>
        <listener-class>listeners.SessionListener</listener-class>
    </listener>
-->

 

by: actonwangPosted on 2005-09-24 at 21:18:03ID: 14952884

see my previous post, I already answered this :)


>>>>>>>>>>>>>>>
 Do you have :

<listener>    
     <listener-class>listeners.SessionListener</listener-class>  
</listener>

in your web.xml?

Remove these lines and try to start tomcat again.

BTW: if so , o you have this class in classes or lib jar files?

Acton

 

by: actonwangPosted on 2005-09-24 at 21:19:42ID: 14952887

Also, in your case. It will have another problems even if you oomment those out IMHO.

You might need to do as i told you:

(1) put your own code into examples instead of creating a new one.
(2) use a simplest web.xml and start from there. See the link I gave to you.

Acton

 

by: actonwangPosted on 2005-09-24 at 21:22:18ID: 14952894

Hey,komlaaa

As you requested, here is a link.

    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/

Acton

 

by: actonwangPosted on 2005-09-24 at 21:23:17ID: 14952897

Also,

       Use Tomcat 5.5 instead if possible.

Acton

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...