Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: [NEWSDELIVER] Getting VerifyError with around advice on static method


Barry,

1. info AspectJ Weaver Version 1.5.0 built on Tuesday Dec 20, 2005 at 12:05:54 GMT
Thanks
2. No, I'm using regular aspectj syntax. Both the method and aspect are included in the message below.

Of course, sorry.

I can reproduce your problem if:
1. I build my aspect with -XnoWeave. DON'T. If you get warning turn them off with -Xlint.
2. I exclude my aspect from weaving in aop.xml with "<exclude within=...". Not the best approach. Use a pointcut instead.

Cheers

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx

http://w3.hursley.ibm.com/~websterm/

To:        Matthew Webster/UK/IBM@IBMGB
cc:        
Subject:        Re: [NEWSDELIVER] Getting VerifyError with around advice on static method


1. info AspectJ Weaver Version 1.5.0 built on Tuesday Dec 20, 2005 at 12:05:54 GMT
2. No, I'm using regular aspectj syntax. Both the method and aspect are included in the message below.

I have subscribed to the aspect-user mailing list and will use that from now on. Thanks for the tip.

-barry

Matthew Webster wrote:


Barry,


Can I strongly suggest you post to aspectj-users which will bring you discussion to a wider audience.


Can you answer 2 questions WRT your problem:

1. Which version of AspectJ 5 are you using (the LTW log should contain this information on the first line)?

2. Are you using @AspectJ syntax and if so could you post the aspect and the method you are advising?


Cheers


Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB,
matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/

To:        undisclosed-recipients:;
cc:        
Subject:        
[NEWSDELIVER] Getting VerifyError with around advice on static method



I am trying to place around advice on a static method:

public class Transactions {
 public static UserTransaction getUserTransaction() throws NamingException
 {
    return (UserTransaction)
NamingHelper.getInitialContext().lookup(USER_TRANSACTION_NAME);
 }
 ...
}

With:

public aspect SeamTransactionsSpringAdapterAspect {
 
  private UserTransaction userTransaction;
 
  public void setUserTransaction(UserTransaction userTransaction) {
      this.userTransaction = userTransaction;
  }

  pointcut getUserTransaction() : execution(static UserTransaction
Transactions.getUserTransaction());
 
  UserTransaction around(): getUserTransaction() {
      System.err.println("*****
SeamTransactionSpringAdapterAspect.getUserTransaction *****");
      return userTransaction;
  }
}


And am getting:

info weaving 'org/jboss/seam/util/Transactions'
weaveinfo Join point 'method-execution(javax.transaction.UserTransaction
org.jboss.seam.util.Transactions.getUserTransaction())' in Type
'org.jboss.seam.util.Transactions' (Transactions.java:32) advised by
around advice from
'org.opentrader.infra.seam.SeamTransactionsSpringAdapterAspect'
(SeamTransactionsSpringAdapterAspect.aj:21)
info generating class 'org.jboss.seam.util.Transactions$AjcClosure1'
18:51:28,828
ERROR-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/fn-foliofn-ui].[Faces
Servlet] - Servlet.service() for servlet Faces Servlet threw exception
[][http-8080-Processor24][org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/fn-foliofn-ui].[Faces
Servlet]]
java.lang.VerifyError: (class:
org/opentrader/infra/seam/SeamTransactionsSpringAdapterAspect, method:
<clinit> signature: ()V) Stack size too large
  at
org.jboss.seam.util.Transactions.getUserTransaction(Transactions.java:1)
  at
org.jboss.seam.util.Transactions.isTransactionActive(Transactions.java:21)
  at
org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.begin(SeamExtendedManagedPersistencePhaseListener.java:58)
  at
org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.beforePhase(SeamExtendedManagedPersistencePhaseListener.java:33)
  at
org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersBefore(LifecycleImpl.java:520)
  at
org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:105)
  at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  at
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
  at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  at java.lang.Thread.run(Thread.java:595)




Back to the top