1 2 Previous Next 16 Replies Latest reply on Mar 23, 2012 9:16 AM by alxt Branched from an earlier discussion.

    Remote EJB invocation failure for ear deployment

    berni02

      Hi,

      i am struggleing into the same exception:

      Caused by: java.lang.IllegalStateException: No EJB receiver available for handling [appName:QuestServer2G,modulename:QuestServerComponents,distinctname:] combination

        at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:236)

        at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:95)

        at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:86)

        at $Proxy0.login(Unknown Source)

        at de.cluetec.mQuest.base.QuestServerBD.login(QuestServerBD.java:330)

       

       

      But only in Standalone and with an EAR.

       

      Regards,

      Bernhard

        • 1. Re: Remote EJB invocation failure for ear deployment
          jaikiran

          Bernhard, I branched your discussion to a separate thread to avoid confusion in that other thread. Although the error message is similar, it might not mean the same issue since the other thread was very specifically discussing about multiple EJB receivers.

           

          As for your issue, please tell us more details about your application including the packaging of your EJBs on the server side, what JNDI names are printed out on the server console and what your client lookup code looks like. Also, post the contents of your jboss-ejb-client.properties (which should be available in the classpath of the client). If you have the client side logs, please post them too.

          • 2. Re: Remote EJB invocation failure for ear deployment
            berni02

            hi,

            thanks for your help. Here are the requested informations (The exceptions occurs during the first client method call on ejb-proxy):

             

             

            ear packing:

            MyApp.ear:

                 - LIB Folder

                   - EJB Interfaces JAR (used also in the client cp)

                 - ejb.jar (containing all the ejb impl)

             

             

            JNDI bindings for session bean named IQSSessionFacade in deployment unit subdeployment "MyAppComponents.jar" of deployment "MyApp.ear" are as follows:

                 java:global/MyApp/MyAppComponents/IQSSessionFacade!de.company.myApp.server.fassade.IQSSessionFacade

                 java:app/MyAppComponents/IQSSessionFacade!de.company.myApp.server.fassade.IQSSessionFacade

                 java:module/IQSSessionFacade!de.company.myApp.server.fassade.IQSSessionFacade

                 java:global/MyApp/MyAppComponents/IQSSessionFacade

                 java:app/MyAppComponents/IQSSessionFacade

                 java:module/IQSSessionFacade

             

             

            Lookup Code:

            Properties contextProperties = new Properties();

            // cust login module is not working at the moment - TODO

            contextProperties.put(Context.SECURITY_PRINCIPAL, loginData.getQSPrincipal());

            contextProperties.put(Context.SECURITY_CREDENTIALS, loginData.getPassword());

             

             

            contextProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");        

            jndiName = "ejb:MyApp/MyAppComponents//IQSSessionFacade!de.company.myApp.server.fassade.IQSSessionFacade";

            InitialContext ctx = new InitialContext(contextProperties);

            InitialContext ctx = new InitialContext(contextProperties);     

            IQSSessionFacade lookup = (IQSSessionFacade) ctx.lookup(jndiName);

             

             

            jboss-ejb-client.properties (as in the wiki):

            endpoint.name=client-endpoint

            remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

            remote.connections=default

            remote.connection.default.host=192.168.3.42

            remote.connection.default.port = 4447

            remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

             

             

             

             

            Thanks,

            Bernhard

            • 3. Re: Remote EJB invocation failure for ear deployment
              jaikiran

              The code and properties look fine. My guess is that you haven't placed the jboss-ejb-client.properties in the classpath of the client. How are you running the client? What command do you use and are you sure the jboss-ejb-client.properties is in the right place?

              • 4. Re: Remote EJB invocation failure for ear deployment
                berni02

                The jboss-ejb-client.properties are in the classpath. What do you mean by "What command do you use"`?

                • 5. Re: Remote EJB invocation failure for ear deployment
                  jaikiran

                  Bernhard Günter wrote:

                   

                  What do you mean by "What command do you use"`?

                  What command do you use to run the client application? Can you show us the command with the classpath listing to make sure it has the properties file in the classpath?

                  • 6. Re: Remote EJB invocation failure for ear deployment
                    prasad.deshpande

                    Another thing most easily to miss out is adding a security provider.. You need to have this on the class that is entry point for client application.

                     

                    static {

                         Security.addProvider(new JBossSaslProvider());

                    }

                    • 7. Re: Remote EJB invocation failure for ear deployment
                      berni02

                      I run the client out of eclipse. The builded classes folder conatins the jboss-ejb-client.properties file.

                      • 8. Re: Remote EJB invocation failure for ear deployment
                        prasad.deshpande

                        Having said that, is there any other way to add security provider, Jaikiran? so that I'll not have to modify the code?

                        • 9. Re: Remote EJB invocation failure for ear deployment
                          berni02

                          I added the security provider.

                          Waht does the error "No EJB receiver available for handling" mean while calling a ejb method?

                          May be I can find out more...

                          • 10. Re: Remote EJB invocation failure for ear deployment
                            jaikiran

                            Prasad Deshpande wrote:

                             

                            Having said that, is there any other way to add security provider, Jaikiran? so that I'll not have to modify the code?

                            There's some changes going on in the SASL project, so I'm waiting for it to be done before deciding how to improve this part.

                            • 11. Re: Remote EJB invocation failure for ear deployment
                              jaikiran

                              Bernhard Günter wrote:

                               

                              I added the security provider.

                              Waht does the error "No EJB receiver available for handling" mean while calling a ejb method?

                              May be I can find out more...

                              It means that the EJB receiver responsible for handling the EJB invocation with the server for a combination of appname/modulename/distinctname, isn't available.

                               

                              The reasons can be one of the following:

                               

                              1) The jboss-ejb-client.properties wasn't in the classpath and hence not picked up

                              2) The appname, modulename and distinctname that you are using isn't correct. From what you have posted in the exception stacktrace and the server side JNDI names, the app name and module name are not matching. Did you intentionally change that while posting here or is that the real issue?

                               

                              I'm assuming it's #1 what you are running into.

                               

                              I run the client out of eclipse. The builded classes folder conatins the jboss-ejb-client.properties file.

                              I'm not sure if that makes it available in the classpath. Do you see any logs on the client side, before the exception stacktrace? Can you post those logs?

                              • 12. Re: Remote EJB invocation failure for ear deployment
                                berni02

                                Yes I've changed the names. How can switch the logging for the ejb client libs on?

                                • 13. Re: Remote EJB invocation failure for ear deployment
                                  berni02

                                  Got the logs:

                                  2011-12-01 13:34:58,265 ms [AWT-EventQueue-0] DEBUG org.jboss.logging  - Logging Provider: org.jboss.logging.Log4jLoggerProvider

                                  2011-12-01 13:34:58,273 ms [AWT-EventQueue-0] INFO  org.jboss.ejb.client  - JBoss EJB Client version 1.0.0.Beta7

                                  2011-12-01 13:34:58,305 ms [AWT-EventQueue-0] DEBUG org.jboss.ejb.client.ConfigBasedEJBClientContextSelector  - Looking for jboss-ejb-client.properties using classloader sun.misc.Launcher$AppClassLoader@93dee9

                                  2011-12-01 13:34:58,305 ms [AWT-EventQueue-0] DEBUG org.jboss.ejb.client.ConfigBasedEJBClientContextSelector  - Found jboss-ejb-client.properties using classloader sun.misc.Launcher$AppClassLoader@93dee9

                                  2011-12-01 13:34:58,306 ms [AWT-EventQueue-0] DEBUG org.jboss.ejb.client.ConfigBasedEJBClientContextSelector  - remote.connection.default.connect.options. has the following options {org.xnio.Options.SASL_POLICY_NOANONYMOUS=>false}

                                  2011-12-01 13:34:58,307 ms [AWT-EventQueue-0] DEBUG org.jboss.ejb.client.ConfigBasedEJBClientContextSelector  - endpoint.create.options. has the following options {}

                                  2011-12-01 13:34:58,316 ms [AWT-EventQueue-0] INFO  org.xnio  - XNIO Version 3.0.0.CR4

                                  2011-12-01 13:34:58,319 ms [AWT-EventQueue-0] INFO  org.xnio.nio  - XNIO NIO Implementation Version 3.0.0.CR4

                                  2011-12-01 13:34:58,330 ms [AWT-EventQueue-0] INFO  org.jboss.remoting  - JBoss Remoting version 3.2.0.CR3

                                  2011-12-01 13:34:58,357 ms [Remoting "client-endpoint" read-1] DEBUG org.xnio.nio  - Started channel thread 'Remoting "client-endpoint" read-1', selector sun.nio.ch.WindowsSelectorImpl@1bb60ad

                                  2011-12-01 13:34:58,357 ms [Remoting "client-endpoint" write-1] DEBUG org.xnio.nio  - Started channel thread 'Remoting "client-endpoint" write-1', selector sun.nio.ch.WindowsSelectorImpl@147a16f

                                  2011-12-01 13:34:58,363 ms [AWT-EventQueue-0] DEBUG org.jboss.ejb.client.ConfigBasedEJBClientContextSelector  - remote.connectionprovider.create.options. has the following options {org.xnio.Options.SSL_ENABLED=>false}

                                  2011-12-01 13:34:59,397 ms [AWT-EventQueue-0] ERROR org.jboss.ejb.client.ConfigBasedEJBClientContextSelector  - Could not create connection for connection named default

                                  java.lang.RuntimeException: java.net.ConnectException: Connection refused: no further information

                                            at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:91)

                                            at org.jboss.ejb.client.ConfigBasedEJBClientContextSelector.createConnection(ConfigBasedEJBClientContextSelector.java:276)

                                            at org.jboss.ejb.client.ConfigBasedEJBClientContextSelector.createConnections(ConfigBasedEJBClientContextSelector.java:197)

                                            at org.jboss.ejb.client.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:126)

                                            at org.jboss.ejb.client.ConfigBasedEJBClientContextSelector.<init>(ConfigBasedEJBClientContextSelector.java:108)

                                            at org.jboss.ejb.client.ConfigBasedEJBClientContextSelector.<clinit>(ConfigBasedEJBClientContextSelector.java:98)

                                            at org.jboss.ejb.client.EJBClientContext.<clinit>(EJBClientContext.java:48)

                                            at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:94)

                                            at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:86)

                                            at $Proxy0.login(Unknown Source)

                                            at de.cluetec.mQuest.base.QuestServerBD.login(QuestServerBD.java:330)

                                            at de.cluetec.mQuest.questAdmin.actions.LoginAction.loginDataEntered(LoginAction.java:151)

                                            at de.cluetec.mQuest.questAdmin.gui.LoginSplash.loginButtonActionPerformed(LoginSplash.java:290)

                                            at de.cluetec.mQuest.questAdmin.gui.LoginSplash.access$2(LoginSplash.java:271)

                                            at de.cluetec.mQuest.questAdmin.gui.LoginSplash$3.actionPerformed(LoginSplash.java:202)

                                            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

                                            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

                                            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

                                            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

                                            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

                                            at java.awt.Component.processMouseEvent(Component.java:6267)

                                            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

                                            at java.awt.Component.processEvent(Component.java:6032)

                                            at java.awt.Container.processEvent(Container.java:2041)

                                            at java.awt.Component.dispatchEventImpl(Component.java:4630)

                                            at java.awt.Container.dispatchEventImpl(Container.java:2099)

                                            at java.awt.Component.dispatchEvent(Component.java:4460)

                                            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

                                            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

                                            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

                                            at java.awt.Container.dispatchEventImpl(Container.java:2085)

                                            at java.awt.Window.dispatchEventImpl(Window.java:2478)

                                            at java.awt.Component.dispatchEvent(Component.java:4460)

                                            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

                                            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

                                            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

                                            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)

                                            at java.awt.Dialog$1.run(Dialog.java:1046)

                                            at java.awt.Dialog$3.run(Dialog.java:1098)

                                            at java.security.AccessController.doPrivileged(Native Method)

                                            at java.awt.Dialog.show(Dialog.java:1096)

                                            at de.cluetec.mQuest.questAdmin.gui.LoginSplash.show(LoginSplash.java:361)

                                            at de.cluetec.mQuest.questAdmin.actions.LoginAction.doAction(LoginAction.java:81)

                                            at de.cluetec.mQuest.questAdmin.actions.LoginAction.loginIfNeeded(LoginAction.java:100)

                                            at de.cluetec.mQuest.questAdmin.actions.LoginAction.loginIfNeeded(LoginAction.java:90)

                                            at de.cluetec.mQuest.questAdmin.actions.AbstractQuestAdminServiceAction.doAction(AbstractQuestAdminServiceAction.java:68)

                                            at de.cluetec.mQuest.questAdmin.gui.menu.ResultsDownloadActionDesc.perform(ResultsDownloadActionDesc.java:75)

                                            at de.cluetec.core.gui.CXActionDescription.perform(Unknown Source)

                                            at de.cluetec.core.gui.CXToolBarButton.this_actionPerformed(Unknown Source)

                                            at de.cluetec.core.gui.CXToolBarButton$1.actionPerformed(Unknown Source)

                                            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

                                            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

                                            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

                                            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

                                            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

                                            at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

                                            at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

                                            at java.awt.Component.processMouseEvent(Component.java:6267)

                                            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

                                            at java.awt.Component.processEvent(Component.java:6032)

                                            at java.awt.Container.processEvent(Container.java:2041)

                                            at java.awt.Component.dispatchEventImpl(Component.java:4630)

                                            at java.awt.Container.dispatchEventImpl(Container.java:2099)

                                            at java.awt.Component.dispatchEvent(Component.java:4460)

                                            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

                                            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

                                            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

                                            at java.awt.Container.dispatchEventImpl(Container.java:2085)

                                            at java.awt.Window.dispatchEventImpl(Window.java:2478)

                                            at java.awt.Component.dispatchEvent(Component.java:4460)

                                            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

                                            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

                                            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

                                            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

                                            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

                                            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

                                            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

                                  Caused by: java.net.ConnectException: Connection refused: no further information

                                            at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

                                            at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)

                                            at org.xnio.nio.NioXnioWorker$1.handleEvent(NioXnioWorker.java:322)

                                            at org.xnio.nio.NioXnioWorker$1.handleEvent(NioXnioWorker.java:318)

                                            at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)

                                            at org.xnio.nio.NioHandle.run(NioHandle.java:90)

                                            at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)

                                            at ...asynchronous invocation...(Unknown Source)

                                            at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:263)

                                            at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:246)

                                            at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:353)

                                            at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:337)

                                            at org.jboss.ejb.client.ConfigBasedEJBClientContextSelector.createConnection(ConfigBasedEJBClientContextSelector.java:274)

                                            ... 75 more

                                  2011-12-01 13:34:59,401 ms [AWT-EventQueue-0] INFO  org.jboss.ejb.client.ConfigBasedEJBClientContextSelector  - Connection default will not be available in EJB client context org.jboss.ejb.client.EJBClientContext@1bb6a69

                                  2011-12-01 13:34:59,401 ms [AWT-EventQueue-0] DEBUG org.jboss.ejb.client.ConfigBasedEJBClientContextSelector  - Registered 0 remoting EJB receivers for EJB client context org.jboss.ejb.client.EJBClientContext@1bb6a69

                                  2011-12-01 13:34:59,408 ms [AWT-EventQueue-0] ERROR de.cluetec.cxcommons.elf.client.handler.SimpleDialogElfHandler  - Error delegated to handler

                                  [appName:QuestServer2G,modulename:QuestServerComponents,distinctname:] combination

                                            at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:236)

                                            at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:95)

                                            at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:86)

                                            at $Proxy0.login(Unknown Source)

                                            at de.cluetec.mQuest.base.QuestServerBD.login(QuestServerBD.java:330)

                                            at de.cluetec.mQuest.questAdmin.actions.LoginAction.loginDataEntered(LoginAction.java:151)

                                            at de.cluetec.mQuest.questAdmin.gui.LoginSplash.loginButtonActionPerformed(LoginSplash.java:290)

                                            at de.cluetec.mQuest.questAdmin.gui.LoginSplash.access$2(LoginSplash.java:271)

                                            at de.cluetec.mQuest.questAdmin.gui.LoginSplash$3.actionPerformed(LoginSplash.java:202)

                                            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

                                            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

                                            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

                                            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

                                            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

                                            at java.awt.Component.processMouseEvent(Component.java:6267)

                                            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

                                            at java.awt.Component.processEvent(Component.java:6032)

                                            at java.awt.Container.processEvent(Container.java:2041)

                                            at java.awt.Component.dispatchEventImpl(Component.java:4630)

                                            at java.awt.Container.dispatchEventImpl(Container.java:2099)

                                            at java.awt.Component.dispatchEvent(Component.java:4460)

                                            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

                                            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

                                            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

                                            at java.awt.Container.dispatchEventImpl(Container.java:2085)

                                            at java.awt.Window.dispatchEventImpl(Window.java:2478)

                                            at java.awt.Component.dispatchEvent(Component.java:4460)

                                            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

                                            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

                                            ... 42 more

                                  • 14. Re: Remote EJB invocation failure for ear deployment
                                    berni02

                                    Hi,

                                    found the solution - the problem was that the server binding didn't reacted to my local ip. Sorry for that. But the jboss tools server page 0.0.0.0 binding, was ignored by the boss.

                                    localhost is working for remoting at the moment.

                                    @jaikiran pai: Maybe you can help also on the other issue I have. The Principal I get out of the ejb eontext is always anonymous.

                                    Is it correct to set these values in the context properties and get it via the ejbcontext.getCallerPrinciple()?

                                    contextProperties.put(Context.SECURITY_PRINCIPAL, loginData.getQSPrincipal());

                                    contextProperties.put(Context.SECURITY_CREDENTIALS, loginData

                                     

                                    The problem occours on remote and local calls.

                                     

                                    Thanks,

                                    Bernhard

                                    1 2 Previous Next