Skip to main content



      Home
Home » Language IDEs » AspectJ » Problem with AspectJ fast-matching(warning can't determine superclass of missing type com.sun.proxy.$ProxyXXX [Xlint:cantFindType])
Problem with AspectJ fast-matching [message #1270843] Thu, 13 March 2014 12:16 Go to next message
Eclipse UserFriend
Hi there,

trying to deploy an ear app which contains several war files and an EJB on glassfish 3, aspectj-1.7.4, spring-3.0.4, and get an exception of the type:

[#|2014-03-13T15:54:05.554+0000|INFO|oracle-glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=91;_ThreadName=admin-thread-pool-4848(2);|2014-03-13 15:54:05,552 [ad-pool-4848(2)] ERROR DispatcherServlet - Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationLoader' defined in ServletContext resource [/WEB-INF/XXXX.xml]: Cannot resolve reference to bean 'YYYY' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'YYYY':
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 com.sun.proxy.$Proxy298
[Xlint:cantFindType]


I came across a similar question from about 3 years ago but it fizzled out.. Basically, it was unclear whether this was an AspectJ Weaving fast-matching bug or an app class-loading problem?? Would appreciate it if someone enlightens me.

Also, if I hack the aspectJweaver source so that the optimizedMatching is set to false, the ear deploys fine... However, despite trying several different ways (putting aop.xml in EAR/war/EJB.jar etc.) the weaver line:
<weaver options="-Xset:optimizedMatching=false"/>

doesn't seem to work???? (Neither does trying to supply this to glassfish as JVM-option???

Does this flag work,and if so, how ?????

Kind Regards,
Mike Beale
Re: Problem with AspectJ fast-matching [message #1271267 is a reply to message #1270843] Fri, 14 March 2014 13:40 Go to previous messageGo to next message
Eclipse UserFriend
Certainly the flag alters the matching algorithm - it causes the order of certain paths taken in the algorithm to change. That order is not 'well defined' though, so it could be that on a different JVM version a different order is taken that would still lead to the warning even with the option specified.

It is just a warning though, so it is a shame that other infrastructure isn't coping well with that warning. An alternative would be to suppress the cantFindType message (it is an xlint so is configurable to ignore), with a <weaver options="-Xlint:ignore"/>

cheers,
Andy
Re: Problem with AspectJ fast-matching [message #1271612 is a reply to message #1271267] Sat, 15 March 2014 13:16 Go to previous message
Eclipse UserFriend
Thanks for the reply Andy!

I tried the -Xlint:ignore option as well but had no luck with that either. I tried adding aop.xml to my EAR META-INF, to my war, and also tried defining it as an external file using the jvm-option -Dorg.aspectj.weaver.loadtime.configuration. Unfortunately, no approach seemed to work (I also had a jvm-option -javaagent pointing at my aspectjweaver jar).....

I don't know why the weaver options are not being picked up...

Is there any other approach I can try to try that is known to work?

Kind regards,
Mike
Previous Topic:Create a new Aspect wizard giving error in AJDT.
Next Topic:Problem exporting ajdt file
Goto Forum:
  


Current Time: Fri May 16 02:02:39 EDT 2025

Powered by FUDForum. Page generated in 0.03106 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top