SSH整合问题 高手进 小弟都抓狂了

问题描述

13:18:35,886INFODefaultListableBeanFactory:282-Destroyingsingletonsinorg.springframework.beans.factory.support.DefaultListableBeanFactory@d5b111:definingbeans[dataSource,sessionFactory,transmanager,txAdvice,org.springframework.aop.config.internalAutoProxyCreator,pt,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor,VipUserDao,UserRankDao,VipService,/vipUser];rootoffactoryhierarchy13:18:35,889ERRORContextLoader:205-Contextinitializationfailedorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'sessionFactory'definedinServletContextresource[/WEB-INF/applicationContext.xml]:Invocationofinitmethodfailed;nestedexceptionisjava.io.FileNotFoundException:classpathresource[com/happygo/manager/entity/user/EcsUsers.hbm.xmlcom/happygo/manager/entity/user/EcsUserRank.hbm.xml]cannotbeopenedbecauseitdoesnotexistCausedby:java.io.FileNotFoundException:classpathresource[com/happygo/manager/entity/user/EcsUsers.hbm.xmlcom/happygo/manager/entity/user/EcsUserRank.hbm.xml]cannotbeopenedbecauseitdoesnotexistatorg.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135)atorg.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:655)atorg.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)atorg.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)atorg.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4336)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:719)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)atorg.apache.catalina.core.StandardService.start(StandardService.java:448)atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)atorg.apache.catalina.startup.Catalina.start(Catalina.java:552)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)2009-10-2913:18:35org.apache.catalina.core.StandardContextlistenerStart

解决方案

解决方案二:
009-10-2913:18:35org.apache.catalina.core.StandardContextlistenerStart严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'sessionFactory'definedinServletContextresource[/WEB-INF/applicationContext.xml]:Invocationofinitmethodfailed;nestedexceptionisjava.io.FileNotFoundException:classpathresource[com/happygo/manager/entity/user/EcsUsers.hbm.xmlcom/happygo/manager/entity/user/EcsUserRank.hbm.xml]cannotbeopenedbecauseitdoesnotexistCausedby:java.io.FileNotFoundException:classpathresource[com/happygo/manager/entity/user/EcsUsers.hbm.xmlcom/happygo/manager/entity/user/EcsUserRank.hbm.xml]cannotbeopenedbecauseitdoesnotexistatorg.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135)atorg.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:655)atorg.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)atorg.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)atorg.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4336)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:719)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)atorg.apache.catalina.core.StandardService.start(StandardService.java:448)atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)atorg.apache.catalina.startup.Catalina.start(Catalina.java:552)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)2009-10-2913:18:35org.apache.catalina.core.StandardContextstart
解决方案三:
<beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.0.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-2.0.xsdhttp://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-2.0.xsd"><beanid="dataSource"class="org.apache.commons.dbcp.BasicDataSource"><propertyname="driverClassName"value="com.mysql.jdbc.Driver"></property><propertyname="url"value="jdbc:mysql://127.0.0.1:3306/shop?useUnicode=true&amp;characterEncoding=UTF8&amp;zeroDateTimeBehavior=convertToNull"></property><propertyname="username"value="root"></property><propertyname="password"value="ok"></property></bean><beanid="sessionFactory"class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><propertyname="dataSource"><refbean="dataSource"/></property><propertyname="hibernateProperties"><props><propkey="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop><propkey="hibernate.show_sql">true</prop><propkey="hibernate.format_sql">true</prop></props></property><propertyname="mappingResources"><list><value>com/happygo/manager/entity/user/EcsUsers.hbm.xmlcom/happygo/manager/entity/user/EcsUserRank.hbm.xml</value></list></property></bean><!--事务管理器--><beanid="transmanager"class="org.springframework.orm.hibernate3.HibernateTransactionManager"><propertyname="sessionFactory"ref="sessionFactory"></property></bean><!--事务通知--><tx:adviceid="txAdvice"transaction-manager="transmanager"><tx:attributes><tx:methodname="get*"propagation="SUPPORTS"read-only="true"/><tx:methodname="find*"propagation="SUPPORTS"read-only="true"/><tx:methodname="search*"propagation="SUPPORTS"read-only="true"/><tx:methodname="*"propagation="REQUIRED"/></tx:attributes></tx:advice><!--切面,通知者--><aop:config><aop:pointcutid="pt"expression="execution(*com.happygo.manager.service.*.*(..))"/><aop:advisoradvice-ref="txAdvice"pointcut-ref="pt"/></aop:config><!--VIPUsers--><!--DAO--><beanid="VipUserDao"class="com.happygo.manager.dao.user.impl.VipUserDao"><propertyname="sessionFactory"ref="sessionFactory"></property></bean><beanid="UserRankDao"class="com.happygo.manager.dao.user.impl.UserRankImpl"><propertyname="sessionFactory"ref="sessionFactory"></property></bean><!--service--><beanid="VipService"class="com.happygo.manager.service.user.impl.VipServiceImpl"><propertyname="vipUserDao"ref="VipUserDao"></property></bean><!--Action--><beanname="/vipUser"class="com.happygo.manager.web.struts.action.VipUserAction"><propertyname="vipService"ref="VipService"></property></bean></beans>
解决方案四:
找不到映射文件路径没错我试了好几种办法重新删除在部署删除asm2.13的扎包在Spring映射路径改成直接去找classpath也不行~求救啊小弟感谢万分
解决方案五:
把映射文件的具体位置和层次贴一下文件找不到,至少看起来是你路径写错了!
解决方案六:
src/com/happygo/manager/entity/user/EcsUserRank.hbm.xmlsrc/com/happygo/manager/entity/user/EcsUsers.hbm.xml属性路径~我都直接复制过来的怎么能错啊~。
解决方案七:
web.xml<?xmlversion="1.0"encoding="UTF-8"?><web-appxmlns="http://java.sun.com/xml/ns/j2ee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="2.4"xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener><servlet><servlet-name>action</servlet-name><servlet-class>org.apache.struts.action.ActionServlet</servlet-class><init-param><param-name>config</param-name><param-value>/WEB-INF/struts-config.xml</param-value></init-param><init-param><param-name>debug</param-name><param-value>3</param-value></init-param><init-param><param-name>detail</param-name><param-value>3</param-value></init-param><load-on-startup>0</load-on-startup></servlet><servlet-mapping><servlet-name>action</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping><!--Spring提供的中文过滤器--><filter><filter-name>charsetFitler</filter-name><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class><init-param><param-name>encoding</param-name><param-value>gbk</param-value></init-param></filter><filter-mapping><filter-name>charsetFitler</filter-name><url-pattern>*.do</url-pattern></filter-mapping><welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file-list></web-app>
解决方案八:
配置文件里改一下:原:<value>com/happygo/manager/entity/user/EcsUsers.hbm.xmlcom/happygo/manager/entity/user/EcsUserRank.hbm.xml</value>改成:<value>com/happygo/manager/entity/user/EcsUsers.hbm.xml</value><value>com/happygo/manager/entity/user/EcsUserRank.hbm.xml</value>
解决方案九:
OK了谢谢了太粗心了。。
解决方案十:
谢谢你了~万分感谢
解决方案十一:
呵呵,客气了。哥们,结贴吧
解决方案十二:
目前分数不够等我有分了把这个帖子给结了不好意思~啊
解决方案十三:
随便给我来点儿
解决方案十四:
引用7楼liwenso的回复:

配置文件里改一下:原:<value>com/happygo/manager/entity/user/EcsUsers.hbm.xmlcom/happygo/manager/entity/user/EcsUserRank.hbm.xml</value>改成:<value>com/happygo/manager/entity/user/EcsUsers.hbm.xml</value><value>com/happygo/manager/entity/user/EcsUserRank.hbm.xml</value>

没必要这样做,你在value里面加个list标签然后把你的映射文件放到标签里面就好了。
解决方案十五:
Causedby:java.io.FileNotFoundException:classpathresource[com/happygo/manager/entity/user/EcsUsers.hbm.xmlcom/happygo/manager/entity/user/EcsUserRank.hbm.xml]cannotbeopenedbecauseitdoesnotexist问题的关键所在

时间: 2024-09-17 05:19:44

SSH整合问题 高手进 小弟都抓狂了的相关文章

ssh-SSH整合 前两个service都顺利运行就第三个出错了!为什么

问题描述 SSH整合 前两个service都顺利运行就第三个出错了!为什么 十二月 25, 2014 10:07:48 下午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

ajax-php采集高手进:利用curl模拟登录抓取数据遇到json调用问题不成功,求助!

问题描述 php采集高手进:利用curl模拟登录抓取数据遇到json调用问题不成功,求助! 我在抓取一个页面的信息(假设a.php),这个页面只是一些基本的html框架,其他关键信息是通过ajax请求(b.php)回来的,返回的是json,然后在通过页面js将json解析,绘制到页面上.问题的关键是ajax请求的信息里有个手机号码需要登录后才显示完整,原网站利用ajax请求b.php获得json数据,如果直接访问b.php也是可以直接得到:{"name":"zhangsan&

《人人都玩开心网:Ext JS+Android+SSH整合开发Web与移动SNS》样章下载

本文为原创,如需转载,请注明作者和出处,谢谢! 第1章:开发梦缘起开心网 第5章:开心桌面:完全模拟Windows桌面的开心网 第15章:移动电子相册:捕捉精彩瞬间 书中实例截图     前言      互联网的发展,就是一个不断上演奇迹的过程.10年前就开始在Internet上流行的Web应用,在见证了一个个奇迹之后,依然作为最主流的应用而雄霸 互联网.近几年,一个由国外风靡至国内的Web应用--SNS,再一次为举国上下的互联网普及大潮推波助澜.或许SNS听起来还有点陌生,但如果你连炙手 可热

《人人都玩开心网:Ext JS+Android+SSH整合开发Web与移动SNS》销售排名第4,发篇ExtJS的文章(拖放树结点)庆祝下

    <人人都玩开心网:Ext JS+Android+SSH整合开发Web与移动SNS>一书上架短短几天,就进入了互动网计算机类销售总排名第4的好成绩(见下图).现发篇Ext JS的技术文章庆祝下. 拖放树结点 在本文将介绍TreePanel组件非常有意思的一个功能:结点拖放.要使TreePanel组件的结点可以拖放非常简单,只需要将TreePanel类的enableDD选项参数设为true即可.当然,要想实现更复杂的功能,还需要配合其他的参数和事件. 一.结点拖放的位置 拖放结点包含了两个

SSH整合dwr出现问题,

问题描述 SSH整合DWR时,出现如下错误,好像是使用dwr调用后台的类时不能通过spring实例化该类,报错如下:java.lang.NoClassDefFoundError:org/springframework/web/servlet/support/RequestContextUtilsatorg.directwebremoting.spring.SpringCreator.getBeanFactory(SpringCreator.java:173)atorg.directwebremo

SSH整合问题实现DAO接口出现的问题

问题描述 SSH整合问题实现DAO接口出现的问题 package com.integration.dao; import java.util.List; import com.integration.entity.User; import org.hibernate.Query; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; public class UserDAOImpl extends Hiber

SSH, 整合分页功能,连带DAO经典封装

任何一个封装讲究的是,使用,多状态. Action:     任何一个Action继承分页有关参数类PageManage,自然考虑的到分页效果,我们必须定义下几个分页的参数.并根据这个参数进行查值. 然后在继承ServiceManage,ServiceManage类是用来 存放共用的东西:response,重要的是Service的get set 具体讲一下PageManage,    totalPages;//总页数    totalRecord;//总记录数    showRecordNum=

大数据-X亿级数据检索速度优化难题,高手进

问题描述 X亿级数据检索速度优化难题,高手进 各位高手,目前碰到一个X亿级数据检索速度优化的难题,大家帮看看怎么解决. 涉及到的表有: KeywordIndex:2.7亿条记录 Original:1014万条记录 KeywordIndex表包括四个字段,ID(PK,int).KeywordID(int).OriginalID(int).ColumnID(int) 建立的索引: PK_KeywordIndex([ID] ASC) IX_KeywordIndex_KeywordID([Keyword

exception-升级ssh整合出现错误java.lang.NoSuchMethodError:

问题描述 升级ssh整合出现错误java.lang.NoSuchMethodError: 下面是控制台打印的信息,麻烦看到的高手帮忙解决: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [cn/com/hope/framework/spring/appl