From: natebowler <nu...@jb...> - 2005-07-20 23:17:38
|
Bill, Sorry to take so long in my response, but this was put on hold and I am just now getting back into it. I have followed your instructions and yes, I can pring out A LOT of information. I'm not sure what this is, but I can't see any information regarding Annotations. Just to sum up again, I am using JDK 1.4.2, and I am trying to annotate my code. The annotationc tag in my Ant file is as follows and runs successfully: [annotationc compilerclasspathref="redrock.aop.classpath.path.id" classpath="${ejb.dest.dir}" xml="true"] [src ] [fileset dir="${src.dir}"] [include name="*.java"/] [/fileset] [/src] [/annotationc] I have an interface named "biz.OptimisticLockRetry". The method I want to have intercepted is annotated using: /** * @@biz.OptimisticLockRetry **/ My pointcut in jboss-aop.xml is defined using: [pointcut name="optimisticLockRetryMethods" expr="execution(public static * *->@biz.OptimisticLockRetry(..))"/] Is there something obvious I'm missing here? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885793#3885793 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885793 |
From: <kab...@jb...> - 2005-07-21 00:00:29
|
Instead of xml=true in the annotationc tag, try bytecode=true You can find more info here: http://docs.jboss.com/aop/1.3/aspect-framework/reference/en/html/annotationcompiler.html#annotationcompiler-compiler View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885805#3885805 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885805 |
From: natebowler <nu...@jb...> - 2005-07-21 20:40:20
|
I'm running out of ideas here, there has got to be something I'm missing but as I keep going through the checklist I'm not catching it. I have changed my ant file to: [taskdef name="annotationc" classname="org.jboss.aop.ant.AnnotationC" classpath="${aop.classpath}"/] [annotationc compilerclasspathref="redrock.aop.classpath.path.id" classpath="${ejb.dest.dir}" bytecode="true"] [src] [fileset dir="${src.dir}"] [include name="*.java"/] [/fileset] [/src] [/annotationc] But, I still get no encodings. Everything else is the same as my previous post. The Ant output is: "[annotationc] Working directory ignored when same JVM is used." Also, I am concerned that when I added the "verbose="true"" attribute to the annotationc tag, I got an error saying "verbose was not supported". I am using JBoss AOP 1.3 with JDK 1.4.2 on Windows XP. If it helps, the Java interface is defined as: package biz; public interface OptimisticLockRetry {} As a side note, when I had the "xml="true"" attribute set, my resultant XML file was empty . It's just not picking up these annotations. The "verbose not supported" concerns me though. Should I start looking at classpath/library issues? Nate View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885978#3885978 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885978 |
From: <bil...@jb...> - 2005-07-21 20:54:35
|
You must have your classes compiled before you run annotationc. These classes must be available in your classpath. These classes cannot be in a JAR, they must be in a directory classpath. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885984#3885984 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885984 |
From: natebowler <nu...@jb...> - 2005-07-21 21:11:16
|
Yes I got that. If it helps, this is my javac call: [javac debug="on" destdir="${ejb.dest.dir}" classpath="${web.classpath}" optimize="off" deprecation="off" includes="**" excludes="test/**,benchmarking/**,aspect/**"] [src path="${src.dir}"/] [src path="${gensrc.dir}"/] [/javac] The target this tag is in is called prior to the target running [annotationc]. ${ejb.dest.dir} is a directory.It *is* named using the ".jar" suffix per JBoss deployment specifications, I' m not sure if that makes any difference. Is the fact that the [annotationc] tag is giving an error on "verbose" a cause of concern (as in I've got a bad version or an old verison)? Also, if I don't use a [fileset] inside my [src] tag I get a parse error, which I'm not sure if CVS files are causing it to choke or what. Again, I'm just trying to mention as much as possible to see if anything comes across as significant. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885989#3885989 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885989 |
From: natebowler <nu...@jb...> - 2005-07-22 03:43:18
|
Ok, I got it working. The way I used the [annotationc] with a [fileset] did not work. My files were not being examined. When I changed it to use an [include] tag with the [src] tag, it started to examine the files. Once this worked, I discovered I had several methods marked that had comments AFTER the markup @@biz.OptimisticLockRetry. I guess you CAN'T have anything after this or you get a parse error. :) This is fairly obvious, I suppose, but it was easy to fix once I started getting messages. At any rate, thanks for the help. It's working great. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3886028#3886028 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3886028 |