Announcement Announcement Module
Collapse
No announcement yet.
Server returns exception when I look up EJB for second time Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Server returns exception when I look up EJB for second time

    Hello Spring Board.

    I have a Tomcat and Spring MVC running on the frontend side while my EJBs are running on a JBoss AS 7.1.

    My (stateful) EJB class is not annotated as a singleton.

    Anyway, when I try to lookup two EJBs at the same time, I receive an exception message about a missing EJB receiver. I need to provide this EJB for dozens of users at the same time.

    First i thought this was an accessing related problem, but then I realized jboss is closing multiple connections, when I shutdown the tomcat server. So I think you can make multiple connections, but Spring can't handle multiple EJBs. ( Anyway...just a thought.)

    Is there anything I can do to avoid this error?

    This log shows a successfull jndi lookup (I call helloBean() in this case) and the exception after calling the lookup again.

    Code:
    WARN : org.jboss.ejb.client.remoting.ChannelAssociation - Unsupported message received with header 0xffffffff
    Looking EJB via JNDI
    hi there, I'm a bean!
    Looking EJB via JNDI
    WARN : org.jboss.ejb.client.remoting.ChannelAssociation - Unsupported message received with header 0xffffffff
    javax.naming.NamingException: Failed to create proxy [Root exception is java.lang.IllegalStateException: No EJB receiver available for handling [appName:recc_business_ear-ear,modulename:recc_business_ear-ejb,distinctname:] combination]
        at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:115)
        at org.jboss.ejb.client.naming.ejb.EjbNamingContext.lookup(EjbNamingContext.java:96)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at recc.frontend.controller.UserController.logIn(UserController.java:63)
        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.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.IllegalStateException: No EJB receiver available for handling [appName:recc_business_ear-ear,modulename:recc_business_ear-ejb,distinctname:] combination
        at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:517)
        at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:161)
        at org.jboss.ejb.client.naming.ejb.EjbNamingContext.doCreateProxy(EjbNamingContext.java:135)
        at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:113)
        ... 35 more


    When I shutdown the Tomcat and restart it, I can lookup the ejb again, without restarting the JBoss.

    JBoss is giving me this message, when I shut down the Tomcat:

    Code:
    15:07:07,436 INFO  [org.jboss.as.naming] (Remoting "goot_acer" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 33e234dd (inbound) of Remoting connection 18dc0e9b to /127.0.0.1:57933
    15:15:13,892 INFO  [org.jboss.as.naming] (Remoting "goot_acer" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 39f241ee (inbound) of Remoting connection 31360c30 to /127.0.0.1:57939
    20:50:00,877 ERROR [org.jboss.remoting.remote.connection] (Remoting "goot_acer" read-1) JBREM000200: Remote connection failed: java.io.IOException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen
    20:50:00,878 ERROR [org.jboss.remoting.remote.connection] (Remoting "goot_acer" read-1) JBREM000200: Remote connection failed: java.io.IOException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen
    20:50:00,879 INFO  [org.jboss.as.naming] (Remoting "goot_acer" task-4) JBAS011806: Channel end notification received, closing channel Channel ID 2c7127a9 (inbound) of Remoting connection 4f086115 to null
    20:50:00,880 INFO  [org.jboss.as.naming] (Remoting "goot_acer" task-1) JBAS011806: Channel end notification received, closing channel Channel ID 77f38359 (inbound) of Remoting connection 77f8a1af to null
    21:42:49,392 INFO  [org.jboss.as.naming] (Remoting "goot_acer" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 7e3f2867 (inbound) of Remoting connection 35de82e9 to null
    21:52:19,986 ERROR [org.jboss.remoting.remote.connection] (Remoting "goot_acer" read-1) JBREM000200: Remote connection failed: java.io.IOException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen
    21:52:19,991 ERROR [org.jboss.remoting.remote.connection] (Remoting "goot_acer" read-1) JBREM000200: Remote connection failed: java.io.IOException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen
    21:52:19,993 INFO  [org.jboss.as.naming] (Remoting "goot_acer" task-1) JBAS011806: Channel end notification received, closing channel Channel ID 15f38b65 (inbound) of Remoting connection 37b05625 to null
    21:52:19,996 INFO  [org.jboss.as.naming] (Remoting "goot_acer" task-4) JBAS011806: Channel end notification received, closing channel Channel ID 3f1c7ecc (inbound) of Remoting connection 5e5be8a3 to null
    Tomcat log during shutdown:
    Code:
    Sep 03, 2013 1:21:54 AM org.apache.catalina.core.ApplicationContext log
    INFO: Closing Spring root WebApplicationContext
    INFO : org.springframework.web.context.support.XmlWebApplicationContext - Closing Root WebApplicationContext: startup date [Tue Sep 03 01:19:07 CEST 2013]; root of context hierarchy
    INFO : org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@103d3d90: defining beans [localeResolver,localeChangeInterceptor,org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping#0,messageSource,viewResolver]; root of factory hierarchy
    I tried to make the EJB classes serializable but it didn't help.

    I tried to make the EJB stateless...didn't help (it wouldn't even lookup the ejb, but I gave up on debugging, because I need a stateful ejb anyway.)

    Any suggestions?

  • #2
    I hit this error a couple days back and haven't been able to recover. I tried a thousand solutions without luck. How did you solve it?

    Comment

    Working...
    X