2 Replies Latest reply on Oct 10, 2012 4:12 AM by jbarcelona

    Fail to deploy Richfaces project

    ryannewbie

      after entering url, the browser show HTTP ERROR 500 as below and in the stack trace it always complains Marking servlet Resource Servlet as unavailable.

      could you help me set up richfaces? I checked the book, there is no resourceServlet needed to implement. I don't have no idea what block the rendering of Richfaces.

       

      HTTP ERROR: 500

      javax.servlet.ServletException: Error Parsing /index.faces: Premature end of file

       

       

      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      javax.servlet.ServletException: Error Parsing /index.faces: Premature end of file. javax.faces.webapp.FacesServlet.service(FacesServlet.java:606) org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) 

      root cause

      javax.faces.view.facelets.FaceletException: Error Parsing /index.faces: Premature end of file. com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:436) com.sun.faces.facelets.compiler.SAXCompiler.doMetadataCompile(SAXCompiler.java:419) com.sun.faces.facelets.compiler.Compiler.metadataCompile(Compiler.java:130) com.sun.faces.facelets.impl.DefaultFaceletFactory.createMetadataFacelet(DefaultFaceletFactory.java:327) com.sun.faces.facelets.impl.DefaultFaceletFactory.access$200(DefaultFaceletFactory.java:93) com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:166) com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:164) com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:94) com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:89) com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99) java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) java.util.concurrent.FutureTask.run(FutureTask.java:166) com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:114) com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:143) com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:62) com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:260) com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:209) com.sun.faces.application.view.ViewMetadataImpl.createMetadataView(ViewMetadataImpl.java:114) com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:233) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) 

      note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.

       

       

       

       

      22:25:41,085 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

      22:25:41,639 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

      22:25:41,716 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

      22:25:43,271 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

      22:25:43,292 INFO  [org.xnio] XNIO Version 3.0.3.GA

      22:25:43,306 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

      22:25:43,317 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

      22:25:43,418 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

      22:25:43,455 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem

      22:25:43,470 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.

      22:25:43,494 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem

      22:25:43,541 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

      22:25:43,583 INFO  [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service

      22:25:43,624 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default]

      22:25:43,625 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Gmail]

      22:25:43,634 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem

      22:25:43,653 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

      22:25:43,669 INFO  [org.jboss.as.security] (MSC service thread 1-3) JBAS013100: Current PicketBox version=4.0.7.Final

      22:25:43,944 INFO  [org.jboss.as.connector] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

      22:25:44,013 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-4) JBoss Web Services - Stack CXF Server 4.0.2.GA

      22:25:44,025 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)

      22:25:44,031 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      22:25:44,842 WARN  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015005: Reliable deployment behaviour is not possible when auto-deployment of exploded content is enabled (i.e. deployment without use of ".dodeploy"' marker files). Configuration of auto-deployment of exploded content is not recommended in any situation where reliability is desired. Configuring the deployment scanner's auto-deploy-exploded setting to "false" is recommended.

      22:25:44,845 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss-as-7.1.1.Final\standalone\deployments

      22:25:44,968 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on localhost/127.0.0.1:4447

      22:25:45,031 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:9999

      22:25:45,093 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080

      22:25:45,217 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:/OraclePool]

      22:25:45,218 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

      22:25:45,276 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "h2o.war"

      22:25:45,517 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for h2oImages

      22:25:45,714 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002: Processing weld deployment h2o.war

      22:25:45,723 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-4) JNDI bindings for session bean named UserEJB in deployment unit deployment "h2o.war" are as follows:

       

          java:global/h2o/UserEJB!com.h2o.UserEJB

          java:app/h2o/UserEJB!com.h2o.UserEJB

          java:module/UserEJB!com.h2o.UserEJB

          java:global/h2o/UserEJB

          java:app/h2o/UserEJB

          java:module/UserEJB

       

      22:25:45,756 WARN  [org.jboss.as.ee] (MSC service thread 1-4) JBAS011006: Not installing optional component org.richfaces.webapp.ResourceServlet due to exception: java.lang.ClassNotFoundException: org.richfaces.webapp.ResourceServlet from [Module "deployment.h2o.war:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]

          at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_04]

          at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_04]

          at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:79)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

          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.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

       

      22:25:45,921 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016005: Starting Services for CDI deployment: h2o.war

      22:25:46,196 INFO  [org.jboss.weld.Version] (MSC service thread 1-4) WELD-000900 1.1.5 (AS71)

      22:25:46,505 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011402: Starting Persistence Unit Service 'h2o.war#h2oImages'

      22:25:46,695 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-2) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

      22:25:46,701 INFO  [org.hibernate.Version] (MSC service thread 1-2) HHH000412: Hibernate Core {4.0.1.Final}

      22:25:46,704 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-2) HHH000206: hibernate.properties not found

      22:25:46,706 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-2) HHH000021: Bytecode provider name : javassist

      22:25:46,737 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-2) HHH000204: Processing PersistenceUnitInfo [

          name: h2oImages

          ...]

      22:25:47,204 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-2) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

      22:25:48,566 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-2) HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect

      22:25:48,588 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-2) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory

      22:25:48,593 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-2) HHH000397: Using ASTQueryTranslatorFactory

      22:25:48,651 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-2) Hibernate Validator 4.2.0.Final

      22:25:49,059 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-2) HHH000227: Running hbm2ddl schema export

      22:25:49,065 INFO  [stdout] (MSC service thread 1-2) Hibernate: drop table ImageBase cascade constraints

       

      22:25:49,279 INFO  [stdout] (MSC service thread 1-2) Hibernate: drop table h2oUser cascade constraints

       

      22:25:49,331 INFO  [stdout] (MSC service thread 1-2) Hibernate: drop sequence hibernate_sequence

       

      22:25:49,376 INFO  [stdout] (MSC service thread 1-2) Hibernate: create table ImageBase (id number(19,0) not null, imgFile varchar2(255 char) unique, imgOriginalFile varchar2(255 char), USER_EMAIL varchar2(255 char), USER_ID number(19,0), primary key (id))

       

      22:25:49,465 INFO  [stdout] (MSC service thread 1-2) Hibernate: create table h2oUser (email varchar2(255 char) not null, H2O_ID number(19,0) not null, activated number(1,0) not null, avatorPath varchar2(255 char), basePath varchar2(255 char), createDate date, nickName varchar2(255 char) not null, password varchar2(255 char) not null, primary key (email, H2O_ID))

       

      22:25:49,490 INFO  [stdout] (MSC service thread 1-2) Hibernate: alter table ImageBase add constraint FK43121EAC9011D91 foreign key (USER_EMAIL, USER_ID) references h2oUser

       

      22:25:49,504 INFO  [stdout] (MSC service thread 1-2) Hibernate: create sequence hibernate_sequence start with 1 increment by 1

       

      22:25:49,513 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-2) HHH000230: Schema export complete

      22:25:49,660 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016008: Starting weld service for deployment h2o.war

      22:25:50,306 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-2) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/h2o'

      22:25:52,283 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/h2o]] (MSC service thread 1-2) Marking servlet Resource Servlet as unavailable

      22:25:52,284 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/h2o]] (MSC service thread 1-2) Servlet /h2o threw load() exception: java.lang.ClassNotFoundException: org.richfaces.webapp.ResourceServlet from [Module "deployment.h2o.war:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

          at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:72) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1156) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

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

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

       

      22:25:52,308 INFO  [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /h2o

      22:25:52,316 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015951: Admin console listening on http://127.0.0.1:9990

      22:25:52,319 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 11832ms - Started 211 of 289 services (76 services are passive or on-demand)

      22:25:52,478 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "h2o.war"

        • 1. Re: Fail to deploy Richfaces project
          jbarcelona

          Hi Ryan Li,

           

          I've just began with JBoss and RichFaces and I can't not achive to run properly the richfaces rendering the tags. I've seen that if I remove the servlet mapping of Servlet on web.xml some AJAX Richfaces renders. In the case per example of tabs appears the 500 error. I'm not sure if we need to declare: the servlet or context parameters or welcomefile.... In the developer guide says that in RichFaces4 is not necessary to add any int the web.xml.

           

          I wish that we find the solution!!!!

          • 2. Re: Fail to deploy Richfaces project
            jbarcelona

            Finally I've found the problem that was the combination of the tools to work, at the end I'm using:

             

            JB0ss7 + JSF 2.0 + RichFaces4 (default xml that is created with New--> JSF Project) + Dependency Libraries (guava, cssparser,...)