2 Replies Latest reply on Jan 7, 2014 1:43 AM by jaikiran

    No EjbContext available as no EJB invocation is active

    p_gp4342

      Hi to All

       

      i am migrating my seam 2.1.2 application from jboss 4.2.2 to jboss 7.1.1 application server .It is working fine with Oracle 10g, but it is giving below error with oracle 11g .Please assist .

       

      Caused by: javax.naming.NamingException: JBAS014558: No EjbContext available as no EJB invocation is active [Root exception is java.lang.IllegalStateException: JBAS01455

      8: 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.lookup(ServiceBasedNamingStore.java:74)

              at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)

              at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:123)

              at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)

              at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_37]

              at org.jboss.seam.util.EJB.getEJBContext(EJB.java:89) [jboss-seam.jar:2.1.2]

              at org.jboss.seam.transaction.Transaction.createCMTTransaction(Transaction.java:69) [jboss-seam.jar:2.1.2]

              at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:53) [jboss-seam.jar:2.1.2]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_37]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_37]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_37]

              at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_37]

              at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.1.2]

              at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:2.1.2]

              ... 40 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.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.ejb3.deployment.processors.EjbContextJndiBindingProcessor$1.getInstance(EjbContextJndiBindingProcessor.java:120) [jboss-as-ejb3-7.1.1.Final.jar:7

      .1.1.Final]

              at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:133)

              ... 54 more

       

       

      10:21:13,087 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-8) Initializing Mojarra (1.2_15.jbossorg-1-20111019-SNAPSHOT) for context ''

       

       

      10:21:13,566 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-8) JSF1051: Service entry 'org.jboss.as.web.deployment.jsf.JsfInjectio

      nProvider' does not extend DiscoverableInjectionProvider.  Entry will be ignored.

      10:21:13,569 INFO  [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-8) JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans

      methods marked with these annotations will have said annotations processed.

      10:21:13,884 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-8) Error listenerStart

      10:21:13,885 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-8) Context [] startup failed due to previous errors

      10:21:13,887 INFO  [org.hibernate.impl.SessionFactoryImpl] (MSC service thread 1-8) closing

      10:21:13,888 INFO  [org.hibernate.impl.SessionFactoryImpl] (MSC service thread 1-8) closing

      10:21:13,889 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-8) Scheduler Sched1_$_1 shutting down.

      10:21:13,890 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-8) Scheduler Sched1_$_1 paused.

      10:21:13,893 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-8) Scheduler Sched1_$_1 shutdown complete.

      10:21:13,902 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.web.deployment.default-host./: org.jboss.msc.service.Sta

      rtException in service jboss.web.deployment.default-host./: JBAS018040: Failed to start context

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_37]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_37]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]

       

       

      Thanks in advance

        • 1. Re: No EjbContext available as no EJB invocation is active
          wdfink

          Are you sure that you only change the database version?

          For me it looks more that there are some EJB configuration missed, maybe loaded from the DB.

           

          What you have changed, could you step back and check when it run correct?

          • 2. Re: No EjbContext available as no EJB invocation is active
            jaikiran

                  at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_37]

                    at org.jboss.seam.util.EJB.getEJBContext(EJB.java:89) [jboss-seam.jar:2.1.2]

                    at org.jboss.seam.transaction.Transaction.createCMTTransaction(Transaction.java:69) [jboss-seam.jar:2.1.2]

                    at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:53) [jboss-seam.jar:2.1.2]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_37]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_37]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_37]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_37]

                    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.1.2]

                    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:2.1.2]

                    ... 40 more

            It looks like Seam (or whoever is invoking it) is bypassing the EJB component framework and just invoking on some method of some object which then tries to lookup the EJBContext. Of course that won't work since no EJB semantics have been applied to that call by the EJB container.