JBoss 7.1.1.Final - EJB Remote Call - java.lang.IllegalStateException: No EJB receiver available for handling On Server restart
sanssan Feb 27, 2013 9:40 AMHi,
I do have 4 JBoss stanalone instances running at MyAPPServer01 and 4 instance running at MyWEBServer.
I have deployed application called quote.ear @ QTEInstance @ MyAPPServer01 and EJB Call from QTEInstance @ MyWEBServer.
SERVER:
Remote Interface
package com.xyz.life.common.component.ejb.services; import java.rmi.RemoteException; import javax.ejb.Remote; import javax.ejb.Stateless; @Stateless(mappedName = "QuoteFacadeEJB") @Remote(QuoteFacade.class) public class QuoteFacadeEJB extends CommonSessionBean implements QuoteFacade { private static final long serialVersionUID = -8788783322280644881L; @Override public boolean isAlive() throws RemoteException { return true; } }
server.log
16:40:25,012 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-4) JNDI bindings for session bean named QuoteFacadeEJB in deployment unit subdeployment "quote.jar" of deployment "quote.ear" are as follows:
java:global/quote/quote.jar/QuoteFacadeEJB!com.xyz.life.service.ejb.QuoteFacade
java:app/quote.jar/QuoteFacadeEJB!com.xyz.life.service.ejb.QuoteFacade
java:module/QuoteFacadeEJB!com.xyz.life.service.ejb.QuoteFacade
java:jboss/exported/quote/quote.jar/QuoteFacadeEJB!com.xyz.life.service.ejb.QuoteFacade
java:global/quote/quote.jar/QuoteFacadeEJB
java:app/quote.jar/QuoteFacadeEJB
java:module/QuoteFacadeEJB
Client
public void testClient() {
try {
Hashtable<String, Object> jndiProps = new Hashtable<String, Object>();
jndiProps.put(Context.URL_PKG_PREFIXES, JNDINames.JBOSS_CLIENT_NAMING_PREFIX);
jndiProps.put("jboss.naming.client.ejb.context", true);
Context ctx = new InitialContext(jndiProps);
String name = "ejb:quote/quote.jar//QuoteFacadeEJB!com.xyz.life.annuity.service.ejb.QuoteFacade";
Object ref = ctx.lookup(name);
QuoteFacade quoteFacade = (QuoteFacade) ref;
LOGGER.debug("isAlive : " + quoteFacade.isAlive());
} catch (Exception e) {
LOGGER.error("Remote Client Exception : ", e);
}
}
jboss-ejb-client.xml
<jboss-ejb-client xmlns="urn:jboss:ejb-client:1.0">
<client-context>
<ejb-receivers>
<remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>
</ejb-receivers>
</client-context>
</jboss-ejb-client>
standalone.xml
<management>
MyAPPServer0
<security-realms>
.............
<security-realm name="ejb-security-realm">
<server-identities>
<secret value="dGVzdA=="/>
</server-identities>
</security-realm>
</security-realms>
.............
</management>
.............
<profile>
.............
<subsystem xmlns="urn:jboss:domain:ejb3:1.2">
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
</stateless>
<stateful default-access-timeout="5000" cache-ref="simple"/>
<singleton default-access-timeout="5000"/>
</session-bean>
<mdb>
<resource-adapter-ref resource-adapter-name="hornetq-ra"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
<pools>
<bean-instance-pools>
<strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
<strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
</bean-instance-pools>
</pools>
<caches>
<cache name="simple" aliases="NoPassivationCache"/>
<cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
</caches>
<passivation-stores>
<file-passivation-store name="file"/>
</passivation-stores>
<async thread-pool-name="default"/>
<timer-service thread-pool-name="default">
<data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
</timer-service>
<remote connector-ref="remoting-connector" thread-pool-name="default"/>
<thread-pools>
<thread-pool name="default">
<max-threads count="10"/>
<keepalive-time time="100" unit="milliseconds"/>
</thread-pool>
</thread-pools>
</subsystem>
.............
<subsystem xmlns="urn:jboss:domain:remoting:1.1">
<connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
<outbound-connections>
<remote-outbound-connection name="remote-ejb-connection" outbound-socket-binding-ref="remote-ejb" username="ejbuser" security-realm="ejb-security-realm">
<properties>
<property name="SASL_POLICY_NOANONYMOUS" value="false"/>
<property name="SSL_ENABLED" value="false"/>
</properties>
</remote-outbound-connection>
</outbound-connections>
</subsystem>
.............
</profile>
.............
<socket-binding-group name="standard-sockets" default-interface="any" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:6992}"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9988}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9446}"/>
<socket-binding name="ajp" port="8012"/> <socket-binding name="https" port="8446"/>
<socket-binding name="osgi-http" interface="management" port="8192"/>
<socket-binding name="remoting" port="4453"/>
<socket-binding name="txn-recovery-environment" port="4737"/>
<socket-binding name="txn-status-manager" port="4727"/>
<socket-binding name="messaging" port="5445"/>
<socket-binding name="messaging-throughput" port="5455"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
<outbound-socket-binding name="remote-ejb">
<remote-destination host="" port="4451"/>
</outbound-socket-binding>
</socket-binding-group>
The same Service is working on below scenario:
EJB Server : QTEInstance @ MyAPPServer01
EJB Client : IFAInstance @ MyAPPServer01, Yes on the same server.
The same Service is not working on below scenario:
EJB Server : QTEInstance @ MyAPPServer01
EJB Client : QTEInstance @ MyWEBServer01, Yes on the Difference server.
But, it is failing when from Other server. it was working well earlier. After couple of restarts, it started failing with
27.02.2013 13:00:34.259 [ERROR] - [FrameworkManager ] - Quote EJB Service not available : java.lang.IllegalStateException: No EJB receiver available for handling [appName:quote,modulename:quote.jar,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@65f994f2 at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584) at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119) at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) at $Proxy10.isAlive(Unknown Source)
Node names are Unique on APP server (EJB Server) and WEB Server (EJB Clients).
any idea? Still, i am wondering, how it was working ealier and why it is not now? Please help me.
Any more infomation, i would be happy to post.