Skip to main content

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

The stack trace isn't really meaningful since the only trace I see is
an Axis SOAP Fault that wraps (and masks) the exception being thrown
from within the web application. I cannot see where the trace
originates only really the InvocationTargetException. There's nothing
in the logs that indicates what problem, if any, AspectJ is having. I
already have the verbose switch in the aop.xml. If there's a way to
turn on more logging, please let me know.

On 10/13/05, Alexandru Popescu <the.mindstorm.mailinglist@xxxxxxxxx> wrote:
> #: 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,
> > Andy
> >
> > Tomcat is configured to run with the JVM opt
> > -javaagent:/usr/local/tomcat/shared/lib/aspectjweaver.jar
> > and shared/lib contains the lib/*.jar files from the AspectJ distro
> >
> > Here's my aop.xml
> >
> > <aspectj>
> >       <aspects>
> >                <aspect name="com.myco.MyAspect"/>
> >       </aspects>
> >       <weaver options="-verbose -showWeaveInfo">
> >               <include within="com.myco.*"/>
> >       </weaver>
> > </aspectj>
> >
> > Here's my aspect
> >
> > package com.myco;
> >
> > @Aspect
> > public class MyAspect
> > {
> >
> > // on any call to our service
> > @Pointcut("execution( public * com.myco.Service.*(..) )")
> > void csCall() {}
> >
> > // log something
> > @After("csCall()")
> > public void logPath()
> > {
> >       System.out.println("Aspect logXyPath was called");
> > }
> >
> > }
>
> Can you add to the aboves the stacktrace you are getting?
>
> ./alex
> --
> .w( the_mindstorm )p.
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top