Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-5347

javax.naming.Context.list("java:module") failed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 7.1.1.Final
    • Naming
    • None

      In a simple web app with ejb packaged in, invoke InitialContext.list("java:module") within a servlet service method failed with the following exception:

      23:26:18,642 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/test].[test.TestServlet]] (http-/127.0.0.1:8080-1) Servlet.service() for servlet test.TestServlet threw exception: java.lang.RuntimeException: javax.naming.NamingException: JBAS014558: No EjbContext available as no EJB invocation is active [Root exception is java.lang.IllegalStateException: JBAS014558: No EjbContext available as no EJB invocation is active]
      	at test.NamingTest.list(NamingTest.java:53) [classes:]
      	at test.TestServlet.doListing(TestServlet.java:28) [classes:]
      	at test.TestServlet.processRequest(TestServlet.java:22) [classes:]
      	at test.TestServlet.doGet(TestServlet.java:44) [classes:]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.16.Final.jar:]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.16.Final.jar:]
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.16.Final.jar:]
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.16.Final.jar:]
      	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:156) [jboss-as-web-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final.jar:]
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final.jar:]
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final.jar:]
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final.jar:]
      	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final.jar:]
      	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final.jar:]
      	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final.jar:]
      	at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_33]
      Caused by: javax.naming.NamingException: JBAS014558: No EjbContext available as no EJB invocation is active [Root exception is java.lang.IllegalStateException: JBAS014558: No EjbContext available as no EJB invocation is active]
      	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:135)
      	at org.jboss.as.naming.ServiceBasedNamingStore.list(ServiceBasedNamingStore.java:166)
      	at org.jboss.as.naming.NamingContext.list(NamingContext.java:288)
      	at org.jboss.as.naming.InitialContext.list(InitialContext.java:161)
      	at org.jboss.as.naming.NamingContext.list(NamingContext.java:304)
      	at javax.naming.InitialContext.list(InitialContext.java:436) [classes.jar:1.6.0_33]
      	at test.NamingTest.list(NamingTest.java:51) [classes:]
      	... 18 more
      Caused by: java.lang.IllegalStateException: JBAS014558: No EjbContext available as no EJB invocation is active
      	at org.jboss.as.ejb3.context.CurrentInvocationContext.getEjbContext(CurrentInvocationContext.java:48) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
      	at org.jboss.as.ejb3.deployment.processors.EjbContextJndiBindingProcessor$1.getInstance(EjbContextJndiBindingProcessor.java:120) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
      	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:133)
      	... 24 more
      

              emartins@redhat.com Eduardo Martins
              cfang@redhat.com Cheng Fang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: