4 Replies Latest reply on May 19, 2009 2:28 PM by Mohamed Mansour

    URGENT! java.lang.IllegalStateException: Failed to find meth

    jon strauss Newbie

      2 methods/1 bean. 1st method works, 2nd method (almost identical)doesnt - see error. I've read a bit about this in a few postings - something to do with deploying an old bean with a new client etc. But my new bean is deployed fine, my client (JDeveloper) picks up the 2nd method but fails with huge stack trace at run time. Any ideas anybody? Appreciated in advance....Jon

        • 1. Re: URGENT! java.lang.IllegalStateException: Failed to find
          Ulf Schroeter Novice

          Provide more information about the actual error message (seems to be missing within your post).

          Regards
          Ulf

          • 2. Re: URGENT! java.lang.IllegalStateException: Failed to find
            jon strauss Newbie

            Sorry - here's the trace. At this point, the first method has executed fine. When the 2nd method is invoked - this is the stack trace. There's nothing wrong with the 2 method. For debugging, i've just println'ing but i still can't get round the following error. Thanks a lot....

            java.lang.IllegalStateException: Failed to find method for hash:4710285929788362163
            at org.jboss.invocation.MarshalledInvocation.getMethod(MarshalledInvocation.java:367)
            at org.jboss.ejb.Container.invoke(Container.java:854)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
            at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
            at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
            at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
            at sun.rmi.transport.Transport$1.run(Transport.java:153)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            at java.lang.Thread.run(Thread.java:595)
            at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
            at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
            at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
            at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
            at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
            at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
            at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
            at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
            at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
            at $Proxy1.dontsayhello(Unknown Source)
            at mypackage.HelloClient.main(HelloClient.java:27)
            Debugger disconnected from local process.
            Process exited.

            • 3. Re: URGENT! java.lang.IllegalStateException: Failed to find
              hani tmac Newbie

              I've the same problem but i've fixed it.
              i'm working with JBOSS 4.0.
              personaly in my pc IIS services was running, and that was the problem, so i've stopped it : start -> configuration pannel -> administration tools -> services -> stop IIS
              after that it works!! when I started the client

              my client code :

              public static void main(String[] args) {
              String str = "This is the string being counted in the EJB.";
              Hashtable environment = new Hashtable();
              
              environment.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
              
              environment.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
              
              environment.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
              
              Ccount cc = null;
               try {
               CcountHome home = CcountUtil.getHome(environment);
               cc = home.create();
               System.out.println(str);
               System.out.println(" Upper case: " + cc.upper(str));
               System.out.println(" Lower case: " + cc.lower(str));
               System.out.println(" Spaces: " + cc.spaces(str));
               System.out.println(" Total: " + cc.characters(str));
              
               } catch (Exception e) {
              
               e.printStackTrace();
              
               }
              
              
              
              
               }


              • 4. Re: URGENT! java.lang.IllegalStateException: Failed to find
                Mohamed Mansour Newbie

                Since your using JBoss 4.0, where is your lookup and narrow?

                
                Object ref = myContext.lookup("CcountEJB");
                CcountHome home = (CcountHome) PortableRemoteObject.narrow(ref, CcountHome.class);
                Ccount cc = home.create();
                System.out.println(" Upper case: " + cc.upper(str));
                System.out.println(" Lower case: " + cc.lower(str));
                System.out.println(" Spaces: " + cc.spaces(str));
                System.out.println(" Total: " + cc.characters(str));
                


                Unless CcountUtil properly gets the home.

                @strauss_jon: Make sure you lookup the correct ejb, and narrow the correct home. Make sure your bean is the one that is creating. That is if your using JBoss 4.

                What application server are you using ? Show us some code (basic to the point) telling us what you are doing.