-
1. Re: AS7 and Aspect-J without LTW
jrantav Jan 8, 2013 4:49 AM (in response to jrantav)The problem doesn't seem to be with Aspect-J as such, as a quick demo application using Aspect-J the same mechanism works just fine. However, a more complex one with aspects in one jar and configuration in another doesn't seem to find any aspect classes on AS7, but works fine on other app server.
-
2. Re: AS7 and Aspect-J without LTW
jrantav Jan 9, 2013 11:37 AM (in response to jrantav)1 of 1 people found this helpfulOk, I think I've found the problem relate to ModuleClassLoader and jboss modules. On a regular case it works fine. However, having this kind of spring configuration:
<!-- Enables the Spring MVC @Controller programming model --> <mvc:annotation-driven /> <!-- Test to get a data source --> <jee:jndi-lookup id="dataSource" jndi-name="jboss/datasources/ExampleDS"/> <!-- AOP part --> <bean id="methodTraceAspect" class="fi.eis.applications.jboss.poc.gemini.spring.aop.support.api.MyMethodTraceAspect"/> <aop:aspectj-autoproxy /> <!-- end AOP --> <bean class="fi.eis.applications.controllers.HomeController"> <constructor-arg ref="dataSource" /> </bean>
will, since dataSource comes from JBoss internal modules, try to attach AOP trace to that data source, too. This will fail with IllegalArgumentException, coming from:
org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning can't determine implemented interfaces of missing type fi.eis.applications.jboss.poc.gemini.spring.aop.support.api.MyMethodTraceAspect [Xlint:cantFindType]
since dataSource is loaded by ModuleClassLoader, and that classloader only has visibility to classes org.jboss.jca.adapters.* classes, as can be seen from the debugger.
-
3. Re: AS7 and Aspect-J without LTW
jrantav Jan 16, 2013 3:28 AM (in response to jrantav)Fixed with
"Dependencies: org.jboss.ironjacamar.jdbcadapters"
in the manifest.