ssh框架报错


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
">

<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>

<bean id="usersdao" class="com.subssh01.dao.impl.UsersDAOImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>

<bean id="usersbiz" class="com.subssh01.biz.impl.UsersBIZImpl">
<property name="udao" ref="usersdao"></property>
</bean>

<bean name="/runusers" class="com.yourcompany.struts.action.RunusersAction">
<property name="ubiz" ref="usersbiz"></property>
</bean>

<!-- transactionManager 事物配置 -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransac尝沪佰疚脂狡拌挟饱锚tionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>

<tx:advice id="advice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="upd*" propagation="REQUIRED" />
<tx:method name="del*" propagation="REQUIRED" />
<tx:method name="*" propagation="SUPPORTS" read-only="true" />
</tx:attributes>
</tx:advice>

<aop:config>
<aop:pointcut id="pointcut"
expression="execution(* com.subssh.biz.*.*(..))" />
<aop:advisor advice-ref="advice" pointcut-ref="pointcut" />
</aop:config>

</beans>

----------------报错信息--------------
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/runusers' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
问题补充:<bean name="/runusers" class="com.yourcompany.stru尝沪佰疚脂狡拌挟饱锚ts.action.RunusersAction">

这个/是action的固定写法你们去找一个没有/ action给我看看???OK,我已经找到错误了。是ASM 和插件问题。

<bean name="/runusers" class="com.yourcompany.struts.action.RunusersAction">
<property name="ubiz&qu尝沪佰疚脂狡拌挟饱锚ot; ref="usersbiz"></property>
</bean>

改成
<bean name="runusers" class="com.yourcompany.struts.action.RunusersAction">
<property name="ubiz" ref="usersbiz"></property>
</bean>
Error creating bean 尝沪佰疚脂狡拌挟饱锚with name '/runusers'

敢把头前的 / 去掉么
创建 <bean name="/runusers" class="com.yourcompany.struts.action.RunusersAction">
<property name="ubiz" ref="usersbiz"></property>
</bean>这个bean的时候出错了,
检查一下这个类中有没有ubiz这个属性!


Copyright © 2009-2011 All Rights Reserved.