[jboss-user] [JBoss AOP] - aopc and headaches

apinto do-not-reply at jboss.com
Wed Mar 19 14:00:34 EDT 2008

Hi there,

I'm having a hard time to instrument my project classes. The problem is that the documentation lacks practical examples and Google doesn't seem to be able to help me.

I'm using JBoss AOP 1.5.6.GA and Ant 1.7. The relevant code is:

  | 		<path id="project.classpath.aop">
  | 			<path refid="project.classpath"/>
  | 			<path refid="jboss.aop.classpath"/>
  | 			<fileset dir="${dir.bin.pub}"/>
  | 			<fileset dir="${dir.bin.priv}"/>
  | 		</path>
  | 		<taskdef name="aopc" classname="org.jboss.aop.ant.AopC"
  | 			classpathref="jboss.aop.classpath"/>
  | 		<aopc compilerclasspathref="project.classpath.aop" verbose="true">
  | 			<classpath path="${dir.bin.priv}"/>
  | 			<src path="${dir.bin.priv}"/>
  | 			<include name="**/*.class"/>
  | 			<aoppath path="${dir.etc.aop}/META-INF/jboss-aop.xml"/>
  | 			<aopclasspath path="../addons/manager/bin"/>
  | 		</aopc>

project.classpath has my project classpath, the same that's used to compile the classes with javac. jboss.aop.classpath is defined as:

  | 	<path id="jboss.aop.classpath">
  | 		<fileset dir="../common/lib/aop">
  | 			<include name="javassist.jar"/>
  | 			<include name="trove.jar"/>
  | 			<include name="concurrent.jar"/>
  | 			<include name="jboss-common.jar"/>
  | 			<include name="jboss-aop-jdk50.jar"/>
  | 		</fileset>
  | 	</path>

When I try to compile with aopc, I get the following error:

  | [aopc] org.jboss.aop.instrument.TransformationException: Failed to aspectize class pt.ptinovacao.altaia.collector.agent.AgentBean. Could not find class it references xxx.AgentRemote  It may not be in your classpath and you may not be getting field and constructor weaving for this class.

The class AgentRemote.class is located in the correct package under ${dir.bin.priv}.

Can anyone help me, please? Thanks a lot in advance,


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137872#4137872

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137872

More information about the jboss-user mailing list