-
1. Re: Deployer chains and interceptors
eleitevasco Dec 13, 2004 2:12 PM (in response to eleitevasco)yes at least this interceptor chain can use a typed interface, it does not makes sense to use the generic interceptor interface.
one concern regarding to improve the WARDeployer would be to have tomcat use an input stream for web.xml when it deploys a war file instead of opening the stream by itslef.
Thus that would avoid the rewrite the modified web.xml on the disk which overwrites the original document. -
2. Re: Problem Compiling aspects
eleitevasco Dec 13, 2004 2:12 PM (in response to eleitevasco)My last message was messed because of the XML stuff of my build file...
Sorry for that.<path id="competence.compilation.classpath"> <pathelement path="${hibernate.lib.dir}/hibernate2.jar"/> <pathelement path="${aop.lib.dir}/jboss-aop.jar"/> <pathelement path="${common.lib.dir}/log4j-1.2.9.jar"/> <pathelement path="${ejb.lib.dir}/jboss-j2ee.jar"/> </path> <path id="aopctask.classpath"> <fileset dir="${aop.lib.dir}"/> </path> <path id="aopc.classpath"> <path refid="aopctask.classpath"/> <path refid="competence.compilation.classpath"/> </path> <aopc compilerclasspathref="aopc.classpath" verbose="true"> <classpath path="${competence.classes.dir}"/> <src path="${competence.classes.dir}"/> <aoppath path="${aop.config}"/> </aopc>
-
3. Re: Problem Compiling aspects
bill.burke Dec 13, 2004 2:36 PM (in response to eleitevasco)When you aopc your classes, make sure the hibernate libraries are in the classpath. This exception gets thrown because you are aspectizing a class that references the HibernateSessionFactory and the compiler cannot find this class to determine whether or not any other aspects/pointcuts are triggered.
Bill -
4. Re: Problem Compiling aspects
eleitevasco Dec 13, 2004 2:46 PM (in response to eleitevasco)I still does not understand what paths am I supposed to put on the task...
And still does not work...
The first two lines of the debug output:
[aopc] [debug] jboss.aop.class.path is NULL
[aopc] [debug] jboss.aop.search.classpath: 'null' true
A new interesting point... if I take the reference to the Configuration object from Hibernate, everything works fine. Very strange...
Any thoughts? -
5. Re: Problem Compiling aspects
bill.burke Dec 13, 2004 3:12 PM (in response to eleitevasco)Add the Hiberante jars to your classpath element of the aopc target. I.e.:
<aopc ... <classpath path="${competence.classes.dir}"/> <classpath refid="aopc.classpath"/> <src path="${competence.classes.dir}"/> <aoppath path="${aop.config}"/> </aopc>
Does that work? -
6. Re: Problem Compiling aspects
eleitevasco Dec 13, 2004 3:24 PM (in response to eleitevasco)It does not work...
there is a weird thing happening here...
I took of the references to the configuration object in my code, and every thing works fine. Including code that uses classes of the Hibernate jar.
I use other concrete class for the package, and it worked too.
If I only declare a variable of type Configuration and puts null to it, it works. It only breaks when I use some method of this class.
Is there a way to tell aopc not to search this class to compile the aspects? -
7. 3858523
eleitevasco Dec 14, 2004 7:02 AM (in response to eleitevasco)I analysed the hibernate jar and saw that the sf.net.hibernate.cfg.Configuration contains inner classes.
I tried to use a class of the log4j pack (the ConsoleAppender) and it worked nice. And it does not have inner classes.
Any clues? -
8. Re: Problem Compiling aspects
eleitevasco Dec 14, 2004 7:30 AM (in response to eleitevasco)I reworked my code in such a way that the invocation for the Configuration class is out of the scope of the aopc compiler.
Now everything works fine.
Does anyone had any problems like this? -
9. Re: Problem Compiling aspects
bill.burke Dec 14, 2004 8:51 AM (in response to eleitevasco)It would help if you could send me an easy example that I can reproduce the problem. An example with Hibernate would be fine... bill@jboss.org
I'm sorry for your problems.
Bill