我的applicationContext文件配置如下:
<?xml version="1.0" encoding="UTF-8"?><!--comment-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
<bean id="accountDao" class="com.dao.AcountDaoMySQLImpl"></bean>
<bean id="accountService" class="com.service.AccountServiceImpl">
<property name="accountDao" ref="accountDao"></property>
</bean>
<bean id="logAspectBean" class="com.aspect.LogAspect"></bean>

<aop:config>
<aop:aspect id="logAspect" ref="logAspectBean">
<aop:pointcut id="allMethod" expression="execution(* com.service.*.*(..))" />
<aop:before method="before" pointcut-ref="allMethod" />
<aop:after-returning method="afterReturn"
pointcut-ref="allMethod" />
<aop:after method="after" pointcut-ref="allMethod" />
<aop:after-throwing method="afterThrowing"
pointcut-ref="allMethod" />
</aop:aspect> </aop:config>

<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation" value="classpath:hibernate.cfg.xml">
</property>
</bean> <bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean> <tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="save" read-only="true" />
            <tx:method name="*" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="AllServiceMethod" expression="execution(* com.service.MyUserService.create(..))" />
<aop:advisor pointcut-ref="AllServiceMethod" advice-ref="txAdvice" />
</aop:config>

<bean id="myUserDao" class="com.dao.MyUserDaoImpl">
<property name="mySessionfactory" ref="sessionFactory"></property>
</bean>

<bean id="myUserService" class="com.service.MyUserService">
<property name="userDao" ref="myUserDao"></property>
</bean>
</beans>我有一个测试类public class test2 { /**
 * @param args
 */
public static void testAOP(MyUser u) {
ApplicationContext context = new ClassPathXmlApplicationContext(
"applicationContext.xml");
MyUserService dao = (MyUserService) context
.getBean("myUserService"); dao.create(u);
} public static void main(String[] args) {
// TODO Auto-generated method stub
MyUser u=new MyUser();
u.setName("springwegee");
u.setPassword("log4jIII");

testAOP(u);
}}问题是:Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myUserService' defined in class path resource [applicationContext.xml]: Initialization of bean failed;