[jboss-user] [JBoss AOP] - AOP for JBoss web service

Franklin Webber do-not-reply at jboss.com
Tue Mar 20 13:37:50 EDT 2012


Franklin Webber [https://community.jboss.org/people/eutaxy] created the discussion

"AOP for JBoss web service"

To view the discussion, visit: https://community.jboss.org/message/725146#725146

--------------------------------------------------------------
I'm trying to use JBoss AOP to instrument an existing web service that runs in JBoss AS 5.1.
Unfortunately, I'm unable to get AOP to work within JBoss, despite having read a
substantial amount of documentation and done a substantial amount of fiddling around
with the "injboss" example from the AOP distribution.  (In contrast, I have been able
to get AOP to work with standalone Java programs, outside JBoss.)

Can anyone tell me why the following steps fail to demonstrate compile-time AOP instrumentation?
(I've also tried one of the "injboss" examples for run-time weaving, which also
does not work, but I'm guessing the compile-time example will be simpler
by not involving the Aspect Manager or a Java Agent.)

-- unzip jboss-5.1.0.GA-jdk6.zip
-- unzip jboss-aop-2.1.8.GA.zip
-- upgrade JBoss using the instructions in jboss-50-install/ReadMe-AS5.txt
-- modify docs/aspect-framework/examples/injboss/build-jboss5.xml ,
   setting jboss.dir , jboss.server.config , and jboss.classpath
-- run ant on build-jboss5.xml for the deploy-basic-ct-war target
-- run jboss
-- look at aopexample/index.jsp in a browser.

The result is ClassNotFoundException: org.jboss.injossaop.lib.SimpleInterceptor .
I note that this is similar to a problem described by poster Karen Greene
several years ago in  https://community.jboss.org/message/446338#446338#446338 https://community.jboss.org/message/446338#446338 .
She says she resolved the problem but does not say how.

I tried resolving the problem by adding aopexamplelib.jar to the JBoss AS class-path.
The result is NoClassDefFoundError:  org/jboss/aop/advice/Interceptor .

I then tried adding both aopexamplelib.jar and jboss-aop-single.jar from the AOP
distribution to the JBoss AS class-path.  The result is
NoSuchMethodError: org.jboss.logging.util.LoggerPluginWriter.<init> .
I do not know how to resolve this, as I see the named class in jboss-aop-single.jar .

Got an explanation? Useful advice? Helpful insight?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/725146#725146]

Start a new discussion in JBoss AOP at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120320/a1f4394d/attachment.html 


More information about the jboss-user mailing list