Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] AspectJ in WAR files

In particular, remember that Tomcat uses a hierarchy of classloaders (as I recall JBoss uses Tomcat as its Web container). I put a copy of aspectjrt.jar in my %TOMCAT_HOME%/common/lib directory to make AspectJ available to all my Web apps. 

I assume you're precompiling your JSPs. I have been able to integrate with the Tomcat JSP compiler so it dynamically compiles aspects into my JSPs; the 1.1.1 release will include support for the ant adapter that lets you configure this. When it's out I can post a short how to note for those interested...

Ron Bodkin
Chief Technology Officer
New Aspects of Security
m: (415) 509-2895

> ------------Original Message-------------
> From: "R. Dale Asberry" <lists@xxxxxxxxxxxxxxx>
> To: <aspectj-users@xxxxxxxxxxx>
> Date: Sat, Aug-23-2003 6:20 AM
> Subject: RE: [aspectj-users] AspectJ in WAR files
> 
> You need to make sure that aspectjrt.jar is on the classpath.
> 
> > -----Original Message-----
> > From: aspectj-users-admin@xxxxxxxxxxx
> > [mailto:aspectj-users-admin@xxxxxxxxxxx]On Behalf Of
> > qqasim@xxxxxxxxxxxxxx
> > Sent: Saturday, August 23, 2003 8:15 AM
> > To: aspectj-users@xxxxxxxxxxx
> > Subject: [aspectj-users] AspectJ in WAR files
> >
> >
> > Hi, thanks everyone for my previous question.
> > I changed my pointcut to include the exact exception classes:
> > pointcut doPrint(): execution(* Person.*(..) throws ModelException,
> >  ApplicationException );
> >
> > But now if I call my Person class through JSP I get "
> > org/aspect/lang/Signature ..." error.
> >
> > I tried to do whole loads of other things to solve this error,
> > but nothing
> > worked. So I started from the beginning again.
> >
> > I created simple Java and aspect classes, tested them using ajc
> > compiler. It
> > worked fine. So then I created a WAR file (included my Java and
> > aspect classes)
> > and a JSP.
> >
> > But now when I invoke my Java class, I get NoAspectBoundException error:
> > "
> > org.apache.jasper.JasperException: org/aspectj/lang/NoAspectBoundException
> > 	at org.apache.jasper.servlet.JspServletWrapper.service
> > (JspServletWrapper.java:254)
> > 	at org.apache.jasper.servlet.JspServlet.serviceJspFile
> > (JspServlet.java:295)
> > "
> >
> > If I can run my aspects properly through console but not in a war
> > file, it must
> > mean I am missing something in my WAR file. I have included
> > aspect jars in my
> > lib dir.
> >
> > Any ideas?
> > Thanks
> >
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 


Back to the top