Java Tomcat没有在eclipse中启动
我正在使用Tomcat6.0和EclipseIndigo for Spring3.0以及mybatis 3.0应用程序,我使用的是Java7。我的问题是tomcat没有启动,我得到的对话框包含以下消息:Java Tomcat没有在eclipse中启动,java,eclipse,spring,tomcat,Java,Eclipse,Spring,Tomcat,我正在使用Tomcat6.0和EclipseIndigo for Spring3.0以及mybatis 3.0应用程序,我使用的是Java7。我的问题是tomcat没有启动,我得到的对话框包含以下消息: Server Tomcat v6.0 Server at localhost was unable to start within 55 seconds. If the server requires more time, try increasing the timeout in the se
Server Tomcat v6.0 Server at localhost was unable to start within 55
seconds. If the server requires more time, try increasing the timeout
in the server editor.
我尝试将超时时间增加到2分钟,但仍然收到相同的消息。在控制台中,tomcat启动消息打印在下面,第行作为最后一行打印:
INFO: Loading XML bean definitions from ServletContext resource
[/WEB-INF/rest-servlet.xml]
早些时候它运转良好。但今天我开始在运行tomcat时收到超时消息
有什么问题吗
解决方案1:
更改超时时间:
- 打开服务器视图
- 双击服务器
- 检查超时(为开始添加一个大数字)如20000
- Java编译器的版本在项目属性
->Java构建路径-->库选项卡-->选择“JRE系统库”-->编辑中配置
- Tomcat:
服务器视图-->双击您的Tomcat服务器-->运行时环境
- 打开服务器视图
- 双击服务器
- 检查超时(为开始添加一个大数字)如20000
- Java编译器的版本在项目属性
->Java构建路径-->库选项卡-->选择“JRE系统库”-->编辑中配置
- Tomcat:
服务器视图-->双击您的Tomcat服务器-->运行时环境
我能解决这个问题。清理项目之后,tomcat启动了,但问题在下一次启动时再次出现。在控制台中,我发现了以下错误- 警告:忽略XML验证警告org.XML.sax.SAXParseException; 行号:15;栏目号:31;架构_引用。4:读取失败 模式文档 '', 因为1)找不到文档;2) 无法保存该文件 阅读3) 文档的根元素不是。在 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(未知 来源)在 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(未知 (来源) 2015年7月24日下午2:31:11 org.springframework.web.servlet.FrameworkServlet initServletBean 严重:上下文初始化失败 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: ServletContext资源的XML文档中的第15行 [/WEB-INF/rest servlet.xml]无效;嵌套异常是 org.xml.sax.SAXParseException;行号:15;栏目号:31; cvc complex type.2.4.c:匹配的通配符是严格的,但没有 可以找到元素“context:annotation-config”的声明 原因:org.xml.sax.saxpasseeption;行号:15; 栏目号:31;cvc复杂类型.2.4.c:匹配的通配符为 严格,但找不到元素的声明 '上下文:注释配置' 2015年7月24日下午2:31:11 org.apache.catalina.core.ApplicationContext 日志严重:StandardWrapper。可丢弃 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: ServletContext资源的XML文档中的第15行 [/WEB-INF/rest servlet.xml]无效;嵌套异常是 org.xml.sax.SAXParseException;行号:15;栏目号:31; cvc complex type.2.4.c:匹配的通配符是严格的,但没有 可以找到元素“context:annotation-config”的声明 原因:org.xml.sax.saxpasseeption;行号:15; 栏目号:31;cvc复杂类型.2.4.c:匹配的通配符为 严格,但找不到元素的声明 '上下文:注释配置' 所以我检查了WEB-INF文件夹中的servlet.xml文件,发现
INFO: Loading XML bean definitions from ServletContext resource
[/WEB-INF/rest-servlet.xml]