[jboss-user] [JBoss AOP] - Re: Obnoxious AOP runtime error

mckeno do-not-reply at jboss.com
Mon May 28 07:25:42 EDT 2007


Thanks for your replying, but are you referring the running at loadtime mechanism? I am using the pre-compiled mechanism.

  | <target name="aopc" description="Precompile aop classes to local bin">
  | 		<taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="aopclasspath"/>
  | 	    <aopc compilerclasspathref="aopclasspath" verbose="true">
  | 	    	<src path="${basedir}/bin"/>
  | 	    	<!-- list out the class name that needed to be aspectized here -->
  | 	      	<include name = "**/UserIdentification.class"/>
  | 	      	<include name = "**/UserSession.class"/>
  | 	      	<include name = "**/Balance.class"/>
  | 	        <aoppath path="${basedir}/properties/jboss-aop.xml"/>
  | 	        <!-- should be the same as src path, place where normal compiled class is located -->
  | 	        <classpath path="${basedir}/bin"/>
  | 		</aopc>
  | </target>
  | 
  | <target name="compile">
  | <!-- some main project compiling here -->
  | ....
  | ....
  | </target>
  | 
  | <target name="run" depends="compile, aopc">
  | 		<java classname="${main-class}" fork="yes">
  | 			<classpath refid="classpath"/>
  | 			<classpath path="${basedir}/bin"/>
  | 		</java>
  | </target>
  | 
  | 

The above ant script works fine, but if I run it target by target, compile first and then apoc and then run the main class in Eclipse(by right click on the main class and chose run java application) the error of NotImplementedException would occurs (anyway I am not using Jboss IDE)... The reason I want to run the project in Eclipse is that I want to use the debugger in Eclipse (which is not applicable when running by ant build)

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

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



More information about the jboss-user mailing list