Project on eclipse deployment run directly with Tomcat: Startup failed due to previous errors

Source: Internet
Author: User

Just say the problem! is caused by different JDK versions.

Question review:

This type of problem occurs when you publish a project through eclipse to the Tomcat default run directory, and then run directly through Tomcat.

Reason:

My Computer uses two JDK versions at the same time, the default 1.7,eclipse use is 1.8, because the project starts to have the load class to need the jdk1.8 package, 1.7 does not support. As a result, the project can run directly in Eclipse, while the tomcat running outside is the error of startup failed due to previous errors.

But this kind of hint information question or the expression is more ambiguous, below we begin to reconsider the thought, by reviewing the log to analyze the reason.

In order to debug, we need to get a more detailed log. You can create a new file in the Web-inf/classes directory called Logging.properties

handlers = Org.apache.juli.FileHandler, Java.util.logging.ConsoleHandler  
  
#################################### ########################  
# Handler specific properties.  
# describes specific configuration info for handlers.  
############################################################  
  
org.apache.juli.FileHandler.level = FINE  
Org.apache.juli.FileHandler.directory = ${catalina.base}/logs  
Org.apache.juli.FileHandler.prefix = Error-debug .  
  
Java.util.logging.ConsoleHandler.level = FINE  

Error-debug.***.log files are generated in Tomcat's log directory. A more detailed message is provided. My feedback is as follows:

... Unsupported Major.minor version 52.0 (unable to load class Com.sdmc.controller.IndexController) ...

The version does not support the running of the above class, but the JDK1.8 package is used at compile time. So there's no error on eclipse.

This kind of problem wonderful, good nonsense don't say much, feeling not a lot. The summary is that a similar problem arises from the log.

If I had gotten into this habit, I wouldn't have taken so long, I'd have done it in minutes.

Related recommendation:

Http://blog.sina.com.cn/s/blog_826ca0d80102wl3f.html

Http://blog.csdn.net/mcpang/article/details/5468386

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.