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