我整合SSH2的时候启动时候tomcat6.0出现异常

2009-3-19 21:23:34 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: D:\Program Files\MyEclipse 6.5\bin;D:\Program Files\apache-tomcat-6.0.18\bin
2009-3-19 21:23:34 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2009-3-19 21:23:34 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1718 ms
2009-3-19 21:23:35 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2009-3-19 21:23:35 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.18
2009-3-19 21:23:43 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2009-03-19 21:23:43,125 [org.springframework.web.context.ContextLoader]-[INFO] Root WebApplicationContext: initialization started
2009-03-19 21:23:43,343 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@6bd9e0: display name [Root WebApplicationContext]; startup date [Thu Mar 19 21:23:43 CST 2009]; root of context hierarchy
2009-03-19 21:23:43,625 [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-[INFO] Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/applicationContext.xml]
2009-03-19 21:23:45,031 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@6bd9e0]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5539d8
2009-03-19 21:23:45,484 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5539d8: defining beans [dataSource,sessionFactory,baseDAO,userDAO,userService,userAction]; root of factory hierarchy
2009-03-19 21:23:45,968 [org.hibernate.cfg.Environment]-[INFO] Hibernate 3.2.2
2009-03-19 21:23:45,984 [org.hibernate.cfg.Environment]-[INFO] hibernate.properties not found
2009-03-19 21:23:45,984 [org.hibernate.cfg.Environment]-[INFO] Bytecode provider name : cglib
2009-03-19 21:23:46,015 [org.hibernate.cfg.Environment]-[INFO] using JDK 1.4 java.sql.Timestamp handling
2009-03-19 21:23:46,875 [org.hibernate.cfg.HbmBinder]-[INFO] Mapping class: com.softeem.structs2.pojo.UserInfo -> userinfo
2009-03-19 21:23:46,953 [org.springframework.orm.hibernate3.LocalSessionFactoryBean]-[INFO] Building new Hibernate SessionFactory
2009-03-19 21:23:47,250 [org.hibernate.connection.ConnectionProviderFactory]-[INFO] Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
2009-03-19 21:23:47,984 [org.hibernate.cfg.SettingsFactory]-[INFO] RDBMS: Microsoft SQL Server, version: 9.00.1399
2009-03-19 21:23:47,984 [org.hibernate.cfg.SettingsFactory]-[INFO] JDBC driver: Microsoft SQL Server 2005 JDBC Driver, version: 1.1.1501.101
2009-03-19 21:23:48,062 [org.hibernate.dialect.Dialect]-[INFO] Using dialect: org.hibernate.dialect.SQLServerDialect
2009-03-19 21:23:48,109 [org.hibernate.transaction.TransactionFactoryFactory]-[INFO] Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
2009-03-19 21:23:48,109 [org.hibernate.transaction.TransactionManagerLookupFactory]-[INFO] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Automatic flush during beforeCompletion(): disabled
2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Automatic session close at end of transaction: disabled
2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Scrollable result sets: enabled
2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] JDBC3 getGeneratedKeys(): enabled
2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Connection release mode: auto
2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Default batch fetch size: 1
2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Generate SQL with comments: disabled
2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Order SQL updates by primary key: disabled
2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2009-03-19 21:23:48,125 [org.hibernate.hql.ast.ASTQueryTranslatorFactory]-[INFO] Using ASTQueryTranslatorFactory
2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Query language substitutions: {}
2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] JPA-QL strict compliance: disabled
2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Second-level cache: enabled
2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Query cache: disabled
2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Cache provider: org.hibernate.cache.NoCacheProvider
2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Optimize cache for minimal puts: disabled
2009-03-19 21:23:48,140 [org.hibernate.cfg.SettingsFactory]-[INFO] Structured second-level cache entries: disabled
2009-03-19 21:23:48,156 [org.hibernate.cfg.SettingsFactory]-[INFO] Statistics: disabled
2009-03-19 21:23:48,156 [org.hibernate.cfg.SettingsFactory]-[INFO] Deleted entity synthetic identifier rollback: disabled
2009-03-19 21:23:48,156 [org.hibernate.cfg.SettingsFactory]-[INFO] Default entity-mode: pojo
2009-03-19 21:23:48,156 [org.hibernate.cfg.SettingsFactory]-[INFO] Named query checking : enabled
2009-03-19 21:23:48,281 [org.hibernate.impl.SessionFactoryImpl]-[INFO] building session factory
2009-03-19 21:23:49,437 [org.hibernate.impl.SessionFactoryObjectFactory]-[INFO] Not binding factory to JNDI, no JNDI name configured
2009-03-19 21:23:49,578 [org.springframework.web.context.ContextLoader]-[INFO] Root WebApplicationContext: initialization completed in 6453 ms
2009-03-19 21:23:50,171 [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]-[INFO] Parsing configuration file [struts-default.xml]
2009-03-19 21:23:50,765 [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]-[INFO] Parsing configuration file [struts-plugin.xml]
2009-03-19 21:23:50,796 [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]-[INFO] Parsing configuration file [struts.xml]
2009-3-19 21:23:50 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - [unknown location]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: Cannot locate the chosen ObjectFactory implementation: spring - [unknown location]
at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:287)
at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:258)
at org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionProvider.java:203)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:165)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 30 more
2009-3-19 21:23:50 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2009-3-19 21:23:50 org.apache.catalina.core.StandardContext start
严重: Context [/loginStruct2] startup failed due to previous errors
2009-3-19 21:23:50 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2009-03-19 21:23:50,843 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Closing org.springframework.web.context.support.XmlWebApplicationContext@6bd9e0: display name [Root WebApplicationContext]; startup date [Thu Mar 19 21:23:43 CST 2009]; root of context hierarchy
2009-03-19 21:23:50,843 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5539d8: defining beans [dataSource,sessionFactory,baseDAO,userDAO,userService,userAction]; root of factory hierarchy
2009-03-19 21:23:50,843 [org.springframework.orm.hibernate3.LocalSessionFactoryBean]-[INFO] Closing Hibernate SessionFactory
2009-03-19 21:23:50,843 [org.hibernate.impl.SessionFactoryImpl]-[INFO] closing
2009-3-19 21:23:51 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2009-3-19 21:23:52 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2009-3-19 21:23:52 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/47 config=null
2009-3-19 21:23:52 org.apache.catalina.startup.Catalina start
信息: Server startup in 17210 ms
------我选择刚刚接触SSH2,不知道是那个地方出了问题,请各位大哥帮帮我,不胜感激!!!!!!
下面是我上传的 工程图和架包图 applicationContext.xml ,struts.xml,web.xml的配置文件 希望能够有所帮助!
我在这里等这各位大哥的答复
[b]问题补充:[/b]
上面有我上传的配置文件 我看了半天都不知道那里不对,因为我刚刚接触SSH2,还有许多都不太明白,希望您能不能够说详细点,谢谢了 :arrow:
[b]问题补充:[/b]
我把WEB.XML文件里面的
<!-- struts2 filter -->

struts2
org.apache.struts2.dispatcher.FilterDispatcher


struts2
/*

去掉发布就没有错误,好郁闷啊,这个问题困了我2天了,解决不鸟,心里好不爽,所以我一定要解决他,还麻烦各位大哥,大姐的帮助我啊

6个回答

主要是jar包问题,因为struts2环境下,如果有些jar包你放进去了.他会默认加载的.所以就会发生很多错误,还有你的登录验证的方法没有设置参数q.setString(0,username);q.setString(1,password);
我把你的index.jsp删除了.你的login.html页面里面的内容用到了jsp标签,我login.html该名为index.jsp了.然后struts.xml里面:

/login.html

你要把他改一下,我忘记帮你改成/index.jsp了

Unable to load configuration. - [unknown location]

这个问题看起来是你的struts的配置文件没找到。你检查一下是不是struts里面找不到这个路径?

看了你的配置。。比较凌乱。建议你将配置文件都放在web-inf下面。至少spring的配置文件跟struts的配置文件都要放在web-inf下面。

然后几个路径缺少的,要加回去。

我传一个我这边可以运行的项目的一个配置文件的范例给你吧,你参考一下配置。不过这边没有hibernate的配置,这个你最好找个书籍参考一下。

struts2的配置文件没有找到,你放在src目录下了吗(编译之后会出现在classes目录下)

从简单的3个配置文件看不出问题来.你要把工程放上来.或者提供更详细的信息

commons-logging-1.0.4.jar
freemarker-2.3.12.jar
ognl-2.6.11.jar
struts2-core-2.1.2.jar
xwork-2.1.1.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar

struts 基本需要的包 只要上面这几个。
把其他不相关的jar去掉。
只留下需要的,应该就没有问题了。

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