Boa noite!!!
Estou tentando apresentar a mensagem de boas vindas da pág. 17 da Java Magazine edição 100.
O servidor inicia normalmente aparecendo perfeitamente quando coloco a URL: localhost:8080
Refazendo um erro: eu estava digitando JavaAlbergue, ao invés de javaAlbergue na URL.
Mas apresenta o seguinte erro quando digito http://localhost:8080/javAlbergue/faces/index.xhtml:
>>> INÍCIO DO ERRO NA URL <<<<
TP Status 500 -
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.xhtml: Error Traced[line: 1] White spaces are required after keyword PUBLIC in DOCTYPE decl.
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.xhtml: Error Traced[line: 1] White spaces are required after keyword PUBLIC in DOCTYPE decl.
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(Unknown Source)
java.util.concurrent.FutureTask.run(Unknown Source)
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.
>>> FIM DO ERRO NA URL <<<
Quando inicio o servidor pelo Eclipse, aparece a seguinte mensagem:
>>> INÍCIO DA MENSAGEM NO CONSOLE DO ECLIPSE <<<
14:27:00,118 Informações [org.jboss.modules] JBoss Modules version 1.1.1.GA
14:27:00,320 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
14:27:00,370 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final “Brontes” starting
14:27:01,473 INFO [org.xnio] XNIO Version 3.0.3.GA
14:27:01,474 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
14:27:01,481 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
14:27:01,488 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
14:27:01,515 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
14:27:01,524 INFO [org.jboss.as.configadmin] (ServerService Thread Pool – 26) JBAS016200: Activating ConfigAdmin Subsystem
14:27:01,596 INFO [org.jboss.as.webservices] (ServerService Thread Pool – 48) JBAS015537: Activating WebServices Extension
14:27:01,608 INFO [org.jboss.as.security] (ServerService Thread Pool – 44) JBAS013101: Activating Security Subsystem
14:27:01,617 INFO [org.jboss.as.security] (MSC service thread 1-3) JBAS013100: Current PicketBox version=4.0.7.Final
14:27:01,653 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool – 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
14:27:01,661 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool – 27) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
14:27:01,666 INFO [org.jboss.as.naming] (ServerService Thread Pool – 38) JBAS011800: Activating Naming Subsystem
14:27:01,684 INFO [org.jboss.as.osgi] (ServerService Thread Pool – 39) JBAS011940: Activating OSGi Subsystem
14:27:01,700 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool – 31) JBAS010280: Activating Infinispan subsystem.
14:27:01,759 INFO [org.jboss.as.connector] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
14:27:01,942 INFO [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service
14:27:01,998 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-3) JBoss Web Services - Stack CXF Server 4.0.2.GA
14:27:02,148 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default]
14:27:02,331 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss-as-7.1.1.Final\standalone\deployments
14:27:02,346 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found javAlbergue.war in deployment directory. To trigger deployment create a file called javAlbergue.war.dodeploy
14:27:02,374 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999
14:27:02,382 INFO [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on localhost/127.0.0.1:4447
14:27:02,418 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
14:27:02,584 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
14:27:02,586 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:/jboss/datasources/JavAlbergue]
14:27:02,729 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "javAlbergue.war"
14:27:02,983 INFO [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for javAlbergue
14:27:03,037 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002: Processing weld deployment javAlbergue.war
14:27:03,099 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: javAlbergue.war
14:27:03,130 INFO [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900 1.1.5 (AS71)
14:27:03,160 INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011402: Starting Persistence Unit Service 'javAlbergue.war#javAlbergue’
14:27:03,440 INFO [org.hibernate.annotations.common.Version] (MSC service thread 1-1) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
14:27:03,447 INFO [org.hibernate.Version] (MSC service thread 1-1) HHH000412: Hibernate Core {4.0.1.Final}
14:27:03,449 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-1) HHH000206: hibernate.properties not found
14:27:03,451 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-1) HHH000021: Bytecode provider name : javassist
14:27:03,474 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-1) HHH000204: Processing PersistenceUnitInfo [
name: javAlbergue
…]
14:27:03,567 WARN [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-1) HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections
14:27:03,588 INFO [org.hibernate.dialect.Dialect] (MSC service thread 1-1) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
14:27:03,599 INFO [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (MSC service thread 1-1) HHH000422: Disabling contextual LOB creation as connection was null
14:27:03,607 INFO [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-1) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
14:27:03,612 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-1) HHH000397: Using ASTQueryTranslatorFactory
14:27:03,778 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-1) HHH000227: Running hbm2ddl schema export
14:27:03,780 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-1) HHH000231: Schema export unsuccessful: java.lang.UnsupportedOperationException: The application must supply JDBC connections
at org.hibernate.service.jdbc.connections.internal.UserSuppliedConnectionProviderImpl.getConnection(UserSuppliedConnectionProviderImpl.java:62) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.tool.hbm2ddl.DatabaseExporter.<init>(DatabaseExporter.java:52) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:368) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:305) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:294) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:452) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-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(Unknown Source) [rt.jar:1.7.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_05]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_05]
14:27:03,796 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-1) HHH000230: Schema export complete
14:27:03,815 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016008: Starting weld service for deployment javAlbergue.war
14:27:04,331 Informações [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Inicializando Mojarra 2.1.7-jbossorg-1 (20120227-1401) para o contexto '/javAlbergue’
14:27:04,737 INFO [org.hibernate.validator.util.Version] (MSC service thread 1-1) Hibernate Validator 4.2.0.Final
14:27:04,875 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /javAlbergue
14:27:04,882 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990
14:27:04,884 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015874: JBoss AS 7.1.1.Final “Brontes” started in 5017ms - Started 195 of 273 services (76 services are passive or on-demand)
14:27:04,987 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed “javAlbergue.war”
>>> FIM DA MENSAGEM NO CONSOLE DO ECLIPSE <<<
Qual o erro que eu ainda estou cometendo?
Obrigado!!!