4
respostas

Erro ao mudar de Banco

Olá baixei o projeto do último item, e alterei o banco para Postgesql mas está dando erro, já le e rele várias coisas e não consigo fazer funcionar.

Criei o datasource e testando pela console do admin do Wildfly 10.0.0 final ele se conecta e retorna sucesso.

Erro no console:

```18:18:58,139 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) WFLYCTL0013: Operation ("add") failed - address: ([ ("subsystem" => "datasources"), ("jdbc-driver" => "postgresql") ]) - failure description: "WFLYJCA0041: Failed to load module for driver [org.postgresql]" 18:18:58,166 INFO [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 4.0.18.Final 18:18:58,172 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors 18:18:58,174 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0001: Activating Infinispan subsystem. 18:18:58,184 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique. 18:18:58,188 INFO [org.jboss.as.security] (ServerService Thread Pool -- 53) WFLYSEC0002: Activating Security Subsystem 18:18:58,192 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 44) WFLYJSF0007: Activated the following JSF Implementations: [main] 18:18:58,199 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming Subsystem 18:18:58,203 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 56) WFLYWS0002: Activating WebServices Extension 18:18:58,329 INFO [org.jboss.as.security] (MSC service thread 1-4) WFLYSEC0001: Current PicketBox version=4.9.4.Final 18:18:58,336 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0003: Undertow 1.3.15.Final starting 18:18:58,337 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0003: Undertow 1.3.15.Final starting 18:18:58,360 INFO [org.jboss.as.connector] (MSC service thread 1-8) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.2.Final) 18:18:58,390 INFO [org.jboss.as.naming] (MSC service thread 1-4) WFLYNAM0003: Starting Naming Service 18:18:58,444 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default] 18:18:58,550 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path 'C:\Users\Diogo\Documents\Aplicativos\wildfly-10.0.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]'] 18:18:58,554 INFO [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host. 18:18:58,555 INFO [org.jboss.as.ejb3] (MSC service thread 1-7) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing. 18:18:58,565 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0012: Started server default-server. 18:18:58,567 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0018: Host default-host starting 18:18:58,645 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080 18:18:59,119 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) WFLYDS0013: Started FileSystemDeploymentService for directory C:\Users\Diogo\Documents\Aplicativos\wildfly-10.0.0.Final\standalone\deployments 18:18:59,126 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "livraria-wildfly.war" (runtime-name: "livraria-wildfly.war") 18:18:59,131 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "postgresql-9.4.1208.jar" (runtime-name: "postgresql-9.4.1208.jar") 18:18:59,281 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-4) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final 18:18:59,573 INFO [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBossWS 5.1.3.Final (Apache CXF 3.1.4) 18:18:59,816 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.4) 18:18:59,836 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = postgresql-9.4.1208.jar 18:18:59,945 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:/PostgresDS] 18:19:00,404 WARN [org.jboss.weld.deployer] (MSC service thread 1-7) WFLYWELD0012: Warning while parsing vfs:/C:/Users/Diogo/Documents/Aplicativos/wildfly-10.0.0.Final/standalone/deployments/livraria-wildfly.war/WEB-INF/beans.xml:2 cvc-elt.1.a: Cannot find the declaration of element 'beans'. 18:19:00,419 INFO [org.jboss.as.jpa] (MSC service thread 1-7) WFLYJPA0002: Read persistence.xml for PostgresDS 18:19:00,503 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'livraria-wildfly.war#PostgresDS' 18:19:00,533 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 59) HHH000204: Processing PersistenceUnitInfo [ name: PostgresDS ...] 18:19:00,545 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0003: Processing weld deployment livraria-wildfly.war 18:19:00,610 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-6) HV000001: Hibernate Validator 5.2.3.Final 18:19:00,613 INFO [org.hibernate.Version] (ServerService Thread Pool -- 59) HHH000412: Hibernate Core {5.0.7.Final} 18:19:00,614 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 59) HHH000206: hibernate.properties not found 18:19:00,616 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 59) HHH000021: Bytecode provider name : javassist 18:19:00,649 INFO [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 59) HHH90000001: Found usage of deprecated setting for specifying Scanner [hibernate.ejb.resource_scanner]; use [hibernate.archive.scanner] instead 18:19:00,667 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 59) HCANN000001: Hibernate Commons Annotations {5.0.1.Final} 18:19:00,993 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0006: Starting Services for CDI deployment: livraria-wildfly.war 18:19:01,029 INFO [org.jboss.weld.Version] (MSC service thread 1-6) WELD-000900: 2.3.2 (Final) 18:19:01,057 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0009: Starting weld service for deployment livraria-wildfly.war 18:19:01,161 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'livraria-wildfly.war#PostgresDS' 18:19:01,347 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 59) HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect 18:19:01,501 INFO [org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl] (ServerService Thread Pool -- 59) HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException 18:19:01,507 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 59) Envers integration enabled? : true 18:19:01,707 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 59) HHH000228: Running hbm2ddl schema update 18:19:01,735 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "livraria-wildfly.war")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.DefaultDataSource is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]"]} 18:19:01,737 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "postgresql-9.4.1208.jar")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.\"postgresql-9.4.1208\".\"postgresql-9.4.1208\".DefaultDataSource is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]"]} 18:19:01,755 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "postgresql-9.4.1208.jar" (runtime-name : "postgresql-9.4.1208.jar") 18:19:01,757 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "livraria-wildfly.war" (runtime-name : "livraria-wildfly.war") 18:19:01,758 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report WFLYCTL0184: New missing/unsatisfied dependencies: service jboss.naming.context.java.jboss.datasources.ExampleDS (missing) dependents: [service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.DefaultDataSource, service jboss.naming.context.java.module."postgresql-9.4.1208"."postgresql-9.4.1208".DefaultDataSource]

18:19:01,881 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management 18:19:01,882 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990 18:19:01,882 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started (with errors) in 5750ms - Started 388 of 707 services (23 services failed or missing dependencies, 390 services are lazy, passive or on-demand) 18:19:01,920 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'livraria-wildfly.war#PostgresDS' 18:19:01,923 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'livraria-wildfly.war#PostgresDS' 18:19:01,965 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment livraria-wildfly.war (runtime-name: livraria-wildfly.war) in 50ms 18:19:02,024 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "livraria-wildfly.war" (runtime-name: "livraria-wildfly.war") 18:19:02,032 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report WFLYCTL0184: New missing/unsatisfied dependencies: service jboss.deployment.unit."livraria-wildfly.war".WeldBootstrapService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacesServlet".WeldInstantiator, service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".WeldInstantiator, service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator, service jboss.deployment.unit."livraria-wildfly.war".CdiValidatorFactoryService, WFLYCTL0208: ... and 6 more ] service jboss.deployment.unit."livraria-wildfly.war".WeldStartService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacesServlet".WeldInstantiator, service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".WeldInstantiator, service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator, service jboss.deployment.unit."livraria-wildfly.war".CdiValidatorFactoryService, WFLYCTL0208: ... and 7 more ] service jboss.deployment.unit."livraria-wildfly.war".component."com.sun.faces.config.ConfigureListener".CREATE (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."com.sun.faces.config.ConfigureListener".START] service jboss.deployment.unit."livraria-wildfly.war".component."com.sun.faces.config.ConfigureListener".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.deployment.unit."livraria-wildfly.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService, service jboss.deployment.unit."livraria-wildfly.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./livraria-wildfly] service jboss.deployment.unit."livraria-wildfly.war".component."com.sun.faces.config.ConfigureListener".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."com.sun.faces.config.ConfigureListener".START] service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacesServlet".CREATE (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacesServlet".START] service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacesServlet".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacesServlet".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacesServlet".START] service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".CREATE (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".START] service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService, service jboss.deployment.unit."livraria-wildfly.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./livraria-wildfly] service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".START] service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".CREATE (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START] service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService, service jboss.deployment.unit."livraria-wildfly.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./livraria-wildfly] service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START] service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".CREATE (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START] service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService, service jboss.deployment.unit."livraria-wildfly.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./livraria-wildfly] service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START] service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldInitialListener".CREATE (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldInitialListener".START] service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldInitialListener".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService, service jboss.deployment.unit."livraria-wildfly.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./livraria-wildfly] service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldInitialListener".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldInitialListener".START] service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldTerminalListener".CREATE (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldTerminalListener".START] service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldTerminalListener".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService, service jboss.deployment.unit."livraria-wildfly.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./livraria-wildfly] service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldTerminalListener".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldTerminalListener".START] service jboss.deployment.unit."livraria-wildfly.war".ee.ComponentRegistry (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService] service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."com.sun.faces.config.ConfigureListener".START, service jboss.deployment.unit."livraria-wildfly.war".component."org.jboss.weld.servlet.WeldTerminalListener".START, service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacesServlet".START, service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".START, WFLYCTL0208: ... and 5 more ] service jboss.naming.context.java.app.livraria-wildfly.env (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.BeanManager (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.DefaultContextService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.DefaultDataSource (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.DefaultManagedExecutorService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.DefaultManagedScheduledExecutorService (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.DefaultManagedThreadFactory (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.TransactionSynchronizationRegistry (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.UserTransaction (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.naming.context.java.module.livraria-wildfly.livraria-wildfly.env (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".jndiDependencyService] service jboss.persistenceunit."livraria-wildfly.war#PostgresDS" (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".component."com.sun.faces.config.ConfigureListener".START, service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacesServlet".START, service jboss.deployment.unit."livraria-wildfly.war".component."javax.faces.webapp.FacetTag".START, service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService, WFLYCTL0208: ... and 6 more ] service jboss.undertow.deployment.default-server.default-host./livraria-wildfly (missing) dependents: [service jboss.deployment.unit."livraria-wildfly.war".deploymentCompleteService] service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly] service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.codec (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService] service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.session (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService] service org.wildfly.request-controller.control-point."livraria-wildfly.war".undertow (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./livraria-wildfly.UndertowDeploymentInfoService]

18:19:06,800 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found livraria-wildfly.war in deployment directory. To trigger deployment create a file called livraria-wildfly.war.dodeploy ```

wildfly-10.0.0.Final\standalone\configuration\standalone.xml

''<''datasource jta="true" jndi-name="java:/PostgresDS" pool-name="PostgresDS" enabled="true" use-ccm="true"''> jdbc:postgresql://localhost:5432/meugado ''<''driver-class>org.postgresql.Driver''<''/driver-class> ''<''driver>postgresql-9.4.1208.jar''<''/driver> ''<''security> ''<''user-name>postgres''<''/user-name> ''<''password>postgres''<''/password> ''<''/security> ''<''validation> ''<''valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/> ''<''background-validation>true''<''/background-validation> ''<''exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/> ''<''/validation> ''<''/datasource> ''<''drivers> ''<''driver name="postgresql" module="org.postgresql"> ''<''xa-datasource-class>org.postgresql.xa.PGXADataSource''<''/xa-datasource-class> ''<''/driver> ''<''/drivers> ''<''/datasources>

wildfly-10.0.0.Final\modules\system\layers\base\org\postgresql\main\module.xml

''<''?xml version="1.0" encoding="UTF-8"?> ''<''module xmlns="urn:jboss:domain:datasources:2.0" name="org.postgresql"> '' <''resources> ''<''resource-root path="postgresql-9.4.1208.jar"/> ''<''/resources> ''<''dependencies> '' <''module name="javax.api"/> ''<''module name="javax.transaction.api"/> ''<''/dependencies> ''<''/module>

4 respostas

Já resolvi, era uma configuração no Wildfly, eu apaguei a datasource default, mas no modulo EE faz referencia a ele, ai apontei par o meu datasource e funcionou.

Olá Diogo, estou com o mesmo problema a dias..... é necessário apagar o datasource default? Poderia explicar melhor?????

Oi, não precisa apagar, no meu caso estava dando erro porque eu apaguei o default, o que pode fazer para tentar solucionar e ir na configuração EE no wildfly e apontar para o seu datasource.

O datasource consegui configurar, gerou as tabela. Esta dando esse erro na hora de gravar:

13:00:44,130 INFO  [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
13:00:44,458 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
13:00:44,581 INFO  [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
13:00:46,875 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found linkstvmorena.war in deployment directory. To trigger deployment create a file called linkstvmorena.war.dodeploy
13:00:46,913 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
13:00:46,951 INFO  [org.xnio] (MSC service thread 1-6) XNIO version 3.4.0.Final
13:00:46,963 INFO  [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.4.0.Final
13:00:47,114 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 53) WFLYSEC0002: Activating Security Subsystem
13:00:47,134 INFO  [org.jboss.as.security] (MSC service thread 1-1) WFLYSEC0001: Current PicketBox version=4.9.6.Final
13:00:47,133 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
13:00:47,139 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
13:00:47,156 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 44) WFLYJSF0007: Activated the following JSF Implementations: [main]
13:00:47,168 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 56) WFLYWS0002: Activating WebServices Extension
13:00:47,154 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
13:00:47,154 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0001: Activating Infinispan subsystem.
13:00:47,305 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming Subsystem
13:00:47,331 INFO  [org.jboss.as.connector] (MSC service thread 1-4) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.4.Final)
13:00:47,346 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0003: Undertow 1.4.0.Final starting
13:00:47,358 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = h2
13:00:47,363 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.4)
13:00:47,364 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0018: Started Driver service with driver-name = postgres
13:00:47,490 INFO  [org.jboss.as.naming] (MSC service thread 1-8) WFLYNAM0003: Starting Naming Service
13:00:47,491 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-8) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
13:00:47,690 INFO  [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing.
13:00:47,690 INFO  [org.jboss.as.ejb3] (MSC service thread 1-1) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host.
13:00:47,705 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path 'C:\Users\e.cleiton.silva\wildfly-10.1.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
13:00:48,161 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0012: Started server default-server.
13:00:48,170 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0018: Host default-host starting
13:00:48,178 INFO  [org.jboss.remoting] (MSC service thread 1-6) JBoss Remoting version 4.0.21.Final
13:00:48,342 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
13:00:48,558 WARN  [org.jboss.as.domain.management.security] (MSC service thread 1-5) WFLYDM0111: Keystore C:\Users\e.cleiton.silva\wildfly-10.1.0.Final\standalone\configuration\application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
13:00:48,602 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) WFLYDS0013: Started FileSystemDeploymentService for directory C:\Users\e.cleiton.silva\wildfly-10.1.0.Final\standalone\deployments
13:00:48,626 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "linkstvmorena.war" (runtime-name: "linkstvmorena.war")
13:00:49,004 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) WFLYJCA0001: Bound data source [java:jboss/datasources/PostgresDS]
13:00:49,013 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
13:00:49,091 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-2) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.4.Final
13:00:49,229 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 58) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
13:00:49,236 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 60) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
13:00:49,241 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 60) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
13:00:49,241 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 58) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
13:00:49,354 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 58) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
13:00:49,355 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 58) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
13:00:49,839 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
13:00:50,011 INFO  [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6) 
13:00:50,860 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) WFLYJPA0002: Read persistence.xml for linkstvmorena
13:00:51,053 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'linkstvmorena.war#linkstvmorena'
13:00:51,096 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 59) HHH000204: Processing PersistenceUnitInfo [
    name: linkstvmorena
    ...]
13:00:51,118 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment linkstvmorena.war
13:00:51,221 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.2.4.Final
13:00:51,237 INFO  [org.hibernate.Version] (ServerService Thread Pool -- 59) HHH000412: Hibernate Core {5.0.10.Final}
13:00:51,239 INFO  [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 59) HHH000206: hibernate.properties not found
13:00:51,242 INFO  [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 59) HHH000021: Bytecode provider name : javassist
13:00:51,298 INFO  [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 59) HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
13:00:51,761 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.4)
13:00:51,801 INFO  [org.jboss.weld.Version] (MSC service thread 1-5) WELD-000900: 2.3.5 (Final)
13:00:51,843 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = linkstvmorena.war_org.postgresql.Driver_9_4
13:00:52,062 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'linkstvmorena.war#linkstvmorena'
13:00:52,307 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 59) HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
13:00:52,527 INFO  [org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl] (ServerService Thread Pool -- 59) HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
13:00:52,532 INFO  [org.hibernate.type.BasicTypeRegistry] (ServerService Thread Pool -- 59) HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@54a7fb6c
13:00:52,540 INFO  [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 59) Envers integration enabled? : true
13:00:53,364 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 59) HHH000228: Running hbm2ddl schema update
13:00:54,650 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 59) Inicializando Mojarra 2.2.13.SP1 20160303-1204 para o contexto '/linkstvmorena'
13:00:56,118 INFO  [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 59) Running on PrimeFaces 5.3
13:00:56,148 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 59) WFLYUT0021: Registered web context: /linkstvmorena
13:00:56,206 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "linkstvmorena.war" (runtime-name : "linkstvmorena.war")
13:00:56,479 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
13:00:56,480 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
13:00:56,480 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 12864ms - Started 440 of 688 services (405 services are lazy, passive or on-demand)