如何使用Spring 3.2.1,Jboss AS7,Aspectj 1.7.1 java 1.7确定jms连接工厂的实现接口?

Ioa*_*los 5 aspectj hornetq java-7 spring-3 jboss7.x

我们正在使用JBOSS AS7在java 1.6中开发一个项目,我们使用其中:Aspectj和HornetQ.我们需要升级到java 1.7,所以我们使用ASpectj 1.7.1.在部署期间,我们得到以下异常:

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's object failed; 
    nestedexception is java.lang.IllegalArgumentException: 
      warning can't determine implemented interfaces of missing type 
    com.company.project.aspects.MBeanAttributesAdvice [Xlint:cantFindType]
Run Code Online (Sandbox Code Playgroud)

mbean是:

<jee:jndi-lookup id="jmsConnectionFactory" jndi-name="java:/JmsXA" />
Run Code Online (Sandbox Code Playgroud)

在其他项目中,当我们使用JPA数据源时,我们遇到了相同的异常:

<jee:jndi-lookup id="dataSource" jndi-name="java:jboss/datasources/table" />
<bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />
Run Code Online (Sandbox Code Playgroud)

我们设法通过在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>
Run Code Online (Sandbox Code Playgroud)

我们可以添加任何模块以传递此异常吗?或任何其他方式来解决这个问题?

Ioa*_*los 7

我想与您分享解决方案.添加模块: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>
Run Code Online (Sandbox Code Playgroud)