User development,
A new message was posted in the thread "Deploying AOP in 5.1 with pojo cache":
http://community.jboss.org/message/522814#522814
Author : Flavia Rainone
Profile :
http://community.jboss.org/people/flavia.rainone@jboss.com
Message:
--------------------------------------------------------------
Hi! Running Vehicle's main method with javaagent does not solves your problem, because
the weaving is performed at runtime:
<target name="war" depends="compile">
<java classname="com.test.pojo.Vehicle" fork="true" >
<jvmarg value="-Xmx128M"/>
<jvmarg
value="-javaagent:WebContent/WEB-INF/lib/jboss-aop.jar"/>
<jvmarg
value="-Djboss.aop.path=WebContent/META-INF/pojocache-aop.xml"/>
<classpath refid="compile.classpath"/>
<classpath path="build/classes" />
</java>
<war destfile="dist/Cache.war"
webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent"/>
<lib dir="WebContent/WEB-INF/lib"/>
<classes dir="build/classes"/>
</war>
</target>
This means that the class file in buid/classes is not instrumented, it is instrumented
only in the memory of the JVM while executing Vehicle's main(). So, your Vehicle class
file remains unchanged and that's why you're seeing that error in JBoss AS.
You need to compile your Vehicle class with aopc instead. Take a look at our tutorial for
a build.xml example of how to do that.
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/522814#522814