一直说 xml 有问题,但是检查 N 边。并未发现问题呀。。。求帮助
applicationContext24.xml 内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- Service object: Hibernate implementation -->
<bean id="kwmisRepService" parent="txProxyTemplate">
<property name="target">
<bean class="com.mrg.kwmis.workflat.biz.service.impl.KwmisKtKjReportServiceImpl">
<property name="kjReportDAO"><ref bean="kjReportDAO" /></property>
<property name="commonDAO"><ref bean="commonDAO"/></property>
</bean>
</property>
</bean>
<bean id="kjReportDAO" class="com.mrg.kwmis.workflat.biz.dao.impl.KwmisKtKjReportDaoImpl">
<property name="sessionFactory"><ref bean="sessionFactory" /></property>
</bean>
<bean id="identifyingCodeService" parent="txProxyTemplate">
<property name="target">
<bean class="com.mrg.kwmis.workflat.biz.service.impl.IdentifyingCodeServiceImpl">
<property name="identifyingCodeDAO"><ref bean="identifyingCodeDAO" /></property>
</bean>
</property>
</bean>
<bean id="identifyingCodeDAO" class="com.mrg.kwmis.workflat.biz.dao.impl.IdentifyingCodeDaoImpl">
<property name="sessionFactory"><ref bean="sessionFactory" /></property>
</bean>
</beans>
报错信息如下:
信息: validateJarFile(D:\soft\tomcat 5.0.24\webapps\ROOT\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
-20160801-11:37:59 main org.springframework.orm.hibernate3.support.OpenSessionInViewFilter Initializing filter 'hibernateFilter'
-20160801-11:37:59 main org.springframework.core.CollectionFactory JDK 1.4+ collections available
-20160801-11:37:59 main org.springframework.core.CollectionFactory Commons Collections 3.x available
-20160801-11:37:59 main org.springframework.orm.hibernate3.support.OpenSessionInViewFilter Filter 'hibernateFilter' configured successfully
[ERROR] 85328 [main] org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:205) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'identifyingCodeService' defined in ServletContext resource [/WEB-INF/applicationContext24.xml]: Cannot create inner bean 'com.mrg.kwmis.workflat.biz.service.impl.IdentifyingCodeServiceImpl#1d4ee7e' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.mrg.kwmis.workflat.biz.service.impl.IdentifyingCodeServiceImpl#1d4ee7e' defined in ServletContext resource [/WEB-INF/applicationContext24.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: sessionFactory or hibernateTemplate is required
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.mrg.kwmis.workflat.biz.service.impl.IdentifyingCodeServiceImpl#1d4ee7e' defined in ServletContext resource [/WEB-INF/applicationContext24.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: sessionFactory or hibernateTemplate is required
java.lang.IllegalArgumentException: sessionFactory or hibernateTemplate is required
at org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfig(HibernateDaoSupport.java:112)
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:43)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1091)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:396)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:151)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:97)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1046)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:83)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1019)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3991)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4335)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:683)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:476)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
2016-8-1 11:39:28 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于