ssh整合问题,项目一启动报错(ContextLoader.java:initWebApplicationContext:204) ,牛人给个答案
ERROR[19:11:29](ContextLoader.java:initWebApplicationContext:204)-Contextinitializati...
ERROR [19:11:29] (ContextLoader.java:initWebApplicationContext:204) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'assetsHandleDAO' defined in file [D:\apache-tomcat-6.0.26\webapps\tx_txzswzc\WEB-INF\classes\applicationContext-dao.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\apache-tomcat-6.0.26\webapps\tx_txzswzc\WEB-INF\classes\applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a getter for tUsers in class com.txzswzc.entity.TRole
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\apache-tomcat-6.0.26\webapps\tx_txzswzc\WEB-INF\classes\applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a getter for tUsers in class com.txzswzc.entity.TRole
Caused by:
org.hibernate.PropertyNotFoundException: Could not find a getter for tUsers in class com.txzswzc.entity.TRole
at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:282)
at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
at org.hibernate.mapping.Property.getGetter(Property.java:272)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildPropertyGetter(PojoEntityTuplizer.java:247)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:125)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
问题我自己找到了,你们说的我都知道。但是这些都存在。是javabean的属性第二个字母不能大写的原因。非常感谢你们 展开
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'assetsHandleDAO' defined in file [D:\apache-tomcat-6.0.26\webapps\tx_txzswzc\WEB-INF\classes\applicationContext-dao.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\apache-tomcat-6.0.26\webapps\tx_txzswzc\WEB-INF\classes\applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a getter for tUsers in class com.txzswzc.entity.TRole
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\apache-tomcat-6.0.26\webapps\tx_txzswzc\WEB-INF\classes\applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a getter for tUsers in class com.txzswzc.entity.TRole
Caused by:
org.hibernate.PropertyNotFoundException: Could not find a getter for tUsers in class com.txzswzc.entity.TRole
at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:282)
at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
at org.hibernate.mapping.Property.getGetter(Property.java:272)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildPropertyGetter(PojoEntityTuplizer.java:247)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:125)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
问题我自己找到了,你们说的我都知道。但是这些都存在。是javabean的属性第二个字母不能大写的原因。非常感谢你们 展开
4个回答
展开全部
'assetsHandleDAO' 的配置有问题,你检查一下spring.xml的配置文件,最好是将spring里面配置这个id的代码截过来看看.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Error creating bean with name 'assetsHandleDAO' defined in file [D:\apache-tomcat-6.0.26\webapps\tx_txzswzc\WEB-INF\classes\applicationContext-dao.xml]:
applicationContext-dao.xml配置文件里面的 assetsHandleDAO
Could not find a getter for tUsers in class com.txzswzc.entity.TRole
怀疑是没配这实体类,你看下这两个文件吧
applicationContext-dao.xml配置文件里面的 assetsHandleDAO
Could not find a getter for tUsers in class com.txzswzc.entity.TRole
怀疑是没配这实体类,你看下这两个文件吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
PropertyNotFoundException: Could not find a getter for tUsers in class com.txzswzc.entity.TRole
没有找到tUsers 的get 方法~
你在com.txzswzc.entity.TRole这个类里set get 看看
没有找到tUsers 的get 方法~
你在com.txzswzc.entity.TRole这个类里set get 看看
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-07-04
展开全部
spring配置错误……
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询