简体   繁体   中英

Tomcat 7 java.lang.NoSuchMethodError: main - Mac OS X 10.6

I have unpacked the tar file in /usr/local and created a symbolic link in /Library/Tomcat. From there I made all.sh files in /bin executable. Upon startup, I get nothing, including a normal "could not connect" upon visiting localhost:8080. Checking my catalina.out shows "Exception in thread "main" java.lang.NoSuchMethodError: main" for each instance that I tried to start it up. I have followed numerous tutorials, including those here and here , but nothing seems to help the problem.

EDIT: Here is the trace when starting Tomcat

Using CATALINA_BASE: /Library/Tomcat
Using CATALINA_HOME: /Library/Tomcat
Using CATALINA_TMPDIR: /Library/Tomcat/temp
Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
Using CLASSPATH: /Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar

It seems you have incomaptible jar files in your classpath you use to launch Tomcat, (For example Tomcat 7 may depend on a library foo.jar version 1.2 but you have 1.1 installed)

The only way to know for sure is to see the strack trace (what method is Tomcat expecting and in which class). That will lead you to your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM