6 Replies Latest reply on Jul 2, 2011 2:51 PM by xcoulon

    Quickstart with JSF fails on 7.0.0.CR1

    gbrey

      Hi,

      I've just downloaded CR1 and code samples from https://github.com/jbossas/quickstart/tree/7.0.0.CR1, and after launching standalon.sh and deploying with maven, I got this exception when the application is starting. Application I'm trying is jboss-as-login, but It the same with other with JSF.

       

       

      {code}

      08:58:58,683 INFO  [org.jboss.weld] (MSC service thread 1-2) Processing CDI deployment: jboss-as-login.war

      08:58:58,701 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named EJBUserManager in deployment unit deployment "jboss-as-login.war" are as follows:

       

          java:global/jboss-as-login/EJBUserManager!org.jboss.as.quickstarts.login.UserManager

          java:app/jboss-as-login/EJBUserManager!org.jboss.as.quickstarts.login.UserManager

          java:module/EJBUserManager!org.jboss.as.quickstarts.login.UserManager

          java:global/jboss-as-login/EJBUserManager

          java:app/jboss-as-login/EJBUserManager

          java:module/EJBUserManager

       

      08:58:58,922 INFO  [org.jboss.weld] (MSC service thread 1-1) Starting Services for CDI deployment: jboss-as-login.war

      08:58:58,968 INFO  [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900 1.1.1 (Final)

      08:58:59,007 INFO  [org.jboss.jpa] (MSC service thread 1-4) starting Persistence Unit Service 'jboss-as-login.war#loginDatabase'

      08:58:59,014 INFO  [org.jboss.weld] (MSC service thread 1-5) Starting weld service

      08:58:59,188 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-4) Hibernate Commons Annotations 3.2.0.Final

      08:58:59,196 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH00412:Hibernate [WORKING]

      08:58:59,198 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH00206:hibernate.properties not found

      08:58:59,201 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH00021:Bytecode provider name : javassist

      08:58:59,230 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-4) HHH00204:Processing PersistenceUnitInfo [

          name: loginDatabase

          ...]

      08:58:59,299 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-4) HHH00194:Package not found or wo package-info.java: org.jboss.as.quickstarts.login

      08:58:59,440 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-4) HHH00130:Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

      08:58:59,913 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-4) HHH00400:Using dialect: org.hibernate.dialect.H2Dialect

      08:58:59,919 WARN  [org.hibernate.dialect.H2Dialect] (MSC service thread 1-4) HHH00431:Unable to determine H2 database version, certain features may not work

      08:58:59,922 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (MSC service thread 1-4) HHH00423:Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4

      08:58:59,938 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-4) HHH00268:Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory

      08:58:59,943 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-4) HHH00397:Using ASTQueryTranslatorFactory

      08:58:59,980 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-4) Hibernate Validator 4.1.0.Final

      08:58:59,987 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] (MSC service thread 1-4) Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

      08:59:00,170 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-4) HHH00227:Running hbm2ddl schema export

      08:59:00,183 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-4) HHH00230:Schema export complete

      08:59:00,328 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-2) Initializing Mojarra 2.0.4 (FCS b09) for context '/jboss-as-login'

      08:59:00,353 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-2) Critical error during deployment: : java.lang.ExceptionInInitializerError

          at com.sun.faces.config.ConfigManager$ParseTask.<init>(ConfigManager.java:815) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:653) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:309) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.CR1.jar:7.0.0.CR1]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

          at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

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

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

          at java.lang.Thread.run(Thread.java:619) [:1.6.0_14]

      Caused by: com.sun.faces.config.ConfigurationException: java.lang.IllegalArgumentException: No SchemaFactory that implements the schema language specified by: http://www.w3.org/2001/XMLSchema could be loaded

          at com.sun.faces.config.DbfFactory.initStatics(DbfFactory.java:273) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at com.sun.faces.config.DbfFactory.<clinit>(DbfFactory.java:190) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          ... 12 more

      Caused by: java.lang.IllegalArgumentException: No SchemaFactory that implements the schema language specified by: http://www.w3.org/2001/XMLSchema could be loaded

          at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:207) [:1.6.0_14]

          at com.sun.faces.config.DbfFactory.initStatics(DbfFactory.java:228) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          ... 13 more

       

      08:59:00,356 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jboss-as-login]] (MSC service thread 1-2) Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: java.lang.ExceptionInInitializerError

          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:294) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.CR1.jar:7.0.0.CR1]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

          at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

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

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

          at java.lang.Thread.run(Thread.java:619) [:1.6.0_14]

      Caused by: java.lang.ExceptionInInitializerError

          at com.sun.faces.config.ConfigManager$ParseTask.<init>(ConfigManager.java:815) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:653) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:309) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          ... 8 more

      Caused by: com.sun.faces.config.ConfigurationException: java.lang.IllegalArgumentException: No SchemaFactory that implements the schema language specified by: http://www.w3.org/2001/XMLSchema could be loaded

          at com.sun.faces.config.DbfFactory.initStatics(DbfFactory.java:273) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at com.sun.faces.config.DbfFactory.<clinit>(DbfFactory.java:190) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          ... 12 more

      Caused by: java.lang.IllegalArgumentException: No SchemaFactory that implements the schema language specified by: http://www.w3.org/2001/XMLSchema could be loaded

          at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:207) [:1.6.0_14]

          at com.sun.faces.config.DbfFactory.initStatics(DbfFactory.java:228) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          ... 13 more

       

      08:59:00,357 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Error listenerStart

      08:59:00,358 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Context [/jboss-as-login] startup failed due to previous errors

      08:59:00,365 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-2) Unexpected exception when attempting to tear down the Mojarra runtime: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory

          at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]

          at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]

          at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:108) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:327) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

          at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3465) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

          at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3970) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3888) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.CR1.jar:7.0.0.CR1]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

          at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

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

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

          at java.lang.Thread.run(Thread.java:619) [:1.6.0_14]

       

      08:59:00,378 INFO  [org.jboss.web] (MSC service thread 1-2) registering web context: /jboss-as-login

      08:59:00,387 INFO  [org.jboss.as.server.controller] (Controller Boot Thread) Deployed "jboss-as-login.war"

      08:59:00,393 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.0.CR1 "White Rabbit" started in 5282ms - Started 133 of 190 services (57 services are passive or on-demand)

      {code}

       

      faces-config.xml were the schema fails is empty, Anybody is having the same issue?

        • 1. Re: Quickstart with JSF fails on 7.0.0.CR1
          ssilvert

          This works fine for me.  I just went to the download page and got the quickstart.  Then I deployed it according to the instructions:

           

          mvn package jboss-as:deploy

           

          I also tried some of my own JSF apps on the CR1 download and they work fine as well.

           

          Stan

          • 2. Re: Quickstart with JSF fails on 7.0.0.CR1
            gbrey

            Stan,

            I get it to work just changing the JRE, now I'm using OpenJDK, It wasn't staring over Sun 1.6.0.14 JRE (Fedora 13), Who knows why...

             

            Thanks,

            • 3. Re: Quickstart with JSF fails on 7.0.0.CR1
              volothamp

              I'm having some problem too:

               

              {code}15:15:06,981 GRAVE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Critical error during deployment: : java.lang.NoClassDefFoundError: Could not initialize class com.sun.faces.config.DbfFactory

                        at com.sun.faces.config.ConfigManager$ParseTask.<init>(ConfigManager.java:815) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:653) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:309) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

                        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

                        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.CR1.jar:7.0.0.CR1]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                        at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

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

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

                        at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]

               

               

              15:15:06,987 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jboss7]] (MSC service thread 1-1) Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.faces.config.DbfFactory

                        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:294) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

                        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

                        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.CR1.jar:7.0.0.CR1]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                        at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

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

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

                        at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]

              Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.faces.config.DbfFactory

                        at com.sun.faces.config.ConfigManager$ParseTask.<init>(ConfigManager.java:815) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:653) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:309) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        ... 8 more

               

               

              15:15:06,994 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Error listenerStart

              15:15:06,995 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Context [/jboss7] startup failed due to previous errors

              15:15:06,996 GRAVE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Unexpected exception when attempting to tear down the Mojarra runtime: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory

                        at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]

                        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]

                        at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:108) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:327) [jsf-impl-2.0.4-b09.jar:2.0.4-b09]

                        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3465) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

                        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3970) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

                        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3888) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]

                        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.CR1.jar:7.0.0.CR1]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                        at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

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

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

                        at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]

              {code}

               

               

              java version "1.6.0_17"

              Java(TM) SE Runtime Environment (build 1.6.0_17-b04)

              Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

               

              On windows vista 32 bit

              • 4. Re: Quickstart with JSF fails on 7.0.0.CR1
                ssilvert

                Hi Luca,

                 

                Do you have a sample WAR file that reproduces this?  I think you may have uncovered some Glassfish-specific stuff in Sun's JSF code.  But it's hard to tell how you triggered that particular execution path.

                 

                Stan

                • 5. Re: Quickstart with JSF fails on 7.0.0.CR1
                  volothamp

                  Sure, but nothing strange here, just the war compiled with the quickstart artifact:

                   

                  http://www.2shared.com/file/gszBJ8Ii/jboss7.html

                   

                  Maybe it's a platform issue...

                  • 6. Re: Quickstart with JSF fails on 7.0.0.CR1
                    xcoulon

                    I had the same problem as Gustavo on my windows machine with an old version of Java (1.6.0_12), also with the jboss as7 quickstarts

                    I just installed the latest one (1.6.0_26) and it's fixed now :-)

                     

                    One cool thing with the CLI administration, is that at anytime, you can see which version of Java your server is using:

                     

                    D:\software\jboss-7.0.0.CR1\bin>jboss-admin.bat --connect

                    Connected to standalone controller at localhost:9999

                    [standalone@localhost:9999 /] version

                    JBoss Admin Command-line Interface

                    JBOSS_HOME: D:\software\jboss-7.0.0.CR1

                    JAVA_HOME: C:\Program Files\Java\jdk1.6.0_26

                    java.version: 1.6.0_26

                    java.vm.vendor: Sun Microsystems Inc.

                    java.vm.version: 20.1-b02