2 Replies Latest reply on Oct 24, 2001 5:37 PM by ibruell

    Invoke a method from a Session EJB

    thatone

      I am trying to Invoke a method from an Session EJB, The method I want to Invoke is in a package. SO I had imported the package in the Bean file. Now I am getting the error, saying that class is not found.

      Is it possible to invoke the method which is in a different package like above or not.

      Please Reply

        • 1. Re: Invoke a method from a Session EJB
          thatone

          This is the error message that I get when i try to execute the EJB from a client. I am trying to invoke T1Resource bundle from an EJB (com/thatone/jconnector/T1ResourceBundle).

          java.rmi.ServerException: RemoteException occurred in server thread; nested exce
          ption is:
          java.rmi.ServerError: Transaction rolled back; nested exception is:
          java.lang.NoClassDefFoundError: com/thatone/jconnector/T1ResourceBundle
          at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:287)
          at sun.rmi.transport.Transport$1.run(Transport.java:151)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Transport.java:147)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
          63)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
          .java:704)
          at java.lang.Thread.run(Thread.java:539)
          at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
          RemoteCall.java:250)
          at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
          226)
          at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:136)
          at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Un
          known Source)
          at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(Ge
          nericProxy.java:357)
          at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(St
          atelessSessionProxy.java:123)
          at $Proxy1.processBusinessEntity(Unknown Source)
          at com.thatone.oraclepackage.TransactionClient.main(TransactionClient.ja
          va:46)
          Caused by: java.rmi.ServerError: Transaction rolled back; nested exception is:
          java.lang.NoClassDefFoundError: com/thatone/jconnector/T1ResourceBundle
          at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:3
          15)
          at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
          elessSessionInstanceInterceptor.java:87)
          at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
          java:128)
          at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
          at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContai
          ner.java:286)
          at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPCon
          tainerInvoker.java:395)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:42)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
          sorImpl.java:28)
          at java.lang.reflect.Method.invoke(Method.java:313)
          at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:256)
          at sun.rmi.transport.Transport$1.run(Transport.java:151)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Transport.java:147)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
          63)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
          .java:704)
          at java.lang.Thread.run(Thread.java:539)
          Caused by: java.lang.NoClassDefFoundError: com/thatone/jconnector/T1ResourceBundle at com.xxxx.xxpackage.TransactionBean.processBusinessEntity(TransactionBean.java:159)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:42)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
          sorImpl.java:28)
          at java.lang.reflect.Method.invoke(Method.java:313)
          at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
          tatelessSessionContainer.java:543)
          at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:2
          76)
          ... 16 more

          • 2. Re: Invoke a method from a Session EJB

            Where you have put the jar file with the class you use ?
            Put in $JBOSS_HOME/lib/ext

            and it should work