[JBoss AOP] - aop precompiler ant task fails to find class reference
by thebaz
Hi all,
I'm trying to precompile my classes with AOP ant Task in order to use them with JBoss PojoCache.
Here follows ant task log.
aopc
| [info] Total length of filenames to be compiled is greater than 1000, listing files in --SOURCEPATH: /tmp/src22454.tmp
| [debug] Passed in instrumentor: null
| [debug] Defaulting instrumentor to: org.jboss.aop.instrument.ClassicInstrumentor
| [debug] jboss.aop.class.path is NULL
| [debug] jboss.aop.search.classpath: 'null' true
| [debug] jboss.aop.path: /home/mbazzoni/IdeaProjects/gto/gto-deploy/gto-deploy/jboss-aop.xml
| jboss.aop.path[0]: /home/mbazzoni/IdeaProjects/gto/gto-deploy/gto-deploy/jboss-aop.xml
| [deploying] file:/home/mbazzoni/IdeaProjects/gto/gto-deploy/gto-deploy/jboss-aop.xml
| [trying to transform] rrd.gto.cbe.common.domain.PolicyItem
| [debug] There are no caller pointcuts!
| [debug] javassist.CtMethod@74eb0e95[public getOid ()Ljava/lang/String;] matches no pointcuts
| [debug] javassist.CtMethod@50d6273f[public setOid (Ljava/lang/String;)V] matches no pointcuts
| [debug] javassist.CtMethod@4b9b39fc[public getValue ()Ljava/lang/String;] matches no pointcuts
| [debug] javassist.CtMethod@6d1b59e6[public setValue (Ljava/lang/String;)V] matches no pointcuts
| [debug] javassist.CtConstructor@1bab50a[public PolicyItem ()V] matches no pointcuts
| [debug] rrd.gto.cbe.common.domain.PolicyItem.oid:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
| [debug] rrd.gto.cbe.common.domain.PolicyItem.value:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
| [debug] rrd.gto.cbe.common.domain.PolicyItem.oid:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
| [debug] rrd.gto.cbe.common.domain.PolicyItem.value:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
| [debug] was rrd.gto.cbe.common.domain.PolicyItem converted: true
| [compiled] /home/mbazzoni/IdeaProjects/gto/gto-deploy/gto-deploy/temp/gto-cbe/rrd/gto/cbe/common/domain/PolicyItem.class
| [cannot compile] isInterface: rrd.gto.cbe.common.domain.device.DevicesRelationSpecificationKey
| [no comp needed] /home/mbazzoni/IdeaProjects/gto/gto-deploy/gto-deploy/temp/gto-cbe/rrd/gto/cbe/common/domain/device/DevicesRelationSpecificationKey.class
| [trying to transform] rrd.gto.cbe.common.domain.device.implementation.RrdDeviceKey
| [debug] There are no caller pointcuts!
| [debug] javassist.CtMethod@6e4ac4cc[public getRrdPrimaryKey ()Ljava/lang/String;] matches no pointcuts
| [debug] javassist.CtMethod@fe561cb6[public setRrdPrimaryKey (Ljava/lang/String;)V] matches no pointcuts
| [debug] javassist.CtMethod@33a3ff1e[public clone ()Ljava/lang/Object;] matches no pointcuts
| [debug] javassist.CtMethod@87a44f24[public equals (Ljava/lang/Object;)Z] matches no pointcuts
| [debug] javassist.CtMethod@68af968e[public makeApplicationContext ()Ljavax/oss/ApplicationContext;] matches no pointcuts
| [debug] javassist.CtMethod@6f035bf6[public getApplicationContext ()Ljavax/oss/ApplicationContext;] matches no pointcuts
| [debug] javassist.CtMethod@c6e242ab[public setApplicationContext (Ljavax/oss/ApplicationContext;)V] matches no pointcuts
| [debug] javassist.CtMethod@2d24d5cf[public setApplicationDN (Ljava/lang/String;)V] matches no pointcuts
| [debug] javassist.CtMethod@9a02c225[public getApplicationDN ()Ljava/lang/String;] matches no pointcuts
| [debug] javassist.CtMethod@31e6d0b1[public getType ()Ljava/lang/String;] matches no pointcuts
| [debug] javassist.CtMethod@1b64fdf3[public setType (Ljava/lang/String;)V] matches no pointcuts
| [debug] javassist.CtMethod@1d688d34[public getPrimaryKey ()Ljava/lang/Object;] matches no pointcuts
| [debug] javassist.CtMethod@b756f664[public setPrimaryKey (Ljava/lang/Object;)V] matches no pointcuts
| [debug] javassist.CtMethod@5ee4dfcc[public makePrimaryKey ()Ljava/lang/Object;] matches no pointcuts
| [debug] javassist.CtConstructor@337d0f[public RrdDeviceKey ()V] matches no pointcuts
| org.jboss.aop.instrument.TransformationException: Failed to aspectize class rrd.gto.cbe.common.domain.device.implementation.RrdDeviceKey. Could not find class it references rrd.gto.cbe.common.domain.device.DeviceKey It may not be in your classpath and you may not be getting field and constructor weaving for this class.
| at org.jboss.aop.instrument.Instrumentor.convertReferences(Instrumentor.java:593)
| at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:646)
| at org.jboss.aop.AspectManager.translate(AspectManager.java:792)
| at org.jboss.aop.AspectManager.transform(AspectManager.java:704)
| at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:329)
| at org.jboss.aop.standalone.Compiler.compile(Compiler.java:218)
| at org.jboss.aop.standalone.Compiler.main(Compiler.java:74)
| Exception in thread "main" org.jboss.aop.instrument.TransformationException: Failed to aspectize class rrd.gto.cbe.common.domain.device.implementation.RrdDeviceKey. Could not find class it references rrd.gto.cbe.common.domain.device.DeviceKey It may not be in your classpath and you may not be getting field and constructor weaving for this class.
| at org.jboss.aop.instrument.Instrumentor.convertReferences(Instrumentor.java:593)
| at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:646)
| at org.jboss.aop.AspectManager.translate(AspectManager.java:792)
| at org.jboss.aop.AspectManager.transform(AspectManager.java:704)
| at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:329)
| at org.jboss.aop.standalone.Compiler.compile(Compiler.java:218)
| at org.jboss.aop.standalone.Compiler.main(Compiler.java:74)
| /home/mbazzoni/IdeaProjects/gto/gto-deploy/gto-deploy/gto-deploy.xml:304: Java returned: 1
| at org.apache.tools.ant.taskdefs.Java.execute(Java.java:107)
| at org.jboss.aop.ant.AopC.execute(AopC.java:320)
| at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
| at org.apache.tools.ant.Task.perform(Task.java:348)
| at org.apache.tools.ant.Target.execute(Target.java:357)
| at org.apache.tools.ant.Target.performTasks(Target.java:385)
| at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
| at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
| at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
| at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
| at org.apache.tools.ant.Main.runBuild(Main.java:698)
| at org.apache.tools.ant.Main.startAnt(Main.java:199)
| at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
| at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
| /home/mbazzoni/IdeaProjects/gto/gto-deploy/gto-deploy/gto-deploy.xml:304: Java returned: 1
| at org.apache.tools.ant.taskdefs.Java.execute(Java.java:107)
| at org.jboss.aop.ant.AopC.execute(AopC.java:320)
| at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
| at org.apache.tools.ant.Task.perform(Task.java:348)
| at org.apache.tools.ant.Target.execute(Target.java:357)
| at org.apache.tools.ant.Target.performTasks(Target.java:385)
| at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
| at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
| at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
| at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
| at org.apache.tools.ant.Main.runBuild(Main.java:698)
| at org.apache.tools.ant.Main.startAnt(Main.java:199)
| at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
| at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
| /home/mbazzoni/IdeaProjects/gto/gto-deploy/gto-deploy/gto-deploy.xml:304: Java returned: 1
| at org.apache.tools.ant.taskdefs.Java.execute(Java.java:107)
| at org.jboss.aop.ant.AopC.execute(AopC.java:320)
| at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
| at org.apache.tools.ant.Task.perform(Task.java:348)
| at org.apache.tools.ant.Target.execute(Target.java:357)
| at org.apache.tools.ant.Target.performTasks(Target.java:385)
| at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
| at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
| at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
| at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
| at org.apache.tools.ant.Main.runBuild(Main.java:698)
| at org.apache.tools.ant.Main.startAnt(Main.java:199)
| at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
| at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
|
| Ant build completed with 3 errors 3 warnings in 3s at 6:20:59 PM
|
The first class is correctly weaved:
[trying to transform] rrd.gto.cbe.common.domain.PolicyItem
| [debug] There are no caller pointcuts!
| [debug] javassist.CtMethod@74eb0e95[public getOid ()Ljava/lang/String;] matches no pointcuts
| [debug] javassist.CtMethod@50d6273f[public setOid (Ljava/lang/String;)V] matches no pointcuts
| [debug] javassist.CtMethod@4b9b39fc[public getValue ()Ljava/lang/String;] matches no pointcuts
| [debug] javassist.CtMethod@6d1b59e6[public setValue (Ljava/lang/String;)V] matches no pointcuts
| [debug] javassist.CtConstructor@1bab50a[public PolicyItem ()V] matches no pointcuts
| [debug] rrd.gto.cbe.common.domain.PolicyItem.oid:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
| [debug] rrd.gto.cbe.common.domain.PolicyItem.value:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
| [debug] rrd.gto.cbe.common.domain.PolicyItem.oid:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
| [debug] rrd.gto.cbe.common.domain.PolicyItem.value:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
| [debug] was rrd.gto.cbe.common.domain.PolicyItem converted: true
| [compiled] /home/mbazzoni/IdeaProjects/gto/gto-deploy/gto-deploy/temp/gto-cbe/rrd/gto/cbe/common/domain/PolicyItem.class
|
but it is a simple class two fields (Strings)
at the 2nd class gets an exception:
Exception in thread "main" org.jboss.aop.instrument.TransformationException: Failed to aspectize class rrd.gto.cbe.common.doma
| in.device.implementation.RrdDeviceKey. Could not find class it references rrd.gto.cbe.common.domain
| .device.DeviceKey It may not be in your classpath and you may not be getting field and constructor
| weaving for this class.
I've double checked the class is in classpath. If I use load-time aop instrumentation it works good.
What can the problem be?
Thank you in advance,
Marco.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119188#4119188
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119188
18 years, 3 months
[Clustering/JBoss] - Re: Active/Passive Cluster
by bstansberry@jboss.com
This is essentially a function of your load balancer. If the JBoss AS instances are clustered and the webapps are marked distributable, then your sessions will be replicated and will be available on either node.
What makes it active/passive is the fact that your load balancer sends all the requests to server A unless it's not available. This can be configured easily if you are using mod_jk as your load balance; in workers.properties, you mark on worker as "disabled" and the other as not.
| worker.node1.disabled=true
| .....
| worker.node2.disabled=false
|
A disabled worker will not receive requests except for:
1) If no non-disabled workers are available (i.e. active/passive)
2) OR a sticky session is associated with the worker (i.e. if you disable a worker that was enabled, it will continue to handle its existing sessions until they bleed off. This allows you quiesce a running server before shutting it down.)
Obviously, if you start node1 with disabled=true, it will have no existing sessions, so only #1 applies.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119184#4119184
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119184
18 years, 3 months