[jboss-user] [JBoss AOP] - Newbie needs help with configuration

JReifsnyder do-not-reply at jboss.com
Fri Jun 1 13:00:25 EDT 2007


Hi there,
I have been reading this forum, searching the web, etc. to find anything that will get me past this configuration error. I'm hoping that someone can tell me what I have wrong, so I can move forward!

I have an existing JBoss 4.0.5 server with an existing app that I am trying to aspectize.

I have pluggable-instrumentor.jar in /bin. 

I altered run.bat to reflect this.

I have /jboss-aop-jdk50.deployer/META-INF/jboss-service.xml configured as follows:
<mbean code="org.jboss.aop.deployment.AspectManagerServiceJDK5"
  |       name="jboss.aop:service=AspectManager">
  |       <attribute name="EnableLoadtimeWeaving">true</attribute>
  | etc.

This is my jboss-aop.xml file:
<?xml version="1.0" encoding="UTF-8" ?>
  | <aop>
  |     <aspect class="com.zen.aspects.MethodAuditLogInterceptor" scope="PER_VM"/>
  |     <bind pointcut="execute(public boolean com.zen.ejb.auth.ZenAuthenticationServiceBean->makeAudioConnection(com.zen.common.UserNode, int, domain.persistent.Server))">
  | 		<advice name="audit" aspect="com.zen.aspects.MethodAuditLogInterceptor"/>
  |     </bind>
  | </aop>


This is my aspect class:

@Aspect (scope=Scope.PER_VM)
  | public class MethodAuditLogInterceptor {
  |   @Bind(pointcut="execute(public boolean com.zen.ejb.auth.ZenAuthenticationServiceBean->makeAudioConnection(com.zen.common.UserNode, int, domain.persistent.Server))")
  |   public Object audit(Invocation invocation) throws Throwable {
  | 
  | etc.
  | }

I compile everything to a myapp.jar file with jboss-aop.xml in the /META-INF directory. And then I add the .aop extension to the jar file by renaming (myapp.jar.aop).


I am getting this exception on startup, and no matter how I redefine or read the pointcut, I can't find the error to fix it:

12:55:27,328 ERROR [STDERR] org.jboss.aop.pointcut.ast.ParseException: Encountered "(" at line 1, column 8.
  | Was expecting one of:
  |     <EOF> 
  |     <AND> ...
  |     <OR> ...
  |     
  | 12:55:27,328 ERROR [STDERR] 	at org.jboss.aop.pointcut.ast.PointcutExpressionParser.generateParseException(PointcutExpressionParser.java:3245)
  | 12:55:27,328 ERROR [STDERR] 	at org.jboss.aop.pointcut.ast.PointcutExpressionParser.jj_consume_token(PointcutExpressionParser.java:3122)
  | 12:55:27,328 ERROR [STDERR] 	at org.jboss.aop.pointcut.ast.PointcutExpressionParser.Start(PointcutExpressionParser.java:28)
  | 12:55:27,328 ERROR [STDERR] 	at org.jboss.aop.pointcut.PointcutExpression.<init>(PointcutExpression.java:61)
Can anyone please point out to me what I have wrong? A million thanks!
Jamie

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050556#4050556

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050556



More information about the jboss-user mailing list