[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Questions about passing injars
|
But if you don't have this class, is there a way of doing it without it?. I'm
trying to insert a pointcut in a method call to model a server behaviour and
strangely this class is not present in any of the included jars. I know this
may sound strange buy I unconpressed all jars and this class was missing.
Regards from spain.
Dave Garcia.
P.D. Thanks everybody specially to Wes, this is the second time you helped
me. :)
> (1) To resolve but not weave a required class,
> put it on the classpath.
>
> (2) Ajc only writes .class files it generates to output.jar
> You'll have to copy resources, etc.
>
> Good luck -
> Wes
>
> David Garcia Garcia wrote:
> >
> > Hi everybody, I'm trying to use an aspect for monitoring method calls
> inside a jar file. If I use a jar that includes all needed files (class
> files) I got no problem, but when I'm using a jar that has a class that calls
> a method or instancietes an object from a package not include in this jar I
> get the following error:
> > can't find type com.anycomp...(here goes the name of the missing class)
> > trouble in:
> > public class com...(here the name of the class that calls a method to that
> class) extends java.lang.Object:
> >
> > ... Here goes the code dump of the involved class
> >
> > The problem is that I only want to monitor classes included in this jar not
> in the others. And I don't have the jar that includes that class ;P.
> > Is there any way of doing code weaving of this jar without having the
> missing class?.
> >
> > Thanks everybody apologies for my english :).
> >
> > Dave Garcia
> >
> > P.D. I tried to monitor Apache Tomcat using code weaving. For this purposal
> I created an aspect including a pointcut that had a pointcut named Service
> that monitors execution of javax.Servlet.service method.
> > My aspect was in a file called ServletMonitor.java. I compiled all in this
> way:
> > ajc ServletMonitor.java -injars servlet.jar -outjar servlet.jar. Doing that
> I had inside servlet.jar the modifided classes and my aspect class
> ServletMonitor.class. The problem is that inside that jar ( before compiling
> using ajc) there was several kind of files not only class files ( for example
> dtd files) and in the outjars those files where missing!. My question is: is
> this a bug or am I doing something wrong. I suspect that's very likely that
> I'm doing something wrong .
> >
> > _______________________________________________
> > 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
>