2 Replies Latest reply on Nov 9, 2005 3:34 PM by myawn

    NoSuchMethodError on org.jboss.aop.joinpoint.MethodInvocatio

    myawn

      (Sorry about duplication -- moving this to a different thread, and updating, because the original title about deployment problems was no longer
      accurate)

      I'm making progress, but not quite there yet.

      I've gotten my deploy directories straightened out so that the EJBStandaloneDeployer finds my bean classes, either with a scanclasspath() (convenient but not fast enough) or by specifying the directories directly. And the JNDI lookups are working in either case.

      But I can't invoke a business method of the bean without getting the following error:

      
      Exception in thread "main" java.lang.NoSuchMethodError: org.jboss.aop.joinpoint.MethodInvocation.<init>(Lorg/jboss/aop/MethodInfo;[Lorg/jboss/aop/advice/Interceptor;)V
       at org.jboss.ejb3.EJBContainerInvocation.<init>(EJBContainerInvocation.java:28)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:143)
       at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:60)
       at $Proxy17.create(Unknown Source)
       at com.kenai.examine.wsdl.EJB30Main.main(EJB30Main.java:84)
      
      



      I found a few threads that mentioned this error message, but they were in a client/server configuration, not embedded, and it appears the issue was resolved by adding one or more client-side directories to the server classpath. I don't think that's my problem here; the class org.jboss.aop.joinpoint.MethodInvocation is in jboss-aop-jdk50.jar, and I've verified that that library is on my run-time classpath. (I didn't go so far as to try to verify that there is a constructor with the specified signature in that class, so I suppose it's possible that I have a class version problem -- but since all the jar files came from the same distribution, that seems unlikely)

      My runtime classpath includes all .jar files found in \jboss-EJB-3.0_Embeddable_ALPHA_3\lib, plus the \conf directory. Is anything else needed?

      UPDATE:

      I tried browsing the source code online. I'm not sure I looked at the right place, because I don't claim to understand the whole branching scheme -- but in the error above, it looks like the MethodInvocation constructor we're trying to call takes a MethodInfo class and an array of Interceptors. But the code I was looking at online expectes a MethodJoinPoint class and an array of Interceptors. This would certainly explain the problem, if indeed I was looking at the correct source.

      The revision online was 1.33 (and the change from MethodInfo to MethodJoinPoint appears to have been introduced in 1.31) -- is the version of this class in the Embeddable-Alpha3 build >= 1.31?

      Mike

        • 1. Re: NoSuchMethodError on org.jboss.aop.joinpoint.MethodInvoc
          bill.burke

          not sure what libs u are using. AOP should come with the embeddable distribution. Do the tutorial examples work? If so, (they should), then u probably have an old version of AOP in your classpath.

          BTW, the embeddable stuff is taken directly from JBoss CVS head so the AOP version will be different than what's in JBoss 4 or even the core EJB3 dist.

          • 2. Re: NoSuchMethodError on org.jboss.aop.joinpoint.MethodInvoc
            myawn

            I'm not sure exactly what caused the conflict, but when I moved the JBoss libraries to the start of my classpath (they had been at the end), the NoSuchMethodError disappeared.

            Now the failure comes on the EntityManager.persist() call:

            Exception in thread "main" javax.ejb.EJBException: null; CausedByException is:
             detached entity passed to persist: com.kenai.examine.wsdl.WSDL
             at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:46)
             at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:70)
             at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:89)
            


            I saw this mentioned on another thread, which also involved running directly from Eclipse (not packaged in a jar file). Has anybody gotten the embedded persistence to work directly in an IDE environment (without going through the packaging step?)

            Mike