Announcement Announcement Module
No announcement yet.
ReflectionWorldException: warning no match [Xlint:invalidAbsoluteTypeName] Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ReflectionWorldException: warning no match [Xlint:invalidAbsoluteTypeName]

    I am experiencing a problem with a pointcut after migration from springframework 3.0.5 to 3.1.0.

    The relevant context code is as follows:

    <bean id="executor" 
    	class="xxx.yyy.zzz.TrxExecutor" >
    	<aop:pointcut id="readOnlyActionExecution" expression="target(xxx.yyy.zzz.ITrxExecutor)"/>
    	<aop:advisor advice-ref="txReadonlyAdvice" pointcut-ref="readOnlyActionExecution"/>
    <bean id="actionProvider" class=
    I get the message:
    org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning no match for this type name: xxx.yyy.zzz.ITrxExecutor [Xlint:invalidAbsoluteTypeName]
    The code runs in an OSGI Platform. The bundle situation is as follows:
    above context is of bundle A
    xxx.yyy.zzz.ITrxExecutor defined in bundle B
    aaa.bbb.ccc.ActionServiceProviderImpl defined in bundle C

    It took me hours to debug the code but finally it turns out that the error occurs while investigation of bean actionProvider from bundle C to check if the pointcut applies. In that process, the PointcutParser tries to resolve both types aaa.bbb.ccc.ActionServiceProviderImpl and xxx.yyy.zzz.ITrxExecutor. Unfortunately the classLoader used to resolve the types is the bundleClassLoader of bundle C which doesn't know anything about bundle B. I would expect that the bundleClassLoader of bundle A would be used since that loader knows all relevant classes.

    The code worked fine with RELEASE 3.0.5 but now it fails with RELEASE 3.1.0.

    Any ideas?


  • #2
    Solution found

    To whom it may concern:
    The problem is that ActionServiceProviderImpl implements ApplicationContextAware which itself is not resolvable via bundle A. As a fallback the PointcutParser tries to resolve via the classLoader of ActionServiceProviderImpl which in fact resolves ActionServiceProviderImpl and ApplicationContextAware but not ITrxExecutor.

    So the solution is to import the following packages to bundle A:
    org.springframework.context;version="3.1.2.RELEASE " (for ApplicationContextAware)
    org.springframework.beans.factory;version="3.1.2.R ELEASE" (for org.springframework.beans.factory.Aware)

    I am not very happy with this but at least it is a solution.