Announcement Announcement Module
Collapse
No announcement yet.
ReflectionWorldExpression when upgrading Aspectj Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ReflectionWorldExpression when upgrading Aspectj

    We have been using AspectJ 1.6.0 in conjunction with Spring 2.5.6.A and Spring DM 1.2.0. Now we were forced to move to a current version of AspectJ and see the following exceptions in our logs:

    Code:
    Exception in thread "SpringOsgiExtenderThread-33" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Post-processing of the FactoryBean's object failed; nested exception is org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning can't determine superclass of missing type $Proxy30
     [Xlint:cantFindType]
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:165)
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1414)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:245)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:576)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
    	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
    	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
    	at java.lang.Thread.run(Thread.java:595)
    Caused by: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning can't determine superclass of missing type $Proxy30
     [Xlint:cantFindType]
    	at org.aspectj.weaver.reflect.ReflectionWorld$ExceptionBasedMessageHandler.handleMessage(ReflectionWorld.java:129)
    	at org.aspectj.weaver.Lint$Kind.signal(Lint.java:325)
    	at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.raiseCantFindType(MissingResolvedTypeWithKnownSignature.java:232)
    	at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.getSuperclass(MissingResolvedTypeWithKnownSignature.java:98)
    	at org.aspectj.weaver.patterns.KindedPointcut.fastMatch(KindedPointcut.java:144)
    	at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.couldMatchJoinPointsInType(PointcutExpressionImpl.java:82)
    	at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:233)
    	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:200)
    	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:254)
    	at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:286)
    	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117)
    	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87)
    	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68)
    	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359)
    	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:1561)
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:162)
    	... 12 more
    This behavior occurs both with version 1.6.8 (from the enterprise bundle repository) and 1.6.10 (I wrapped the libs from the aspectj project with the bnd tool).

    Does anybody know this behavior or have an idea what I could try to fix the problem? I already tried upgrading to Spring 3.0.4. Unfortunately, this did not solve the problems.

    My Spring config looks as follows:
    Code:
    	
    <osgi:reference id="sessionFactory" 	interface="org.hibernate.SessionFactory" filter="(fragment=rr)" />
    <osgi:reference id="txManager" interface="org.springframework.transaction.PlatformTransactionManager" filter="(fragment=rr)" />
    <tx:advice id="txAdvice" transaction-manager="txManager">
      <tx:attributes>
        <tx:method name="find*" read-only="true" />
      </tx:attributes>
    </tx:advice>
    
    <aop:config>
      <aop:pointcut id="serviceMethods" expression="execution(*com.mycompany.security.userdata.ps.internal.UserDataPSImpl.*(..))" />
      <aop:advisor advice-ref="txAdvice" pointcut-ref="serviceMethods" />
    </aop:config>
    ...
    Regards, Jens

  • #2
    Additional information

    Some more information that might hopefully ring a bell.

    Everything works fine up to (inclusively) version 1.6.6 of aspectj. I cannot say anything about version 1.6.7, which is not available in the SpringSource Enterprise Bundle Repository.

    I saw that the latest version of Eclipse Virgo (2.1.0.M04) also uses AspectJ version 1.6.6. Does anybody know a reason for that? Have there been problems with versions 1.6.7 or 1.6.8, which have been available for quite a while?

    Regards, Jens

    Comment


    • #3
      Is there any new information regarding this issue?

      I do not seem to be the only one who is affected by this:
      http://forum.springsource.org/showth...ionworld+proxy
      http://comments.gmane.org/gmane.comp...j.general/7593

      The former workaround of using an older aspectj.weaver version (< 1.6.7) is no longer viable. Spring 3.2.0 explicitly demands newer versions.

      Comment

      Working...
      X