5 Replies Latest reply on Jan 9, 2007 11:37 AM by cao chen

    java.lang.RuntimeException: java.lang.NoSuchMethodException:

    Jugs VN Newbie

      Hi All,

      I am trying to use jBoss AOP cache in my application and I am using AOP pre-compiler to precompile my POJO which is used for session replication. I was successfull in deploying the application in Windows, but when I tried deploying it in Unix, I am getting an exception when trying to create an instance of the POJO whose byte code was weaved at compile time. I am running jBoss 4.0.5 and JDK 1.5.0_07-b03. I am stuck here and any help would be greatly appreciated!

      Please find below the stack trace


      at com.users.impl.UserSystemImpl.getUser(UserSystemImpl.java:204)
      at com.users.impl.UserSystemImpl.validateAPIKey(UserSystemImpl.java:672)
      at com.api.security.AuthenticationRestlet.handle(AuthenticationRestlet.java:106)
      at com.impl.RestletTarget.handle(RestletTarget.java:170)
      at com.impl.MapletImpl.delegate(MapletImpl.java:212)
      at com.impl.MapletImpl.handle(MapletImpl.java:162)
      at org.restlet.component.RestletContainer.handle(RestletContainer.java:220)
      at com.impl.RestletTarget.handle(RestletTarget.java:170)
      at com.impl.MapletImpl.delegate(MapletImpl.java:212)
      at com.impl.MapletImpl.handle(MapletImpl.java:162)
      at org.restlet.component.RestletContainer.handle(RestletContainer.java:220)
      at com.api.support.RestTarget.handle(RestTarget.java:71)
      at com.api.ServerServlet.handle(ServerServlet.java:403)
      at com.api.ServerServlet.handle(ServerServlet.java:388)
      at com.api.ServerServlet.service(ServerServlet.java:204)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:87)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      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:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: addObserver
      at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:250)
      at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:459)
      at com.users.impl.UserImpl.(UserImpl.java)
      ... 36 more
      Caused by: java.lang.NoSuchMethodException: addObserver
      at org.jboss.aop.ClassAdvisor.getMethod(ClassAdvisor.java:261)
      at org.jboss.aop.ClassAdvisor.getMethod(ClassAdvisor.java:269)
      at org.jboss.aop.ClassAdvisor.populateMixinMethods(ClassAdvisor.java:332)
      at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:228)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:209)

      Thanks
      Jugs

        • 1. Re: java.lang.RuntimeException: java.lang.NoSuchMethodExcept
          Ben Wang Master

          Can you double check your classpath. Or specifically sometimes two different versions of jboss-cache.jar?

          And you have same vm for Windows and Unix?

          • 2. Re: java.lang.RuntimeException: java.lang.NoSuchMethodExcept
            Jugs VN Newbie

            Hi Ben,

            Thanks for the reply.

            I am using jboss-cache-jdk50.jar and I am attaching the MANIFEST below

            Manifest-Version: 1.0
            Ant-Version: Apache Ant 1.6.2
            Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
            Built-By: rrajasekaran
            Created-On: August 11 2006
            Main-Class: org.jboss.cache.Version
            Specification-Title: JBossCache
            Specification-Version: 1.4.0.SP1
            Specification-Vendor: JBoss Inc.
            Implementation-Title: JBossCache
            Implementation-Version: 1.4.0.SP1
            Implementation-Vendor: JBoss Inc.

            Default jBoss installation has a jboss-aop.deployer folder where there is a acopy jboss-aop.jar and I am using jboss-aop-jdk50.jar.

            As for the JVM, windows version is jre1.5.0_06 and Unix is build jre1.5.0_07-b03.

            Thanks
            Jugs

            • 3. Re: java.lang.RuntimeException: java.lang.NoSuchMethodExcept
              Ben Wang Master

              Can you also please double check your
              jboss-aop-jdk50.jar
              and
              jboss-aspect-library-jdk50.jar
              version from manifest?

              (Or if you are using jdk1.5, why don't you try the ejb3 bundle of which pre-compiled in JDK5?)

              • 4. Re: java.lang.RuntimeException: java.lang.NoSuchMethodExcept
                Jugs VN Newbie

                I am not using jboss-aspect-library-jdk50.jar in my project. However I understand that the problem is with AOP and so I checked out the latest AOP source from SVN and build it locally. Now I am using that jar and I found that 3 additional interceptions are defined somewhere in the unix deployment and the details are as below.

                1. public abstract void org.jboss.aspects.patterns.observable.Subject.addObserver(org.jboss.aspects.patterns.observable.Observer)

                2. public abstract void org.jboss.aspects.patterns.observable.Subject.removeObserver(org.jboss.aspects.patterns.observable.Observer)

                3. public abstract void org.jboss.aspects.patterns.observable.Subject.notifyObservers()

                The framework is unable to find the method definition and it throws an excpection to populateMixinMethods where it propogates to attachClass method in org.jboss.aop.ClassAdvisor and it is not caught anywhere.

                However I understand that the solution is to remove the additional interceptions as it is not available in Windows deployment and still it works fine. I am doing more research and will get back with more details and the exact problem.

                Thanks
                Jugs

                • 5. Re: java.lang.RuntimeException: java.lang.NoSuchMethodExcept
                  cao chen Newbie

                  Hi, jagadeeshvn. I met the same problem as you. But It's in Windows. pls view http://www.jboss.com/index.html?module=bb&op=viewtopic&t=98752
                  Could you tell me more detail about it.
                  Thx.