How to define implemented interfaces for jms connection factories using Spring 3.2.1, Jboss AS7, Aspectj 1.7.1 java 1.7?

We are developing a project in java 1.6 using JBOSS AS7, and we use, among others: Aspectj and HornetQ. We need to switch to java 1.7 so that we use ASpectj 1.7.1. During deployment, we get the following exception:

Caused by: org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'eventsJmsTemplate' defined in class path resource [com/company/project/jms/jms.xml]: 
  Cannot resolve reference to bean 'jmsConnectionFactory' while setting bean property 'connectionFactory'; nested exception is
   org.springframework.beans.factory.BeanCreationException: 
  Error creating bean with name 'jmsConnectionFactory': 
  Post-processing of the FactoryBean object failed; 
    nestedexception is java.lang.IllegalArgumentException: 
      warning can't determine implemented interfaces of missing type 
    com.company.project.aspects.MBeanAttributesAdvice [Xlint:cantFindType]

Moba:

<jee:jndi-lookup id="jmsConnectionFactory" jndi-name="java:/JmsXA" />

In another project, we had the same exception if we use the JPA data source:

<jee:jndi-lookup id="dataSource" jndi-name="java:jboss/datasources/table" />
<bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />

and we can solve the problem by adding the module status to the jboss-deployment structure: org.jboss.ironjacamar.jdbcadapters

<jboss-deployment-structure>
    <deployment>
        <exclusions>
            <module name="org.slf4j" />
            <module name="org.slf4j.impl" />
            <module name="org.apache.log4j" />
        </exclusions>
        <dependencies>
            <module name="org.jboss.ironjacamar.jdbcadapters" />
        </dependencies>
    </deployment>
</jboss-deployment-structure>

is there any module we can add to get through this exception? or any other way to solve this problem?

+5
source share
2

. : org.hornetq, org.hornetq.ra, org.jboss.ejb3, org.jboss.ejb-client.

<jboss-deployment-structure>
    <deployment>
        <!-- Exclusions allow you to prevent the server from automatically adding 
            some dependencies -->
        <exclusions>
            <module name="org.slf4j" />
            <module name="org.slf4j.impl" />
            <module name="org.apache.log4j" />
        </exclusions>
        <dependencies>
            <module name="org.jboss.ironjacamar.jdbcadapters" />
            <module name="org.hornetq" />
            <module name="org.hornetq.ra" />
            <module name="org.jboss.ejb3" />
            <module name="org.jboss.ejb-client" />
        </dependencies>
    </deployment>
</jboss-deployment-structure>
+7

, , .

JBoss 7.1.1 Spring 3.2.4:

, , Spring , Aspect-Weaver , , , JNDI-. Weaver , ( -) Classloader, (JBoss ModuleClassLoader ) Aspect ( ) Xlint:cantFindType.

- Classloader .

JDBC:

<jee:jndi-lookup id="dataSource" jndi-name="java:jboss/datasources/myDS" proxy-interface="javax.sql.DataSource" />

JMS ConnectionFactory

<jee:jndi-lookup id="connectionFactory" jndi-name="java:/JmsXA" proxy-interface="javax.jms.ConnectionFactory"/>

.

, , org.jboss.ironjacamar.jdbcadapters ..

+1

All Articles