我是参照《Java web项目开发 实战入门》做的门户网站,打开‘新闻’显示数据服务器出现错误!mysql连接正常
无语_mrkj 发表于2017-09-05 17:31
应该是数据库没有连接成功。您看一下控制台上有什么异常信息发过来我们看一下,就是在Eclipse的底部有个Console面板中查看。
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/8.0.46
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Aug 10 2017 10:10:31 UTC
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 8.0.46.0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jdk1.8.0_144\jre
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_144-b01
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: C:\Tomcat 8.0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=C:\Tomcat 8.0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=C:\Tomcat 8.0\endorsed
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
九月 06, 2017 10:17:51 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: 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\jdk1.8.0_144\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk1.8.0_144/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_144/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_144/bin/../jre/lib/amd64;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Program Files\Java\jdk1.8.0_144\jre\bin;;D:\BaiduNetdiskDownload\eclipse-jee-oxygen-R-win32-x86_64\eclipse;;.
九月 06, 2017 10:17:51 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
九月 06, 2017 10:17:52 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 06, 2017 10:17:52 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
九月 06, 2017 10:17:52 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1306 ms
九月 06, 2017 10:17:52 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
九月 06, 2017 10:17:52 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.46
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\mysoyp.xml
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:mysoyp' did not find a matching property.
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deployment of configuration descriptor C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\mysoyp.xml has finished in 38 ms
九月 06, 2017 10:17:52 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
九月 06, 2017 10:17:52 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 516 ms
Songyap_1504493890 发表于2017-09-06 10:22
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/8.0.46
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Aug 10 2017 10:10:31 UTC
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 8.0.46.0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jdk1.8.0_144\jre
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_144-b01
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: C:\Tomcat 8.0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=C:\Tomcat 8.0
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=C:\Tomcat 8.0\endorsed
九月 06, 2017 10:17:51 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
九月 06, 2017 10:17:51 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: 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\jdk1.8.0_144\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk1.8.0_144/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_144/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_144/bin/../jre/lib/amd64;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Program Files\Java\jdk1.8.0_144\jre\bin;;D:\BaiduNetdiskDownload\eclipse-jee-oxygen-R-win32-x86_64\eclipse;;.
九月 06, 2017 10:17:51 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
九月 06, 2017 10:17:52 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 06, 2017 10:17:52 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
九月 06, 2017 10:17:52 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1306 ms
九月 06, 2017 10:17:52 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
九月 06, 2017 10:17:52 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.46
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\mysoyp.xml
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:mysoyp' did not find a matching property.
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deployment of configuration descriptor C:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\mysoyp.xml has finished in 38 ms
九月 06, 2017 10:17:52 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
九月 06, 2017 10:17:52 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
九月 06, 2017 10:17:52 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 516 ms
您的问题最后解决了吗亲。