[jboss-user] [JBoss AOP Users] - Re: Deploy AOP to jboss 5.1

kgreenejpmc do-not-reply at jboss.com
Mon Aug 24 17:44:30 EDT 2009

Please ignore the previous post as there was a statement that was incorrect.

Ok, I deployed docs\aspect-framework\examples\injboss example using deploy-basic-lt-war. When I bring up index.jsp I get the following the errors below indicating the SimpleInterceptor class cannot be found even though I can look at the jar inside the war and can see the class.

At any rate, it appears that jboss is trying to at least apply the aop (in that I see that there is output in the errors regarding joinpoints). 

I have AspectManager verbose set to true. I understand that this is supposed to output info when aop is applied. When I deploy my jars that use the aop, there is absolutely no output. I don't think jboss is applying the aop in the code I am deploying . I really appreciate your help as I have trying to resolve this issue for a couple days and cannot determine I am doing wrong.

I have a JobFlow.jar that includes:

- JobFlow.java
- JobFlowAspect.java
- A few additional classes the aspect uses

I have a jboss-aop.xml that indicates to call the JobFlowAspect whenever the JobFlow annotation is used on a method

I have another jar that includes a classes that use the JobFlow annotation on the method.

I deployed the JobFlow.jar and jboss-aop.xml to farm, then I deploy the jars that use the annotation. When I deploy the jars that use the annotation there is no output that the aspect is being applied.

  | Here is the JobFlow and JobFlowAspect (Note that I deleted most of the logic in the aspect class for
  |  brevity sake).  I also tried annotations instead of jboss-aop.xml, but that did not work either.
  | Here is JobFlow.java
  | @Target({ElementType.METHOD})
  | @Retention(RetentionPolicy.RUNTIME)
  | public @interface JobFlow {}
  | Here is JobFlowAspect.java
  | //@Aspect(scope = Scope.PER_VM)
  | public class JobFlowAspect
  | {
  | 	private static Logger log = Logger.getLogger(JobFlowAspect.class);
  | 	//@Bind(pointcut="execution(* *->@com.jpmc.etl.jobflow.aspect.JobFlow(..))")
  | 	public Object executeFlow(MethodInvocation invocation) throws Throwable
  | 	{
  | 		try
  | 		{
  | 			System.out.println("JobFlowAspect: Calling method " + invocation.getMethod().getName());
  | 			return invocation.invokeNext();
  | 		}
  | 		finally
  | 		{
  | 			System.out.println("JobFlowAspect: Done");
  | 		}
  | 	}
  | }

=========== Here is the output I get from deploying the injboss example ====

org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 7

root cause

java.lang.RuntimeException: Error generating joinpoint class for joinpoint Method[method=public java.lang.String org.jboss.injbossaop.lib.ExampleValue.getMessage()]

java.lang.RuntimeException: java.lang.ClassNotFoundException: org.jboss.injbossaop.lib.SimpleInterceptor

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

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

More information about the jboss-user mailing list