[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] newbie needs help configuring

#: Andy Kriger changed the world a bit at a time by saying on 10/13/2005 11:06 PM :#
I am trying to use load-time weaving in AspectJ 1.5M4 to log our web
service running on Axis 1.2 in Tomcat 5.8. Right now I'm trying to get
a very simple proof-of-concept working. I make calls to web service
methods expecting to see logging to stdout and instead I keep running
into InvocationTargetExceptions. I've included my config below.

If I comment out the Advice part of MyAspect, everything works fine.
I've tried @Before as well as @After - no luck there. I do see
"weaveinfo Join point..." info in the logs, so things look like they
are being woven. Logging in my code shows everything working through
the service method being invoked and then mysteriously throwing the
InvocationTargetEception. I can only guess that it's coming from the
Advice. I've also tried applying the advice to the class invoked by
the service (in case there's some kind of reflection effect from Axis)
but I still see the same problem.

I really want to show my boss that AOP is valid for our project but
right now I'm dead in the water. Can someone can help me figure out
what's going on?

Thanks in advance,

Tomcat is configured to run with the JVM opt
and shared/lib contains the lib/*.jar files from the AspectJ distro

Here's my aop.xml

		 <aspect name="com.myco.MyAspect"/>
	<weaver options="-verbose -showWeaveInfo">
		<include within="com.myco.*"/>

Here's my aspect

package com.myco;

public class MyAspect

// on any call to our service
@Pointcut("execution( public * com.myco.Service.*(..) )")
void csCall() {}

// log something
public void logPath()
	System.out.println("Aspect logXyPath was called");


Can you add to the aboves the stacktrace you are getting?

.w( the_mindstorm )p.