首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

org.springframework.beans.factory.BeanCreationException: Error creating bean wit

2013-09-11 
SPRING事务的怪问题~加载就出错错误信息org.springframework.beans.factory.BeanCreationException: Error

SPRING事务的怪问题~加载就出错
错误信息

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productBOTX' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.isPresent(Ljava/lang/String;)Z
org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.isPresent(Ljava/lang/String;)Z
java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.isPresent(Ljava/lang/String;)Z
at org.springframework.aop.framework.DefaultAopProxyFactory.<clinit>(DefaultAopProxyFactory.java:59)
at org.springframework.aop.framework.ProxyConfig.<init>(ProxyConfig.java:72)
at org.springframework.transaction.interceptor.TransactionProxyFactoryBean.<init>(TransactionProxyFactoryBean.java:113)


-----配置------
<bean id="productBOTX" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >
<property name="transactionManager" ref="transactionManager" />
<property name="proxyTargetClass" value="true" /> 
<property name="target" ref="productBO"></property>
<!-- 
<property name="interceptorNames">
<list>
<value>transactionInterceptor</value>
</list>
</property>
-->
<property name="transactionAttributes">
<props>
<prop key="updateProductLock">PROPAGATION_REQUIRED</prop>
</props>
</property>
 
</bean>

<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributes" value="com.wsy.bo.product.ProductBO.updateProductLock=PROPAGATION_REQUIRED"/>
</bean>

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean name="productBO" class="com.wsy.bo.product.ProductBO" >
<property name="productDAO" ref="productDAO"></property>
<property name="orderBO" ref="orderBO"></property>
<property name="userLoginBO" ref="userLoginBO"></property>
</bean>


服务器加载就出错

[解决办法]
太烦了!去百度或是google先搜索下吧!
[解决办法]
你这样贴出异常来,很难有人回答你的问题的,给你一个好点的建议,把自己程序的流程理一下,检查一个注入的值和定义的值是否一样,在GOOGLE上输入你的异常,看这类似的异常一般是哪些错误。实在不行,再来问。

热点排行