GUJ Discussões   :   últimos tópicos   |   categorias   |   GUJ Respostas

Problemas com o wildfly


#1

Fala galera, estou estudando java ee pelo livro da casa do código e me deparei com um problema na hora de subir o servidor widfly.

Após realizar uma configuração de xml para setar o meu banco de dados, o console do eclipse passou a retornar o seguinte log:

19:55:12,728 ERROR [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-7) Error during the deployment of java:jboss/datasources/casadocodigoDS: javax.resource.ResourceException: IJ031103: At least one connection property must be defined for datasource-class: com.mysql.jdbc.Driver
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createConnectionFactory(LocalManagedConnectionFactory.java:108)
at org.jboss.jca.deployers.common.AbstractDsDeployer.deployDataSource(AbstractDsDeployer.java:772)
at > org.jboss.jca.deployers.common.AbstractDsDeployer.createObjectsAndInjectValue(AbstractDsDeployer.java:312)
at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer.deploy(AbstractDataSourceService.java:371)
at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:149)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)

19:55:12,745 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service org.wildfly.data-source.casadocodigoDS: org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS
at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:163)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYJCA0032: Unable to start the ds because it generated more than one cf
at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:151)
… 5 more

19:55:12,787 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
19:55:13,610 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-7) WFLYDM0111: Keystore /home/damarium/Documents/Servers/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
19:55:13,870 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) WFLYDS0013: Started FileSystemDeploymentService for directory /home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/deployments
19:55:13,984 INFO [org.wildfly.iiop.openjdk] (MSC service thread 1-3) WFLYIIOP0009: CORBA ORB Service started
19:55:14,036 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of “casadocodigo.war” (runtime-name: “casadocodigo.war”)
19:55:14,136 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 64) AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=/home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/data/activemq/journal,bindingsDirectory=/home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/data/activemq/bindings,largeMessagesDirectory=/home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/data/activemq/largemessages,pagingDirectory=/home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/data/activemq/paging)
19:55:15,017 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 64) AMQ221012: Using AIO Journal
19:55:15,066 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-5) ISPN000128: Infinispan version: Infinispan ‘Chakra’ 8.2.4.Final
19:55:15,184 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 68) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:55:15,188 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 68) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:55:15,195 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 69) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:55:15,197 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 69) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:55:15,190 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 67) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:55:15,211 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 67) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:55:15,430 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
19:55:15,835 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 64) AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
19:55:15,894 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 64) AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
19:55:15,921 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 64) AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
19:55:15,925 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 64) AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
19:55:16,010 INFO [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6)
19:55:16,974 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-4) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor
19:55:16,974 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-8) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor
19:55:16,973 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-3) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor
19:55:16,984 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-5) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor
19:55:17,578 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 64) AMQ221007: Server is now live
19:55:17,578 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 64) AMQ221001: Apache ActiveMQ Artemis Message Broker version 1.1.0.wildfly-017 [nodeID=60b1a9d9-5373-11e7-ada5-c14c72e3fee7]
19:55:17,626 INFO [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool – 64) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
19:55:17,668 INFO [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool – 67) WFLYMSGAMQ0002: Bound messaging object to jndi name java:/ConnectionFactory
19:55:17,670 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 68) AMQ221003: trying to deploy queue jms.queue.DLQ
19:55:17,697 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool – 65) AMQ221003: trying to deploy queue jms.queue.ExpiryQueue
19:55:17,847 INFO [org.jboss.as.jpa] (MSC service thread 1-1) WFLYJPA0002: Read persistence.xml for casadocodigo-dev
19:55:17,850 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-4) WFLYJCA0007: Registered connection factory java:/JmsXA
19:55:18,018 INFO [org.apache.activemq.artemis.ra] (MSC service thread 1-4) Resource adaptor started
19:55:18,019 INFO [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-4) IJ020002: Deployed: file://RaActivatoractivemq-ra
19:55:18,023 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-6) WFLYJCA0002: Bound JCA ConnectionFactory [java:/JmsXA]
19:55:18,024 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-6) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/DefaultJMSConnectionFactory
19:55:18,205 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "casadocodigo.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.persistence.PersistenceException: WFLYJPA0057: PersistenceProvider ‘
org.hibernate.ejb.HibernatePersistence
’ not found
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:1009)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:270)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleWarDeployment(PersistenceUnitServiceHandler.java:203)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:131)
at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:52)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
… 5 more

19:55:18,215 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“deploy”) failed - address: ([(“deployment” => “casadocodigo.war”)]) - failure description: {
“WFLYCTL0080: Failed services” => {“jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE” => "org.jboss.msc.service.StartException in service jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment “casadocodigo.war"
Caused by: javax.persistence.PersistenceException: WFLYJPA0057: PersistenceProvider ‘
org.hibernate.ejb.HibernatePersistence
’ not found”},
“WFLYCTL0412: Required services that are not installed:” => [“jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE”],
“WFLYCTL0180: Services with missing/unavailable dependencies” => undefined
}
19:55:18,220 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“add”) failed - address: ([
(“subsystem” => “datasources”),
(“data-source” => “casadocodigoDS”)
]) - failure description: {
“WFLYCTL0080: Failed services” => {“org.wildfly.data-source.casadocodigoDS” => “org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS
Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYJCA0032: Unable to start the ds because it generated more than one cf”},
“WFLYCTL0412: Required services that are not installed:” => [“org.wildfly.data-source.casadocodigoDS”],
“WFLYCTL0180: Services with missing/unavailable dependencies” => undefined
}
19:55:18,227 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“add”) failed - address: ([
(“subsystem” => “datasources”),
(“data-source” => “casadocodigoDS”)
]) - failure description: {
“WFLYCTL0080: Failed services” => {“org.wildfly.data-source.casadocodigoDS” => “org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS
Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYJCA0032: Unable to start the ds because it generated more than one cf”},
“WFLYCTL0412: Required services that are not installed:” => [
“org.wildfly.data-source.casadocodigoDS”,
“org.wildfly.data-source.casadocodigoDS”
],
“WFLYCTL0180: Services with missing/unavailable dependencies” => undefined
}
19:55:18,280 INFO [org.jboss.as.server] (ServerService Thread Pool – 37) WFLYSRV0010: Deployed “casadocodigo.war” (runtime-name : “casadocodigo.war”)
19:55:18,318 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "casadocodigo.war"
service org.wildfly.data-source.casadocodigoDS: org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS

19:55:18,593 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
19:55:18,594 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
19:55:18,594 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 13697ms - Started 385 of 635 services (4 services failed or missing dependencies, 411 services are lazy, passive or on-demand)
19:55:18,683 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0028: Stopped deployment casadocodigo.war (runtime-name: casadocodigo.war) in 29ms
19:55:18,858 WARN [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0357: Notification of type deployment-undeployed is not described for the resource at the address []
19:55:18,865 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0009: Undeployed “casadocodigo.war” (runtime-name: “casadocodigo.war”)
19:55:18,866 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE
service org.wildfly.data-source.casadocodigoDS: org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS

19:55:23,389 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found casadocodigo.war in deployment directory. To trigger deployment create a file called casadocodigo.war.dodeploy

Alguém saberia me dizer exatamente o que fiz de errado? Até onde vi eu realizei os passos corretamente, mas creio que possa ser um detalhe qual tenha deixado escapar… Como estou acostumado a usar o tomcat, o log do wildfly tem sido um pouco confuso agora no inicio…


#2

No momento em que você estava configurando o DataSource, você deve ter esquecido de fecha alguma tag ou alguma configuração esta faltando. Mexer com diretamente com XML sempre da algum problema.
O jeito mais facil de configurar o DataSource é via interface no browser através do http://localhost:9990/console/ la voce vai poder fazer o deploy do jar do JDBC e ainda configurar de forma mais facil.


#3

Neste caso eu não vejo o que estaria de errado, já que meio que fiz um copy and paste praticamente… na primeira vez eu digitei tudo manualmente, e em uma segunda vez eu copiei e colei o código.

O estranho é ainda ter o log do tal deploy não ocorrer… e eu não sei como fazer isso…

Vou procurar na net como fazer essa etapa, mas acreditava que a aplicação faria isso sozinha…


#4

Cheguei a criar o arquivo casadocodigo.war.dodeploy. Então o servidor tenta lançar a aplicação sozinho, mas mesmo assim, ele falha:

WFLYCTL0186: Services which failed to start: service org.wildfly.data-source.casadocodigoDS: org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS
service jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit.“casadocodigo.war”.FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment “casadocodigo.war”

Estou pensando em largar esse lance de programação para web…
Se for parar pra pensar, nem quando iniciei como programador de hardware eu tive tanto problema como estou passando para programar pra web. Uma coisa é desistir no primeiro passo, outra coisa é não reconhecer que não vai dar certo mesmo.

Sério… já estou uma semana estudando programação web e só falho.


#5

Você configurou corretamente o drver no standalone.xml ?
Adicionou o módulo do driver em modules/system/layers/base/com/mysql/main ?

Encontrei um post da casa do código com o mesmo erro seu, dê uma olhada acredito que aqui tenha a solução:


#6

Oi @aix

No meu projeto, e segundo baseado no livro da casa do codigo, o servidor está setado para trabalhar pelo arquivo standalone-full.xml, e neste caso, sim eu cheguei a configurar tudo certinho. Como eu mencionei, em uma primeira vez, eu escrevi todas as linhas dadas pelo livro, e em uma segunda tentativa, eu copiei e coloquei o código no arquivo.

Quanto ao modulo do driver, eu criei e também está tudo setado certinho.

Cheguei a fazer as etapas mencionadas neste outro forum que você mandou, a quantidade de linhas do log diminuiu porém, as ultimas linhas ainda persiste:

INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) WFLYDS0004: Found casadocodigo.war in deployment directory. To trigger deployment create a file called casadocodigo.war.dodeploy

Particularmente estou bem desmotivado a continuar… nem por conta do projeto em si, mas por conta de já estar nisso praticamente uma semana cara…


#7

calma manu, desiste não, no inicio é assim mesmo, mas tem que funcionar, bom, pode ser o standalone-full.xml sem problemas, ele apenas carrega umas features a mais do container mas funciona da mesma forma que o standalone. Se no log não apresenta erro mas continua não subindo o projeto vamos aumentar o nível do log porque apenas info não nos diz nada, poderia configurar um debug para nós?

        <console-handler name="CONSOLE">
            <level name="DEBUG"/>
            <formatter>
                <named-formatter name="COLOR-PATTERN"/>
            </formatter>
        </console-handler>

Tem como postar o log gerado para que eu possa identificar o problema?
Poderia postar o seu standalone-full.xml?
Poderia também postar o conteúdo do module.xml do mysql?
Qual a versão do container?


#8

Ok…

Estou encaminhando o trecho alterado em meu standalone-full.xml:

    <subsystem xmlns="urn:jboss:domain:datasources:4.0">
        <datasources>
            <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                <driver>h2</driver>
                <security>
                    <user-name>sa</user-name>
                    <password>sa</password>
                </security>
            </datasource>
            
            <datasource
				jndi-name="java:jboss/datasources/casadocodigoDS"
				pool-name="casadocodigoDS" enabled="true" use-java-context="true">
				<connection-url>
					jdbc:mysql://localhost:3306/casadocodigo
				</connection-url>
				<driver>mysql</driver>
				<security>
					<user-name>root</user-name>
					<!-- Caso precise de senha-->
					<password>u98h7w</password>
				</security>
				</datasource>
            
            <drivers>
                <driver name="h2" module="com.h2database.h2">
                    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                </driver>
                
                <driver name="mysql" module="com.mysql">
					<datasource-class>com.mysql.jdbc.Driver</datasource-class>
				</driver>
                
            </drivers>
        </datasources>
    </subsystem>

Abaixo está meu module.xml:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="com.mysql">
    <resources>
        <resource-root path="mysql-connector-java-5.1.35.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
    </dependencies>
</module>

A versão do container eu não sei dizer exatamente… pq no livro o projeto é gerado via jboss forge, pelo menos na configuração passada o jsf é 2.2 e cdi 1.1… não sei se isso ajuda.

Eu aproveitei para apagar todo o projeto e começar de novo… desta vez a única mudança que fiz foi na versão do driver qual antes eu estava usando a versão mais atual, e agora estou usando a mesma versão do livro, e o log do console mundou:

23:13:10,736 ERROR [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-6) Error during the deployment of java:jboss/datasources/casadocodigoDS: javax.resource.ResourceException: IJ031103: At least one connection property must be defined for datasource-class: com.mysql.jdbc.Driver
	at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createConnectionFactory(LocalManagedConnectionFactory.java:108)
	at org.jboss.jca.deployers.common.AbstractDsDeployer.deployDataSource(AbstractDsDeployer.java:772)
	at org.jboss.jca.deployers.common.AbstractDsDeployer.createObjectsAndInjectValue(AbstractDsDeployer.java:312)
	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer.deploy(AbstractDataSourceService.java:371)
	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:149)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)

23:13:10,748 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service org.wildfly.data-source.casadocodigoDS: org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS
	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:163)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYJCA0032: Unable to start the ds because it generated more than one cf
	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:151)
	... 5 more

23:13:10,777 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
23:13:10,889 INFO  [org.wildfly.iiop.openjdk] (MSC service thread 1-3) WFLYIIOP0009: CORBA ORB Service started
23:13:11,365 WARN  [org.jboss.as.domain.management.security] (MSC service thread 1-3) WFLYDM0111: Keystore /home/damarium/Documents/Servers/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
23:13:11,512 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) WFLYDS0013: Started FileSystemDeploymentService for directory /home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/deployments
23:13:11,584 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=/home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/data/activemq/journal,bindingsDirectory=/home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/data/activemq/bindings,largeMessagesDirectory=/home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/data/activemq/largemessages,pagingDirectory=/home/damarium/Documents/Servers/wildfly-10.1.0.Final/standalone/data/activemq/paging)
23:13:11,754 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221012: Using AIO Journal
23:13:12,225 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-5) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.4.Final
23:13:12,372 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 73) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
23:13:12,378 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 73) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
23:13:12,366 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 65) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
23:13:12,356 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 71) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
23:13:12,394 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 65) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
23:13:12,394 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 71) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
23:13:12,510 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTPS listener https listening on 0.0.0.0:8443
23:13:12,658 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
23:13:12,680 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
23:13:12,717 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
23:13:12,726 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
23:13:12,759 INFO  [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6) 
23:13:13,534 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-3) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor
23:13:13,535 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-2) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor
23:13:13,536 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-5) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor
23:13:13,537 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-7) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor
23:13:13,656 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221007: Server is now live
23:13:13,660 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221001: Apache ActiveMQ Artemis Message Broker version 1.1.0.wildfly-017 [nodeID=23bdb4a2-53c4-11e7-b80c-f770ce969836] 
23:13:13,671 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 71) AMQ221003: trying to deploy queue jms.queue.ExpiryQueue
23:13:13,724 INFO  [org.apache.activemq.artemis.jms.server] (ServerService Thread Pool -- 70) AMQ121005: Invalid "host" value "0.0.0.0" detected for "http-connector" connector. Switching to "d3dsec". If this new address is incorrect please manually configure the connector to use the proper one.
23:13:13,766 INFO  [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 70) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
23:13:13,768 INFO  [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 65) WFLYMSGAMQ0002: Bound messaging object to jndi name java:/ConnectionFactory
23:13:13,770 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221003: trying to deploy queue jms.queue.DLQ
23:13:13,818 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-5) WFLYJCA0007: Registered connection factory java:/JmsXA
23:13:13,913 INFO  [org.apache.activemq.artemis.ra] (MSC service thread 1-5) Resource adaptor started
23:13:13,916 INFO  [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-5) IJ020002: Deployed: file://RaActivatoractivemq-ra
23:13:13,920 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-2) WFLYJCA0002: Bound JCA ConnectionFactory [java:/JmsXA]
23:13:13,921 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-2) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/DefaultJMSConnectionFactory
23:13:13,925 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "casadocodigoDS")
]) - failure description: {
    "WFLYCTL0080: Failed services" => {"org.wildfly.data-source.casadocodigoDS" => "org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS
    Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYJCA0032: Unable to start the ds because it generated more than one cf"},
    "WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.data-source.casadocodigoDS"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
23:13:13,931 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "casadocodigoDS")
]) - failure description: {
    "WFLYCTL0080: Failed services" => {"org.wildfly.data-source.casadocodigoDS" => "org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS
    Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYJCA0032: Unable to start the ds because it generated more than one cf"},
    "WFLYCTL0412: Required services that are not installed:" => [
        "org.wildfly.data-source.casadocodigoDS",
        "org.wildfly.data-source.casadocodigoDS"
    ],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
23:13:13,977 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service org.wildfly.data-source.casadocodigoDS: org.jboss.msc.service.StartException in service org.wildfly.data-source.casadocodigoDS: WFLYJCA0033: Error during the deployment of casadocodigoDS

23:13:14,153 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
23:13:14,154 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
23:13:14,155 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 10126ms - Started 373 of 622 services (3 services failed or missing dependencies, 409 services are lazy, passive or on-demand)
23:13:19,782 INFO  [org.jboss.as.protocol] (management task-7) WFLYPRT0057:  cancelled task by interrupting thread Thread[management-handler-thread - 2,5,management-handler-thread]
23:13:22,580 INFO  [org.jboss.as.protocol] (management I/O-2) WFLYPRT0057:  cancelled task by interrupting thread Thread[management-handler-thread - 3,5,management-handler-thread]

#9

faça um teste por favor declarando o driver assim:

<driver name="mysql" module="com.mysql">
     <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>

#10

Bom dia @aix a linha que você me passou não gerou mais logs de erros ou coisas do tipo.
Contudo logo após do servidor subir, a thread é cancelada por algum fator:

 09:30:00,532 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 10267ms - Started 377 of 622 services (409 services are lazy, passive or on-demand)
09:30:04,199 INFO  [org.jboss.as.protocol] (management task-10) WFLYPRT0057:  cancelled task by interrupting thread Thread[management-handler-thread - 4,5,management-handler-thread]

Isso causa erro 404 na hora de tentar acessar a aplicação.

Alguma idéia?

Além disso, MUITO OBRIGADO pela ajuda!


#11

configura o debug para podermos ver mais log.


#12

hummm, o modulo não está completo, faça assim:

<?xml version="1.0" encoding="UTF-8"?> 
<module xmlns="urn:jboss:module:1.3" name="com.mysql">
    <resources>
        <resource-root path="mysql-connector-java-5.1.35.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
        <module name="javax.servlet.api" optional="true"/>
    </dependencies>
</module>

#13

\ô/

CONSEGUI!!!

Cara, seguinte, primeiro, fui até meu arquivo persistence.xml e removi todas as quebras de linhas. A partir disso, a minha aplicação começou a aparecer, porém, não chegava a registrar dados no meu banco.

Posteriormente, eu adicionei as linhas restantes no meu module.xml e aí tudo começou a roda =)

Caraca… uma semana…

Sério ontem eu realmente já estava querendo deixar isso de lado…

Bom, vou dar continuidade no livro, e ver se aprendo mais algumas coisas.

@aix obrigado cara pelo tempo e esforço pra me ajudar nessa õ/


#14

Que legal manu que conseguiu, fico feliz :slight_smile: Parabéns pela persistência e não desistir, qualquer coisa estamos ai, abração.


#15

Agora eu não sei qual resposta eu coloco como resolução pq eu fiz tanta coisa… heheheh