问题:
Tomcat启动成功,然后在部署应用的时候产生了如下的异常:
08-Jul-2017 21:45:26.064 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
08-Jul-2017 21:45:26.066 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
原因:
部署的war中没有包含依赖的jar
解决方法:
1 Ctrl+Alt+Shift+S弹出Project Structure窗口,在Output Layout标签中找到Available Elements,鼠标右击下面的元素:
2 点击Put into Output Root,执行后,在WEB-INF会增加lib目录,里面是项目引用的jar包,点击OK。再次部署应用就能成功运行了。