4 Replies Latest reply on May 18, 2009 6:06 PM by tmac42

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

    jeffersonmagno

      Hello,

      I'm facing the Exception below, trying to invoke a business method of an EJB from a GUI client. I have others session and entity beans working fine, but I don't know what is happening to that. Can someone help me? It's urgent!

      Thks

      Jefferson Magno

      java.lang.IllegalStateException: Failed to find method for hash:7198364041449999630
      at org.jboss.invocation.MarshalledInvocation.getMethod(MarshalledInvocation.java:367)
      at org.jboss.ejb.Container.invoke(Container.java:722)
      at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
      at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      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:534)
      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:133)
      at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
      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:53)
      at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:104)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy21.criarDiagnosticoVeiculo(Unknown Source)
      at com.oktiva.vessel.facades.BizGerenciarOficinas.criarDiagnosticoVeiculo(BizGerenciarOficinas.java:61)
      at com.oktiva.vessel.cliente.gui.oficinas.DiagnosticoVeiculo$3.run(DiagnosticoVeiculo.java:551)

        • 1. Re: URGENT! java.lang.IllegalStateException: Failed to find
          frintrop

          hi.

          check your ejb -jar and client jar. is there an old jar in the classpath ?
          you can get an error if server and client uses different class files.

          • 2. Re: URGENT! java.lang.IllegalStateException: Failed to find
            jeffersonmagno

            Thks for the help Frintrop,

            I had two archives (one .ear and other .war) deployed containing diferent versions of the same jar.

            With your help, I solved the problem.

            Jefferson Magno

            • 3. Re: URGENT! java.lang.IllegalStateException: Failed to find
              raghava

              hi ,
              Iam facing problem with stauful session Bean.

              i have 2 create methods one accepts a parameteter userName
              and other with no parameter

              public void ejbCreate(String userName) throws CreateException {

              }

              public void ejbCreate( ) throws CreateException {

              }


              now from the client after doing look up of bean when call create by passing parameter as username iam getting the follwong exception :
              Failed to find method for hash:1220513093520552417
              java.lang.IllegalStateException: Failed to find method for hash:1220513093520552417
              at org.jboss.invocation.MarshalledInvocation.getMethod(MarshalledInvocation.java:367)
              at org.jboss.ejb.Container.invoke(Container.java:889)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              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.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
              at sun.rmi.transport.Transport$1.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.rmi.transport.Transport.serviceCall(Unknown Source)
              at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
              at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
              at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
              at sun.rmi.server.UnicastRef.invoke(Unknown Source)
              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.invokeInvoker(InvokerInterceptor.java:163)
              at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
              at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
              at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
              at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
              at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
              at $Proxy0.create(Unknown Source)

              But iam not facing the problem in creating the bean with no param.
              What could be the problem. Iam using jboss-4.0.1sp1. Please help me out this situtation

              thanks
              Raghava

              • 4. Re: URGENT! java.lang.IllegalStateException: Failed to find
                tmac42

                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();
                
                 }
                
                
                
                
                 }