4 Replies Latest reply on Apr 13, 2009 10:31 PM by lcompton

    Deployment Hanging in JBoss 5.0.1.GA

      I'm putting together a sample Seam application by hand using Seam 2.1.1.GA and JBoss 5.0.1.GA. When I deploy my application, the application server stalls immediately after (or in the process of) deploying the web application for my app. I've included some of the configuration files below. Any idea why this is happening?

      faces-config.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
              <application>
                      <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
              </application>
              <lifecycle>
                      <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
              </lifecycle>
      </faces-config>

      web.xml:
      <?xml version="1.0" ?>
      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
              id="WebApp_ID" version="2.5">

              <listener>
                      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
              </listener>
              <filter>
                      <filter-name>Seam Filter</filter-name>
                      <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
              </filter>
              <filter-mapping>
                      <filter-name>Seam Filter</filter-name>
                      <url-pattern>/*</url-pattern>
              </filter-mapping>

              <context-param>
                      <param-name>facelets.DEVELOPMENT</param-name>
                      <param-value>true</param-value>
              </context-param>
              <context-param>
                      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                      <param-value>client</param-value>
              </context-param>
              <context-param>
                      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                      <param-value>.xhtml</param-value>
              </context-param>
              <servlet>
                      <servlet-name>Faces Servlet</servlet-name>
                      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                      <load-on-startup>1</load-on-startup>
              </servlet>
              <servlet-mapping>
                      <servlet-name>Faces Servlet</servlet-name>
                      <url-pattern>*.seam</url-pattern>
              </servlet-mapping>
      </web-app>

      Tail end of the application server output:
      15:40:06,511 INFO  [SessionFactoryImpl] building session factory
      15:40:06,518 INFO  [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=larry.ear/larry-ejb-1.0.0.jar#sampledb
      15:40:06,520 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      15:40:06,525 INFO  [NamingHelper] Creating subcontext: persistence.unit:unitName=larry.ear
      15:40:06,525 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=larry.ear/larry-ejb-1.0.0.jar#sampledb
      15:40:06,525 WARN  [SessionFactoryObjectFactory] InitialContext did not implement EventContext
      15:40:06,539 INFO  [SchemaExport] Running hbm2ddl schema export
      15:40:06,540 INFO  [SchemaExport] exporting generated schema to database
      15:40:06,540 INFO  [SchemaExport] schema export complete
      15:40:06,543 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      15:40:06,907 INFO  [TomcatDeployment] deploy, ctxPath=/larry
      15:40:07,522 WARN  [SeamPhaseListener] There should only be one Seam phase listener per application

        • 1. Re: Deployment Hanging in JBoss 5.0.1.GA
          Let's try that again...

          I'm putting together a sample Seam application by hand using Seam 2.1.1.GA and JBoss 5.0.1.GA. When I deploy my application, the application server stalls immediately after (or in the process of) deploying the web application for my app. I've included some of the configuration files below. Any idea why this is happening?

          faces-config.xml:
          <?xml version="1.0" encoding="UTF-8"?>
          <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
               <application>
                    <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
               </application>
               <lifecycle>
                    <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
               </lifecycle>
          </faces-config>

          web.xml:
          <?xml version="1.0" ?>
          <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
               id="WebApp_ID" version="2.5">

               <listener>
                    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
               </listener>
               <filter>
                    <filter-name>Seam Filter</filter-name>
                    <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
               </filter>
               <filter-mapping>
                    <filter-name>Seam Filter</filter-name>
                    <url-pattern>/*</url-pattern>
               </filter-mapping>

               <context-param>
                    <param-name>facelets.DEVELOPMENT</param-name>
                    <param-value>true</param-value>
               </context-param>
               <context-param>
                    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                    <param-value>client</param-value>
               </context-param>
               <context-param>
                    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                    <param-value>.xhtml</param-value>
               </context-param>
               <servlet>
                    <servlet-name>Faces Servlet</servlet-name>
                    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                    <load-on-startup>1</load-on-startup>
               </servlet>
               <servlet-mapping>
                    <servlet-name>Faces Servlet</servlet-name>
                    <url-pattern>*.seam</url-pattern>
               </servlet-mapping>
          </web-app>

          Application server output:
          15:40:06,459 INFO  [SettingsFactory] Named query checking : enabled
          15:40:06,511 INFO  [SessionFactoryImpl] building session factory
          15:40:06,518 INFO  [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=larry.ear/larry-ejb-1.0.0.jar#sampledb
          15:40:06,520 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
          15:40:06,525 INFO  [NamingHelper] Creating subcontext: persistence.unit:unitName=larry.ear
          15:40:06,525 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=larry.ear/larry-ejb-1.0.0.jar#sampledb
          15:40:06,525 WARN  [SessionFactoryObjectFactory] InitialContext did not implement EventContext
          15:40:06,539 INFO  [SchemaExport] Running hbm2ddl schema export
          15:40:06,540 INFO  [SchemaExport] exporting generated schema to database
          15:40:06,540 INFO  [SchemaExport] schema export complete
          15:40:06,543 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
          15:40:06,907 INFO  [TomcatDeployment] deploy, ctxPath=/larry
          15:40:07,522 WARN  [SeamPhaseListener] There should only be one Seam phase listener per application
          • 2. Re: Deployment Hanging in JBoss 5.0.1.GA
            Here's a little more information. I let the application server run for a while in its hung state and the following popped up...

            15:40:06,907 INFO  [TomcatDeployment] deploy, ctxPath=/larry
            15:40:07,522 WARN  [SeamPhaseListener] There should only be one Seam phase listener per application
            16:06:02,719 ERROR [STDERR] Exception in thread "RMI TCP Connection(idle)"
            16:06:30,833 ERROR [STDERR] Exception in thread "RMI RenewClean-[127.0.0.1:41002]"
            16:06:40,080 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
            16:07:07,826 ERROR [STDERR]      at java.io.BufferedInputStream.<init>(BufferedInputStream.java:178)
            16:07:12,445 ERROR [STDERR]      at java.io.BufferedInputStream.<init>(BufferedInputStream.java:158)
            16:07:12,446 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPConnection.getInputStream(TCPConnection.java:85)
            16:07:17,062 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:226)
            16:07:21,697 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
            16:07:21,697 ERROR [STDERR]      at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
            16:07:21,697 ERROR [STDERR]      at sun.rmi.transport.DGCImpl_Stub.dirty(Unknown Source)
            16:07:26,327 ERROR [STDERR]      at sun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(DGCClient.java:342)
            16:07:42,513 ERROR [STDERR]      at sun.rmi.transport.DGCClient$EndpointEntry.access$1600(DGCClient.java:153)
            16:07:44,828 ERROR [STDERR]      at sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(DGCClient.java:555)
            16:07:49,453 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:619)
            16:07:54,072 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
            16:07:54,073 ERROR [STDERR]      at java.io.BufferedInputStream.<init>(BufferedInputStream.java:178)
            16:07:54,073 ERROR [STDERR]      at java.io.BufferedInputStream.<init>(BufferedInputStream.java:158)
            16:07:59,095 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:679)
            16:08:03,716 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
            16:08:13,009 ERROR [STDERR]      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            16:08:40,933 ERROR [STDERR]      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            16:08:45,606 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:619)
            • 3. Re: Deployment Hanging in JBoss 5.0.1.GA
              gonorrhea

              have you checked out JVM tuning?


              this is a really serious problem:


              java.lang.OutOfMemoryError: Java heap space



              minimum heap space allocation should be 512MB on a decent (3GB+) machine.


              example JVM tuning for Sun JVM (VM args in JBDS server config):


              -server
              -Xms1024m 
              -Xmx1024m 
              -Dsun.rmi.dgc.client.gcInterval=3600000
              -Dsun.rmi.dgc.server.gcInterval=3600000
              -XX:+UseConcMarkSweepGC 
              -XX:+CMSPermGenSweepingEnabled
              -XX:+CMSClassUnloadingEnabled
              -XX:MaxPermSize=512m
              -Xverify:none  
              



              Also, try undeploying your app, deploying the seam booking example app, and restarting JBoss.


              Does it start/deploy cleanly that way or not?

              • 4. Re: Deployment Hanging in JBoss 5.0.1.GA

                I've deployed other (non-Seam) applications without problems. I don't think it's a JVM tuning issue since it takes 20 minutes for it to run out of memory.