10 Replies Latest reply on Nov 7, 2005 9:01 PM by pf

    jboss newbie question: re-deploy

    patrick_ibg

      I'm using the Seam build of JBoss.

      I use the 'deploy' target similar to the supplied build.xml file in the Seam source (i.e., copy .ear file to jboss deployment dir). This works about 3/4 of the time. Every now and then, when I re-compile and deploy, I get the following error:

      13:35:21,542 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB3,name=com.inertiabev.affiliate.account.RegisterAction
      java.lang.ClassCastException: org.jboss.ejb3.stateful.StatefulContainer
      at org.jboss.util.naming.Util.createSubcontext(Util.java:54)
      at org.jboss.util.naming.Util.createSubcontext(Util.java:37)
      at org.jboss.ejb3.SessionContainer.start(SessionContainer.java:50)
      at org.jboss.ejb3.stateful.StatefulContainer.start(StatefulContainer.java:69)
      at org.jboss.ejb3.stateful.StatefulManager.startService(StatefulManager.java:91)

      Whenever I get this, the appserver seems to be in a corrupted state, and my apps stop working. This goes away if I shutdown and restart the jboss process.

      I've checked all my SFSBs and they all have the appropriate @Remove annotations.

      Any tips to doing graceful redeploys?

      Thanks in advance...

        • 1. Re: jboss newbie question: re-deploy
          rdewell

          I have that exact same problem! I thought it was something weird about my code. It's with a different class of mine, of course. It seems to be almost like clockwork. On about the third re-deploy, bang, that class cast exception shows up and I have to restart the whole thing.

          Hopefully we'll get a new build of seam soon + a new build of 4.0.3 for seam..

          Ryan

          • 2. Re: jboss newbie question: re-deploy
            patrick_ibg

            It might be resolvable via configuration.

            I suspect it has to do with SFSB passivation, Conversation timeout and the use of extended PersistenceContext. But my Seam kung fu isn't very strong, and my knowledge of EJB3 is even worse...

            But I have detected a pattern...

            When you deploy and get this error:

            19:16:58,358 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB3,name=com.inertiabev.affiliate.booking.HotelBookingAction
            java.lang.IllegalStateException: Timer already cancelled.
            at java.util.Timer.sched(Timer.java:354)
            at java.util.Timer.scheduleAtFixedRate(Timer.java:296)
            at org.jboss.ejb3.cache.simple.SimpleStatefulCache.start(SimpleStatefulCache.java:121)

            The next time you deploy you will get the ClassCastException.

            • 3. Re: jboss newbie question: re-deploy
              theute

              I never experienced that.

              Hopefully we'll get a new build of seam soon + a new build of 4.0.3 for seam.. [/seam]
              JBoss AS 4.0.3 is already out, you can use it as is.


              • 4. Re: jboss newbie question: re-deploy
                rdewell

                Thomas, I get the following error when deploying to 4.0.3 (final). This error does not occur when deploying to the version of 4.0.3 that was bundled with Seam. Any ideas?

                08:42:21,719 INFO [ServletContextListener] Welcome to Seam 1.0 beta 1
                08:42:21,728 INFO [Seam] initializing Seam
                08:42:23,070 ERROR [[/bm-hosted]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
                java.lang.NoClassDefFoundError: javax/ejb/Stateful
                at org.jboss.seam.Seam.getComponentType(Unknown Source)

                • 5. Re: jboss newbie question: re-deploy
                  xiangya

                  Hi,may be jboss 4.0.3 version conflict?
                  It seems that is true.
                  I remember not clearly that using seam1.0beta, that happens, when using cvs version, from its version, it use updated jboss ejb3, no this case happeds.

                  • 6. Re: jboss newbie question: re-deploy
                    gavin.king

                    Make sure you install JBoss with EJB3 support, use the installer.

                    • 7. Re: jboss newbie question: re-deploy

                      I have the same problem for a long time. I'm using JBoss 4.0.3 final installed with installer :-)

                      • 8. Re: jboss newbie question: re-deploy
                        pf

                        I have this problem too. When I rebuild and redeploy EAR (ejb3) application, this error occurs:

                        Problem starting service jboss.j2ee:service=EJB3,name=cz.ps.invest.common.UserService
                        java.lang.ClassCastException: org.jboss.ejb3.stateful.StatefulContainer
                        at org.jboss.util.naming.Util.createSubcontext(Util.java:54)
                        at org.jboss.util.naming.Util.createSubcontext(Util.java:37)
                        ...

                        What is the problem?

                        • 9. Re: jboss newbie question: re-deploy
                          marius.oancea

                          I have this problem too. I use jboss 403 and also 403SP1. In both the pb is existing. If I redeploy the application 3 times .... the 4 th time will happen. Once the problem appear you have to restart jboss.

                          • 10. Re: jboss newbie question: re-deploy
                            pf

                            View this link:

                            http://www.jboss.com/index.html?module=bb&op=viewtopic&t=71343

                            I have not any problem after this workaround.