hibernate源程序运行出错
发表在JavaWeb图书答疑 2016-06-25
是否精华
版块置顶:
上次您给我的回复中还没告诉我如何单步调试java web程序,这次一定要告诉我,再有上次我提到的《java web 从入门到精通》一书中的(第十六章第2、3、4、5、6、7等光盘中的实例源程序)运行时总是出现type Status report message /2/ description The requested resource is not available.lib文件夹中所需的jar包我也都考进去了,程序中也没出现红色的叉号,源程序中的数据库应该是db_database10,而不是db_database16,密码根据我的mysql的密码我也在hibernate配置文件中修改了,我反复的找也还是同样的运行结果,很是郁闷,到底应该怎么办?我感觉应是光盘中的源程序存在错误或遗漏,我发现上面提到的几个源程序都主要通过文件夹com.mr.main中的main方法进行数据库的相关操作的,这能行吗?虽然有关的类文件通过import导入了,但是hibernate配置文件和类的配置文件没法导入,程序能自动连接吗?而且我还发现其中的web.xml文件都没进行配置,是否要通过servlet程序才能对数据库进行相应的操作,望能及时告诉我如何修改,多谢,急盼佳音!另附上您要的源程序16.2运行时的控制台信息:六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:struts2lianxi' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:strutspractice' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:dynamicaction' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:strutsappli3' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:strutsapp4' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:strutsgaojiapp1' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:4' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:5' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:2' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:6' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:1' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:8' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:10' did not find a matching property.
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.68
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Feb 8 2016 20:25:54 UTC
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.68.0
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 7
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.1
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Java\jdk1.8.0_65\jre
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_65-b17
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         G:\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\迅雷下载\apache-tomcat-7.0.68-windows-x64\apache-tomcat-7.0.68
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=G:\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\迅雷下载\apache-tomcat-7.0.68-windows-x64\apache-tomcat-7.0.68
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=G:\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\迅雷下载\apache-tomcat-7.0.68-windows-x64\apache-tomcat-7.0.68\endorsed
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
六月 25, 2016 9:54:54 上午 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:\Java\jdk1.8.0_65\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Java/jdk1.8.0_65/bin/../jre/bin/server;C:/Java/jdk1.8.0_65/bin/../jre/bin;C:/Java/jdk1.8.0_65/bin/../jre/lib/amd64;.;C:\Java\jdk1.8.0_65\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows7Master;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;F:\AppServ\Apache2.2\bin;F:\AppServ\php5;F:\AppServ\MySQL\bin;G:\eclipse;;.
六月 25, 2016 9:54:54 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
六月 25, 2016 9:54:54 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
六月 25, 2016 9:54:54 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 929 ms
六月 25, 2016 9:54:54 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
六月 25, 2016 9:54:54 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.68
六月 25, 2016 9:54:55 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [253] milliseconds.
六月 25, 2016 9:54:57 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
六月 25, 2016 9:54:57 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
六月 25, 2016 9:54:58 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
六月 25, 2016 9:54:58 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
六月 25, 2016 9:54:58 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-plugin.xml]
六月 25, 2016 9:54:58 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts.xml]
六月 25, 2016 9:54:58 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Overriding property struts.i18n.reload - old value: false new value: true
六月 25, 2016 9:54:58 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Overriding property struts.configuration.xml.reload - old value: false new value: true
六月 25, 2016 9:55:01 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
六月 25, 2016 9:55:01 上午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExectuteFilter
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:504)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:486)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:113)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4908)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5602)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

六月 25, 2016 9:55:01 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
六月 25, 2016 9:55:01 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/struts2lianxi] startup failed due to previous errors
六月 25, 2016 9:55:02 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
六月 25, 2016 9:55:02 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
六月 25, 2016 9:55:03 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
六月 25, 2016 9:55:03 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
六月 25, 2016 9:55:03 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-plugin.xml]
六月 25, 2016 9:55:03 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts.xml]
六月 25, 2016 9:55:03 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
六月 25, 2016 9:55:04 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
六月 25, 2016 9:55:04 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
六月 25, 2016 9:55:04 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
六月 25, 2016 9:55:04 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-plugin.xml]
六月 25, 2016 9:55:04 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts.xml]
六月 25, 2016 9:55:04 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Overriding property struts.i18n.reload - old value: false new value: true
六月 25, 2016 9:55:04 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Overriding property struts.configuration.xml.reload - old value: false new value: true
六月 25, 2016 9:55:04 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
六月 25, 2016 9:55:04 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
六月 25, 2016 9:55:05 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
六月 25, 2016 9:55:05 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-plugin.xml]
六月 25, 2016 9:55:05 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts.xml]
六月 25, 2016 9:55:05 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
六月 25, 2016 9:55:05 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
六月 25, 2016 9:55:05 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
六月 25, 2016 9:55:05 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-plugin.xml]
六月 25, 2016 9:55:05 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts.xml]
六月 25, 2016 9:55:05 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Overriding property struts.i18n.reload - old value: false new value: true
六月 25, 2016 9:55:05 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Overriding property struts.configuration.xml.reload - old value: false new value: true
六月 25, 2016 9:55:05 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
六月 25, 2016 9:55:05 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
六月 25, 2016 9:55:05 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 11096 ms
分享到:
精彩评论 1
菜鸟级精英
学分:0 LV1
TA的每日心情
开心
2020-03-23 21:05:48
2016-06-28
沙发
十六章和十七章有“com.mr.main”这个包的,优先运行这个包下的主类main方法。使用web项目是因为方便导入jar包
首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照