When Tomcat is configured in eclipse, an error occurs when Tomcat is started. cocould not find main class

Source: Internet
Author: User
Tags apache tomcat

The error message is as follows, mainly because there is a/tomcat-users.xml.new (the system cannot find the specified path .)

2006-9-3 11:28:39 org. Apache. Coyote. http11.http11protocol init
Information: initializing coyote HTTP/1.1 on http-8080
2006-9-3 11:28:40 org. Apache. Catalina. startup. Catalina Load
Information: initialization processed in 1360 MS
2006-9-3 11:28:40 org. Apache. Naming. namingcontext Lookup
Warning unexpected exception resolving reference
Java. Io. filenotfoundexception: H:/eclipse-SDK-3.2-win32/tomcat 5.0/work/Catalina/CONF/tomcat-users.xml.new (the system cannot find the specified path .)
At java. Io. fileoutputstream. Open (native method)
At java. Io. fileoutputstream. <init> (unknown source)
At java. Io. fileoutputstream. <init> (unknown source)
At org. Apache. Catalina. Users. memoryuserdatabase. Save (memoryuserdatabase. Java: 462)
At org. Apache. Catalina. Users. memoryuserdatabasefactory. getobjectinstance (memoryuserdatabasefactory. Java: 98)
At org. Apache. Naming. Factory. resourcefactory. getobjectinstance (resourcefactory. Java: 129)
At javax. Naming. SPI. namingmanager. getobjectinstance (unknown source)
At org. Apache. Naming. namingcontext. Lookup (namingcontext. Java: 791)
At org. Apache. Naming. namingcontext. Lookup (namingcontext. Java: 151)
At org. Apache. Catalina. mbeans. globalresourceslifecyclelistener. creatembeans (globalresourceslifecyclelistener. Java: 155)
At org. Apache. Catalina. mbeans. globalresourceslifecyclelistener. creatembeans (globalresourceslifecyclelistener. Java: 125)
At org. Apache. Catalina. mbeans. globalresourceslifecyclelistener. lifecycleevent (globalresourceslifecyclelistener. Java: 97)
At org. Apache. Catalina. util. lifecyclesupport. firelifecycleevent (lifecyclesupport. Java: 119)
At org. Apache. Catalina. Core. standardserver. Start (standardserver. Java: 2306)
At org. Apache. Catalina. startup. Catalina. Start (Catalina. Java: 556)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (unknown source)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (unknown source)
At java. Lang. Reflect. method. Invoke (unknown source)
At org. Apache. Catalina. startup. Bootstrap. Start (Bootstrap. Java: 287)
At org. Apache. Catalina. startup. Bootstrap. Main (Bootstrap. Java: 425)
2006-9-3 11:28:40 org. Apache. Catalina. mbeans. globalresourceslifecyclelistener creatembeans
Severe: Exception Processing global JNDI Resources
Javax. Naming. namingexception: H:/eclipse-SDK-3.2-win32/tomcat 5.0/work/Catalina/CONF/tomcat-users.xml.new (the system cannot find the specified path .)
At org. Apache. Naming. namingcontext. Lookup (namingcontext. Java: 803)
At org. Apache. Naming. namingcontext. Lookup (namingcontext. Java: 151)
At org. Apache. Catalina. mbeans. globalresourceslifecyclelistener. creatembeans (globalresourceslifecyclelistener. Java: 155)
At org. Apache. Catalina. mbeans. globalresourceslifecyclelistener. creatembeans (globalresourceslifecyclelistener. Java: 125)
At org. Apache. Catalina. mbeans. globalresourceslifecyclelistener. lifecycleevent (globalresourceslifecyclelistener. Java: 97)
At org. Apache. Catalina. util. lifecyclesupport. firelifecycleevent (lifecyclesupport. Java: 119)
At org. Apache. Catalina. Core. standardserver. Start (standardserver. Java: 2306)
At org. Apache. Catalina. startup. Catalina. Start (Catalina. Java: 556)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (unknown source)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (unknown source)
At java. Lang. Reflect. method. Invoke (unknown source)
At org. Apache. Catalina. startup. Bootstrap. Start (Bootstrap. Java: 287)
At org. Apache. Catalina. startup. Bootstrap. Main (Bootstrap. Java: 425)
2006-9-3 11:28:40 org. Apache. Catalina. Core. standardservice start
Information: starting service Catalina
2006-9-3 11:28:40 org. Apache. Catalina. Core. standardengine start
Information: Starting Servlet Engine: Apache Tomcat/5.0.28
2006-9-3 11:28:40 org. Apache. Naming. namingcontext Lookup
Warning unexpected exception resolving reference
Java. Io. filenotfoundexception: H:/eclipse-SDK-3.2-win32/tomcat 5.0/work/Catalina/CONF/tomcat-users.xml.new (the system cannot find the specified path .)
At java. Io. fileoutputstream. Open (native method)
At java. Io. fileoutputstream. <init> (unknown source)
At java. Io. fileoutputstream. <init> (unknown source)
At org. Apache. Catalina. Users. memoryuserdatabase. Save (memoryuserdatabase. Java: 462)
At org. Apache. Catalina. Users. memoryuserdatabasefactory. getobjectinstance (memoryuserdatabasefactory. Java: 98)
At org. Apache. Naming. Factory. resourcefactory. getobjectinstance (resourcefactory. Java: 129)
At javax. Naming. SPI. namingmanager. getobjectinstance (unknown source)
At org. Apache. Naming. namingcontext. Lookup (namingcontext. Java: 791)
At org. Apache. Naming. namingcontext. Lookup (namingcontext. Java: 151)
At org. Apache. Catalina. realm. userdatabaserealm. Start (userdatabaserealm. Java: 252)
At org. Apache. Catalina. Core. containerbase. Start (containerbase. Java: 1075)
At org. Apache. Catalina. Core. standardengine. Start (standardengine. Java: 478)
At org. Apache. Catalina. Core. standardservice. Start (standardservice. Java: 480)
At org. Apache. Catalina. Core. standardserver. Start (standardserver. Java: 2313)
At org. Apache. Catalina. startup. Catalina. Start (Catalina. Java: 556)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (unknown source)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (unknown source)
At java. Lang. Reflect. method. Invoke (unknown source)
At org. Apache. Catalina. startup. Bootstrap. Start (Bootstrap. Java: 287)
At org. Apache. Catalina. startup. Bootstrap. Main (Bootstrap. Java: 425)
Javax. Naming. namingexception: H:/eclipse-SDK-3.2-win32/tomcat 5.0/work/Catalina/CONF/tomcat-users.xml.new (the system cannot find the specified path .)
At org. Apache. Naming. namingcontext. Lookup (namingcontext. Java: 803)
At org. Apache. Naming. namingcontext. Lookup (namingcontext. Java: 151)
At org. Apache. Catalina. realm. userdatabaserealm. Start (userdatabaserealm. Java: 252)
At org. Apache. Catalina. Core. containerbase. Start (containerbase. Java: 1075)
At org. Apache. Catalina. Core. standardengine. Start (standardengine. Java: 478)
At org. Apache. Catalina. Core. standardservice. Start (standardservice. Java: 480)
At org. Apache. Catalina. Core. standardserver. Start (standardserver. Java: 2313)
At org. Apache. Catalina. startup. Catalina. Start (Catalina. Java: 556)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (unknown source)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (unknown source)
At java. Lang. Reflect. method. Invoke (unknown source)
At org. Apache. Catalina. startup. Bootstrap. Start (Bootstrap. Java: 287)
At org. Apache. Catalina. startup. Bootstrap. Main (Bootstrap. Java: 425)
2006-9-3 11:28:40 org. Apache. Catalina. startup. Catalina start
Severe: Catalina. Start:
Lifecycleexception: No userdatabase component found under key userdatabase
At org. Apache. Catalina. realm. userdatabaserealm. Start (userdatabaserealm. Java: 259)
At org. Apache. Catalina. Core. containerbase. Start (containerbase. Java: 1075)
At org. Apache. Catalina. Core. standardengine. Start (standardengine. Java: 478)
At org. Apache. Catalina. Core. standardservice. Start (standardservice. Java: 480)
At org. Apache. Catalina. Core. standardserver. Start (standardserver. Java: 2313)
At org. Apache. Catalina. startup. Catalina. Start (Catalina. Java: 556)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (unknown source)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (unknown source)
At java. Lang. Reflect. method. Invoke (unknown source)
At org. Apache. Catalina. startup. Bootstrap. Start (Bootstrap. Java: 287)
At org. Apache. Catalina. startup. Bootstrap. Main (Bootstrap. Java: 425)
2006-9-3 11:28:40 org. Apache. Catalina. startup. Catalina start
Information: server startup in 156 MS

Solution: Leave Tomcat base empty in the figure.

If the problem persists, configure the tomcat_home environment variable.

 

Cocould not find main class error

If the Java Virtual Machine parameter-xms512m or-xmx1024m is set incorrectly, the cocould not find main class error is returned.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.