我们正在使用 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]
mbean是:
<jee:jndi-lookup id="jmsConnectionFactory" jndi-name="java:/JmsXA" />
在其他项目中,我们在使用 JPA 数据源时遇到了同样的异常:
<jee:jndi-lookup id="dataSource" jndi-name="java:jboss/datasources/table" />
<bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />
我们设法通过在 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>
有没有我们可以添加的模块来传递这个异常?或任何其他方式来解决这个问题?