MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » org.springframework.beans.factory.BeanCreationEx

org.springframework.beans.factory.BeanCreationException: Error creating bean with name

www.MyException.Cn  网友分享于:2015-08-27  浏览:2708次
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上输入你的异常,看这类似的异常一般是哪些错误。实在不行,再来问。

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有