[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] AjcClosureX.class files

I just figured that out.
Thanks for everyone's help.
 

>-----Original Message-----
>From: aspectj-users-bounces@xxxxxxxxxxx 
>[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Ron Bodkin
>Sent: 05 June 2007 17:09
>To: aspectj-users@xxxxxxxxxxx
>Subject: RE: [aspectj-users] AjcClosureX.class files
>
>For Java 1.5 you can just use the standard AspectJ 
>aspectjweaver.jar as a JVMTI agent, i.e., use 
>-javaagent:path/to/aspectjweaver.jar instead of your -D argument.
>
>-----Original Message-----
>From: aspectj-users-bounces@xxxxxxxxxxx
>[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Paul Bergin
>Sent: Tuesday, June 05, 2007 7:25 AM
>To: aspectj-users@xxxxxxxxxxx
>Subject: RE: [aspectj-users] AjcClosureX.class files
>
>I think my exceptions are cause by 
>
>-Dweblogic.classloader.preprocessor=weblogic.aspects.AspectClas
>sPreProce
>ssor 
>
>I believe I should be using an aspectJ preprocessor class, I 
>am running weblogic 9.2 and java 1.5. I see there are classes 
>for 1.3/1.4 but not 1.5.
>
>
>
>>-----Original Message-----
>>From: aspectj-users-bounces@xxxxxxxxxxx 
>>[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Paul Bergin
>>Sent: 05 June 2007 10:42
>>To: aspectj-users@xxxxxxxxxxx
>>Subject: RE: [aspectj-users] AjcClosureX.class files
>>
>>Hi
>>I was beginning to think that my problem with missing AjcClosure 
>>classes was something to do with using an old version of AspectJ with 
>>Weblogic 9.2, so I downloaded the latest version. My startweblogic 
>>still contains
>>
>>-Dweblogic.classloader.preprocessor=weblogic.aspects.AspectClas
>>sPreProce
>>ssor -Dweblogic.aspects.debug=true
>>
>>I recompiled my app and tried to redeploy, but now I get the below 
>>exceptions Has anyone got a recent aspectj working with weblogic 9.2? 
>>If so, what weblogic configuration was required?
>>
>>05-Jun-2007 10:06:13 weblogic.aspects.AspectClassPreProcessor
>>createAspectSystem
>>INFO: Could not find aspect.system property
>>05-Jun-2007 10:06:22 weblogic.aspects.AspectClassPreProcessor
>>createAspectSystem
>>INFO: Could not find aspect.system property
>>05-Jun-2007 10:06:23 weblogic.aspects.AspectClassPreProcessor
>>createAspectSystem
>>INFO: Could not find aspect.system property
>>05-Jun-2007 10:06:29 weblogic.aspects.AspectJ init
>>INFO: Initializing: {J2EE=cloneData.jar}
>>05-Jun-2007 10:06:31
>>weblogic.utils.classloaders.ClassPreProcessor$ClassPreProcessorSupport
>>preProcess
>>WARNING: Error pre-processing class
>>org.apache.myfaces.webapp.StartupServletContextListener with 
>>weblogic.aspects.AspectClassPreProcessor@1942a3c'
>>java.lang.NoSuchMethodError:
>>org.aspectj.weaver.bcel.BcelWorld.<init>(Ljava/util/List;Lorg/a
>>spectj/br
>>idge/IMessageHandler;)V
>>        at weblogic.aspects.AspectJ.init(AspectJ.java:53)
>>        at
>>weblogic.aspects.AspectClassPreProcessor.createAspectSystem(Asp
>>ectClassP
>>reProcessor.java:178)
>>        at
>>weblogic.aspects.AspectClassPreProcessor.getAspectSystem(Aspect
>>ClassPreP
>>rocessor.java:97)
>>        at
>>weblogic.aspects.AspectClassPreProcessor.preProcess(AspectClass
>>PreProces
>>sor.java:62)
>>        at
>>weblogic.utils.classloaders.ClassPreProcessor$ClassPreProcessor
>>Support.p
>>reProcess(ClassPreProcessor.java:91)
>>        at
>>weblogic.utils.classloaders.GenericClassLoader.defineClass(Gene
>>ricClassL
>>oader.java:332)
>>        at
>>weblogic.utils.classloaders.GenericClassLoader.findLocalClass(G
>>enericCla
>>ssLoader.java:291)
>>        at
>>weblogic.utils.classloaders.GenericClassLoader.findClass(Generi
>>cClassLoa
>>der.java:259)
>>        at
>>weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(Ch
>>angeAware
>>ClassLoader.java:54)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>        at
>>weblogic.utils.classloaders.GenericClassLoader.loadClass(Generi
>>cClassLoa
>>der.java:158)
>>        at
>>weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(Ch
>>angeAware
>>ClassLoader.java:35)
>>        at
>>weblogic.servlet.internal.EventsManager.registerEventListener(E
>>ventsMana
>>ger.java:271)
>>        at
>>weblogic.servlet.internal.WebAppHelper.parseAndRegisterListener
>>s(WebAppH
>>elper.java:238)
>>        at
>>weblogic.servlet.internal.WebAppHelper.registerTagLibListeners(
>>WebAppHel
>>per.java:175)
>>        at
>>weblogic.servlet.internal.EventsManager.registerEventListeners(
>>EventsMan
>>ager.java:253)
>>        at
>>weblogic.servlet.internal.WebAppServletContext.initContextListe
>>ners(WebA
>>ppServletContext.java:1573)
>>        at
>>weblogic.servlet.internal.WebAppServletContext.prepare(WebAppSe
>>rvletCont
>>ext.java:1037)
>>        at
>>weblogic.servlet.internal.HttpServer.doPostContextInit(HttpServ
>>er.java:4
>>33)
>>        at
>>weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:408)
>>        at
>>weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppMod
>>ule.java:
>>552)
>>        at
>>weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:287)
>>        at
>>weblogic.application.internal.flow.ScopedModuleDriver.prepare(S
>>copedModu
>>leDriver.java:176)
>>        at
>>weblogic.application.internal.flow.ModuleListenerInvoker.prepar
>>e(ModuleL
>>istenerInvoker.java:93)
>>        at
>>weblogic.application.internal.flow.DeploymentCallbackFlow$1.nex
>>t(Deploym
>>entCallbackFlow.java:360)
>>        at
>>weblogic.application.utils.StateMachineDriver.nextState(StateMa
>>chineDriv
>>er.java:26)
>>        at
>>weblogic.application.internal.flow.DeploymentCallbackFlow.prepa
>>re(Deploy
>>mentCallbackFlow.java:56)
>>        at
>>weblogic.application.internal.flow.DeploymentCallbackFlow.prepa
>>re(Deploy
>>mentCallbackFlow.java:46)
>>        at
>>weblogic.application.internal.BaseDeployment$1.next(BaseDeploym
>>ent.java:
>>621)
>>        at
>>weblogic.application.utils.StateMachineDriver.nextState(StateMa
>>chineDriv
>>er.java:26)
>>        at
>>weblogic.application.internal.BaseDeployment.prepare(BaseDeploy
>>ment.java
>>:208)
>>        at
>>weblogic.application.internal.DeploymentStateChecker.prepare(De
>>ploymentS
>>tateChecker.java:147)
>>        at
>>weblogic.deploy.internal.targetserver.AppContainerInvoker.prepa
>>re(AppCon
>>tainerInvoker.java:61)
>>        at
>>weblogic.deploy.internal.targetserver.AppDeployment.prepare(App
>>Deploymen
>>t.java:131)
>>        at
>>weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepa
>>re(Deploy
>>mentAdapter.java:38)
>>        at
>>weblogic.management.deploy.internal.DeploymentAdapter.prepare(D
>>eployment
>>Adapter.java:177)
>>        at
>>weblogic.management.deploy.internal.AppTransition$1.transitionA
>>pp(AppTra
>>nsition.java:21)
>>        at
>>weblogic.management.deploy.internal.ConfiguredDeployments.trans
>>itionApps
>>(ConfiguredDeployments.java:233)
>>        at
>>weblogic.management.deploy.internal.ConfiguredDeployments.prepa
>>re(Config
>>uredDeployments.java:165)
>>        at
>>weblogic.management.deploy.internal.ConfiguredDeployments.deplo
>>y(Configu
>>redDeployments.java:122)
>>        at
>>weblogic.management.deploy.internal.DeploymentServerService.res
>>ume(Deplo
>>ymentServerService.java:173)
>>        at
>>weblogic.management.deploy.internal.DeploymentServerService.sta
>>rt(Deploy
>>mentServerService.java:89)
>>        at
>>weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
>>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
>>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
>>05-Jun-2007 10:06:31 weblogic.aspects.AspectJ init
>>INFO: Initializing: {J2EE=cloneData.jar}
>>05-Jun-2007 10:06:31
>>weblogic.utils.classloaders.ClassPreProcessor$ClassPreProcessorSupport
>>preProcess
>>WARNING: Error pre-processing class
>>org.apache.commons.logging.LogFactory with 
>>weblogic.aspects.AspectClassPreProcessor@1942a3c'
>>java.lang.NoSuchMethodError:
>>org.aspectj.weaver.bcel.BcelWorld.<init>(Ljava/util/List;Lorg/a
>>spectj/br
>>idge/IMessageHandler;)V
>>        at weblogic.aspects.AspectJ.init(AspectJ.java:53)
>>        at
>>weblogic.aspects.AspectClassPreProcessor.createAspectSystem(Asp
>>ectClassP
>>reProcessor.java:178)
>>
>>
>> 
>>
>>>-----Original Message-----
>>>From: aspectj-users-bounces@xxxxxxxxxxx 
>>>[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Paul Bergin
>>>Sent: 01 June 2007 15:24
>>>To: aspectj-users@xxxxxxxxxxx
>>>Subject: RE: [aspectj-users] AjcClosureX.class files
>>>
>>>Thanks for the response
>>>OK, I just figured out that the classes are created at load
>>time, I see
>>>in the weblogic logs that these AjcClosure classes are created, but 
>>>when it tries to load these classes I get a ClassNotFound
>>exception It
>>>looks like the classes are created, but are not in the 
>classpath when 
>>>required.
>>>
>>> 
>>>
>>>>-----Original Message-----
>>>>From: aspectj-users-bounces@xxxxxxxxxxx 
>>>>[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
>>>>Sent: 01 June 2007 14:47
>>>>To: aspectj-users@xxxxxxxxxxx
>>>>Subject: Re: [aspectj-users] AjcClosureX.class files
>>>>
>>>>closures are created when around advice cannot be inlined.  
>>>>They are generated by the weaver.  if you build your application 
>>>>separate to your aspect, you will not get them created until
>>>the weave
>>>>occurs.
>>>>how are you doing the weave? loadtime? post-compile?
>>>>how does it actually fail?
>>>>
>>>>Andy.
>>>>
>>>>On 01/06/07, Paul Bergin <Paul.Bergin@xxxxxx> wrote:
>>>>> Anyone?
>>>>> Why are AjcClosure files created?
>>>>>
>>>>>
>>>>> >-----Original Message-----
>>>>> >From: aspectj-users-bounces@xxxxxxxxxxx 
>>>>> >[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of
>>Paul Bergin
>>>>> >Sent: 31 May 2007 16:05
>>>>> >To: aspectj-users@xxxxxxxxxxx
>>>>> >Subject: [aspectj-users] AjcClosureX.class files
>>>>> >
>>>>> >Hi
>>>>> >Currently I have an app deployed on weblogic, I need to create
>>>>> >4 pointcuts to intercept calls. I have them defined and when I 
>>>>> >compile and jar all the code together it creates AjcClosure
>>>>files in
>>>>> >the existing code and works correctly.
>>>>> >E.G.
>>>>> >Existing object (Factory.java)
>>>>> >
>>>>> >       com.Factory.class
>>>>> >Created class
>>>>> >       com.Factory$AjcClosure1.class
>>>>> >
>>>>> >But I want the aspectJ code separate to the existing code.
>>>>> >When I build the two separately the AjcClosure files are
>>>>not created
>>>>> >because the main app is build separately, but I see there are 4 
>>>>> >AjcClosure class files built in my aspectJ project (obviously
>>>>> >Factory$AjcClosure1 does not exist), I would have thought these 
>>>>> >classes should be used when running, but when I debug it
>>looks for
>>>>> >AjcClosure class files in the existing code base 
>>>>> >(Factory$AjcClosure1).
>>>>> >
>>>>> >Here is an example of one of my point cuts
>>>>> >
>>>>> >       public pointcut pointCutOne(String fname, String sname) :
>>>>> >               call(public Quote Factory.changeDetails(String,
>>>>> >String) throws JdbcUtilException ) && args(fname, sname);
>>>>> >
>>>>> >       Object around(String fname, String sname) :
>>>>> >             changeContactDetails(fname, sname) {
>>>>> >                       Object resultObj = proceed(fname, sname);
>>>>> >
>>>>> >                       return resultObj;
>>>>> >       }
>>>>> >
>>>>> >Where am I going wrong?
>>>>> >
>>>>> >Regards
>>>>> >Paul
>>>>> >_______________________________________________
>>>>> >aspectj-users mailing list
>>>>> >aspectj-users@xxxxxxxxxxx
>>>>> >https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>>> >
>>>>> _______________________________________________
>>>>> aspectj-users mailing list
>>>>> aspectj-users@xxxxxxxxxxx
>>>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>>>
>>>>_______________________________________________
>>>>aspectj-users mailing list
>>>>aspectj-users@xxxxxxxxxxx
>>>>https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>>
>>>_______________________________________________
>>>aspectj-users mailing list
>>>aspectj-users@xxxxxxxxxxx
>>>https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>
>>_______________________________________________
>>aspectj-users mailing list
>>aspectj-users@xxxxxxxxxxx
>>https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>_______________________________________________
>aspectj-users mailing list
>aspectj-users@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>_______________________________________________
>aspectj-users mailing list
>aspectj-users@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/aspectj-users
>