Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
AspectJ Problem: warning can't determine superclass of missing type $Proxy28 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AspectJ Problem: warning can't determine superclass of missing type $Proxy28

    Hi, I have tried to add some aspects to my spring osgi based application and stumbled on this issue. AspectJ seems to analyze beans that are injected via OSGi services. This works in simple cases but in my case the injected bean is already a proxy and there comes an error.

    This is somewhat related to http://forum.spring.io/node/74778 - but I don't see how to work around my problem with what was said there. I'm not using annotations.

    Here is the stacktrace that I'm getting:
    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adresseService' defined in URL [bundleentry://48.fwk1179404661/META-INF/spring/context.xml]: Cannot resolve reference to bean 'adresseRepository' while setting bean property 'adresseRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adresseRepository': 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 $Proxy28
     [Xlint:cantFindType]
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) ~[na:na]
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) ~[na:na]
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) ~[na:na]
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) ~[na:na]
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) ~[na:na]
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69) ~[org.springframework.osgi.core_1.2.1.jar:1.2.1]
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355) ~[org.springframework.osgi.core_1.2.1.jar:1.2.1]
    	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) ~[na:na]
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320) ~[org.springframework.osgi.core_1.2.1.jar:1.2.1]
    	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132) [org.springframework.osgi.extender_1.2.1.jar:1.2.1]
    	at java.lang.Thread.run(Thread.java:680) [na:1.6.0_24]
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adresseRepository': 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 $Proxy28
     [Xlint:cantFindType]
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:165) ~[na:na]
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1429) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:245) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) ~[na:na]
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) ~[na:na]
    	... 17 common frames omitted
    Caused by: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning can't determine superclass of missing type $Proxy28
     [Xlint:cantFindType]
    	at org.aspectj.weaver.reflect.ReflectionWorld$ExceptionBasedMessageHandler.handleMessage(ReflectionWorld.java:129) ~[na:na]
    	at org.aspectj.weaver.Lint$Kind.signal(Lint.java:316) ~[na:na]
    	at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.raiseCantFindType(MissingResolvedTypeWithKnownSignature.java:232) ~[na:na]
    	at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.getSuperclass(MissingResolvedTypeWithKnownSignature.java:98) ~[na:na]
    	at org.aspectj.weaver.patterns.KindedPointcut.fastMatch(KindedPointcut.java:144) ~[na:na]
    	at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.couldMatchJoinPointsInType(PointcutExpressionImpl.java:82) ~[na:na]
    	at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:238) ~[na:na]
    	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:200) ~[na:na]
    	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:254) ~[na:na]
    	at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:286) ~[na:na]
    	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117) ~[na:na]
    	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87) ~[na:na]
    	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68) ~[na:na]
    	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359) ~[na:na]
    	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407) ~[na:na]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:1561) ~[na:na]
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:162) ~[na:na]
    	... 22 common frames omitted
    And here is the aop config I'm using (the system works without this bit):
    Code:
    	<aop:config>
    		<aop:aspect ref="exceptionTranslator">
    			<aop:pointcut id="pc"
    				expression="execution(* ch.arenae.phoenix.service.adressen.impl.internal.SelektionsCodeRemoteServiceImpl.*(..))" />
    			<aop:before pointcut-ref="pc" method="before" />
    			<aop:after-throwing pointcut-ref="pc"
    				method="translateException" throwing="e" />
    		</aop:aspect>
    	</aop:config>

    I have tried a lot of stuff in order to get this working and would be grateful for any hint or tip.

    Thanks,
    Peter

  • #2
    This is solved. I replaced the aspectj libs 1.6.8 with the earlier versions 1.6.5. After that everything was ok.

    Comment

    Working...
    X