新人第一次发帖,求教:javaEE和TOMcat相关问题

今天学习了javaEE,然后想跳试一下自己的程序,没想到一直报错,也不知道什么原因

7个回答

2015-8-13 15:51:39 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Lenovo\Lenovo Home\;E:\sql\MySQL Utilities 1.3.5\;E:\sql\MySQL Server 5.7\bin;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program Files\Java\jdk1.7.0_51\jre\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Lenovo\Lenovo Home\DCMainWin.exe;.
2015-8-13 15:51:40 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:struts2-1' did not find a matching property.
2015-8-13 15:51:40 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ter' did not find a matching property.
2015-8-13 15:51:40 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
2015-8-13 15:51:40 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
2015-8-13 15:51:40 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 828 ms
2015-8-13 15:51:40 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
2015-8-13 15:51:40 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.40
2015-8-13 15:51:40 org.apache.tomcat.util.digester.Digester fatalError
严重: Parse Fatal Error at line 2 column 1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1890)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1259)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2015-8-13 15:51:40 org.apache.catalina.startup.ContextConfig parseWebXml
严重: Parse error in application web.xml file at jndi:/localhost/struts2-1/WEB-INF/web.xml
org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1890)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1259)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2015-8-13 15:51:40 org.apache.catalina.startup.ContextConfig parseWebXml
严重: Occurred at line 2 column 1
2015-8-13 15:51:40 org.apache.catalina.startup.ContextConfig configureStart
严重: Marking this application unavailable due to previous error(s)
2015-8-13 15:51:40 org.apache.catalina.core.StandardContext startInternal
严重: Error getConfigured
2015-8-13 15:51:40 org.apache.catalina.core.StandardContext startInternal
严重: Context [/struts2-1] startup failed due to previous errors
2015-8-13 15:51:40 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.40\webapps\docs
2015-8-13 15:51:40 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.40\webapps\examples
2015-8-13 15:51:41 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2015-8-13 15:51:41 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2015-8-13 15:51:41 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@3dbe8711')
2015-8-13 15:51:41 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.40\webapps\host-manager
2015-8-13 15:51:41 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.40\webapps\manager
2015-8-13 15:51:41 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.40\webapps\ROOT
2015-8-13 15:51:41 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
2015-8-13 15:51:41 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
2015-8-13 15:51:41 org.apache.catalina.startup.Catalina start
信息: Server startup in 951 ms

qq_30578229
春秋归来 回复另一花生: 嗯 我懂了,信息标签不是错误的意思,我以为只要是红字就是错误。。。
4 年多之前 回复
cuiwei1026522829
另一花生 首先要会看控制台的信息,就是你贴的这些,写的严重的地方就是错误所在,然后根据这个错误再找哪里有问题了,实在不明白错误的意思,百度一下,可以找到相关的错误解决办法,我手机端没法贴,你那个严重报错那行,搜一下,你写的关于XML的东西??
4 年多之前 回复

上面是错误代码,这么多红字,我也不知道什么问题

我知道原因了,是因为我以前1.7jdk写的,然后我改成了1.6的jdk直接运行就出错了

图片说明

如果还有错误 就删除F:\apache-tomcat-7.0.40\conf\Catalina\localhost下的xml文件中的最后一行 source="org.eclipse.jst.jee.server:HelloWorld_new"/>

另外,上面的错误代码我好像发了两遍,所以显示的非常多。。。。

第一次发帖,感觉好不规范,不知道有人看没

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问