[jboss-user] [JBoss AOP] - Re: NullPointerException at advised._getInstanceAdvisor();

robotics80 do-not-reply at jboss.com
Fri Dec 15 05:12:14 EST 2006


I rewrite the jboss-aop.xml file because I failed to insert its code:

<!-- Declaring pointcuts -->
  |     <pointcut name="allPublicMethod"
  |         expr="execution(public * it.pitagora.sqtp.server.aicagw.fastdeferred.FileFinder->*(..))"/>
  |     <pointcut name="mainMethod"
  |         expr="execution(void it.pitagora.sqtp.server.aicagw.fastdeferred.FileFinder->main(..))"/>
  |     <pointcut name="constructorPointcut"
  |         expr="execution(it.pitagora.sqtp.server.aicagw.fastdeferred.FileFinder->new(..))"/>
  |     <pointcut name="logObject" expr="set(it.pitagora.util.log.Log it.pitagora.sqtp.server.aicagw.fastdeferred.FileFinder->*)"/>     
  |     
  |            
  |     <!-- Declaring Aspects -->
  |     <aspect name="logAspect" class="aop.batch.interceptor.LogAspect" scope="PER_INSTANCE">
  |         <attribute name="PropertyFile">aicagw.properties</attribute>
  |     </aspect>
  | 
  | 
  |     <!-- Binding pointcuts to Interceptors 
  |     <bind pointcut="(allPublicMethod OR constructorPointcut) AND !mainMethod">
  |         <interceptor-ref name="logInterceptor"/>
  |     </bind>
  |     -->
  | 
  |     <!-- Binding pointcuts to Aspects -->
  |     <bind pointcut="logObject">
  |         <advice name="getLogger" aspect="logAspect"/>
  |     </bind> 
  |      
  |     <bind pointcut="(allPublicMethod OR constructorPointcut) AND !mainMethod">
  |         <advice name="trace" aspect="logAspect"/>
  |     </bind>


The error happens when I declare a pointcut expression like this:

  |     <pointcut name="prova" expr="call(public it.pitagora.util.log.Log->new(..)) AND within(it.pitagora.sqtp.server.aicagw.fastdeferred.FileFinder)"/>

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

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



More information about the jboss-user mailing list