2 Replies Latest reply on Sep 12, 2007 3:35 AM by Jean-Claude Vogel

    JBoss, Spring and AspectJ integration

    Wally Spiteri Newbie

      I have deployed a simple application that has the following Spring bean configuration.

       <aop:config proxy-target-class="true">
       <!-- will execute after the profiling advice (c.f. the order attribute) -->
       <aop:advisor advice-ref="txAdvice" pointcut="execution(* com.xxx.clientaccountmgmt.bs.impl.ClientAccountMgmtImpl.*(..))" /><!-- order value is higher than the profiling aspects -->
       </aop:config>
      
       <tx:advice id="txAdvice" transaction-manager="transactionManager">
       <tx:attributes>
       <tx:method name="add*" propagation="REQUIRED"
       read-only="false" />
       <tx:method name="update*" propagation="REQUIRED"
       read-only="false" />
       <tx:method name="delete*" propagation="REQUIRED"
       read-only="false" />
       <tx:method name="get*" read-only="true" />
       </tx:attributes>
       </tx:advice>
      
       <!-- Transaction Manager -->
       <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
       <property name="userTransactionName"><null></null></property>
       <property name="transactionManager"><ref bean="containerTransactionManager"/></property>
       </bean>
      
       <!-- Transaction Manager for JBOSS -->
       <bean id="containerTransactionManager" class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName"><value>java:/TransactionManager</value></property>
       </bean>
      
      


      When I run this inside of the JBoss container I get the following error;-

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
      ng bean with name 'accountAliasDao' defined in class path resource [com/xxx/cl
      ientaccountmgmt/applicationContext-dao.xml]: Initialization of bean failed; nest
      ed exception is org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldExcept
      ion: warning can't determine implemented interfaces of missing type $Proxy63
       [Xlint:cantFindType]
       at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.createBean(AbstractAutowireCapableBeanFactory.java:442)
       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
      ject(AbstractBeanFactory.java:245)
       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
      y.getSingleton(DefaultSingletonBeanRegistry.java:141)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:242)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:156)
       at org.springframework.beans.factory.support.BeanDefinitionValueResolver
      .resolveReference(BeanDefinitionValueResolver.java:246)
       ... 75 more
      
      


      If I reconfigure it to run outside of the container it works fine.
      Do i need to remove certain aspect classes from my classpath to resolve this or is there another issue here?
      This issue has been logged before but there was no real resolution to the problem.

      Any suggestions would be much appreciated.

      Thanks