1 2 Previous Next 18 Replies Latest reply on Apr 25, 2007 2:06 AM by baz Go to original post
      • 15. Re: Initialization code
        pmuir

        This forum install is a pile of .... ;) You can always send an email if you like :)

        So, the point at which Seam has finished init is just before Lifecycle.endInitialization() - that just cleans up the temporary contexts and runs startup. It won't work after Lifecycle.endInitialization() as there are no contexts active (as you say ;) I suppose it could go in lifecycle after startup.

        9:59:19,594 ERROR [[/seam-discs]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
        java.lang.IllegalStateException: No application context active
         at org.jboss.seam.Component.forName(Component.java:1581)
         at org.jboss.seam.Component.getInstance(Component.java:1631)
         at org.jboss.seam.Component.getInstance(Component.java:1626)
         at org.jboss.seam.Component.getInstance(Component.java:1603)
         at org.jboss.seam.Component.getInstance(Component.java:1598)
         at org.jboss.seam.core.Events.instance(Events.java:138)
         at org.jboss.seam.init.Initialization.init(Initialization.java:501)
         at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
         at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
         at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:300)
         at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
        19:59:19,594 ERROR [StandardContext] Error listenerStart


        • 16. Re: Initialization code
          pmuir

          Sammy, you can use the org.jboss.seam.postInitialization event in CVS - it runs last so all Seam components should be available by then.

          • 17. Re: Initialization code
            baz

            We have a similar problem. We have to initialize a Catalog seam component from database when seam is started.
            Our solution:
            Catalog is application scoped. Our users must login before they can use the app.
            So we put this statement in our authorization bean:

            @In(create = true)
             private Catalog catalog;
            

            The first login initializes the component.
            It is only a workaround and does not work with apps when there is no need to login.
            Ciao,
            baz

            • 18. Re: Initialization code
              baz

              Forget my post. i haven't read the second page of this thread before posting:-(

              I will try org.jboss.seam.postInitialization event but i must find time:-(

              1 2 Previous Next