Solucionado (ver solução)
Solucionado
(ver solução)
7
respostas

Deploy no WildFly com Spring FrameWork 20:03:07,734 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "Sistema.war")]) - failure description: {

Fala ai , galera !!!!

Alguém sabe o efeito desse erro no WildFly da RedHat , valeu !!!

20:03:07,734 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "Sistema.war")]) - failure description: {
7 respostas

Fala Marcio, tudo bem?

Tem mais informações no stack completo desse erro que está dando no seu wildfly?

Boa Noite , Otávio vou colocar a Stack por completo do erro , acredito que deva fazer o redeployment para start o arquivo War , segue a Stack.

20:03:07,734 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "Sistema.war")]) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.datasources.base_usuarioDS"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
        "jboss.persistenceunit.\"Sistema.war#PERSISTENCE_UNIT\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.base_usuarioDS]",
        "jboss.persistenceunit.\"Sistema.war#PERSISTENCE_UNIT\" is missing [jboss.naming.context.java.jboss.datasources.base_usuarioDS]"
    ]
}
20:03:08,713 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 65) WFLYSRV0010: Deployed "Sistema.war" (runtime-name : "Sistema.war")
20:03:08,720 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184:    New missing/unsatisfied dependencies:
      service jboss.naming.context.java.jboss.datasources.base_usuarioDS (missing) dependents: [service jboss.persistenceunit."Sistema.war#PERSISTENCE_UNIT".__FIRST_PHASE__, service jboss.persistenceunit."Sistema.war#PERSISTENCE_UNIT"] 
WFLYCTL0448: 37 additional services are down due to their dependencies being missing or failed
20:03:09,566 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
20:03:09,571 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
20:03:09,571 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
20:03:09,572 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) started (with errors) in 228257ms - Started 515 of 769 services (38 services failed or missing dependencies, 374 services are lazy, passive or on-demand)

Pelo erro, o Wildfly não está conseguindo achar/configurar o datasource com nome "base_usuarioDS"

New missing/unsatisfied dependencies:
      service jboss.naming.context.java.jboss.datasources.base_usuarioDS

Como ficou seu standalone.xml e as classes Java de conexão?

Otávio Boa tarde, segue o codigo da Classe Repository, outra pergunta o base_usuarioDS tem que estar configurado no MyQL ???? Codigo abaixo:

package br.com.ciceroednilson.repository;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;
import org.springframework.stereotype.Repository;

import br.com.ciceroednilson.model.UsuarioModel;

/**
 * @author: cicero.ednilson
 * 
 * CLASSE QUE VAI REALIZAR A PERSISTÊNCIA DO NOSSO OBJETO UsuarioModel NO BANCO DE DADOS.
 * 
 * 
 */
@Repository
public class UsuarioRepository {

    /**
     * @PersistenceContext é o local onde ficam armazenados as entidades 
     * que estão sendo manipuladas pelo EntityManager
     * 
     * 
     *@PersistenceContext(type = PersistenceContextType.EXTENDED) assim o Wildfly vai 
     *gerenciar    para nos as entidades.
     * 
     **/
    @PersistenceContext(type = PersistenceContextType.EXTENDED)
    private EntityManager manager;


    /**
     * 
     * @param usuarioModel
     * 
     * Salva um novo registro
     * 
     * O JPA exige um contexto de transação para realizar as alterações, por isso vamos
     * usar a anotação @javax.transaction.Transactional
     *  
     * */
    @javax.transaction.Transactional
    public void Salvar(UsuarioModel usuarioModel){

        manager.persist(usuarioModel);        
    }

    /**
     * 
     * @param usuarioModel
     * 
     * Realiza a alteração de um registro
     */
    @javax.transaction.Transactional
    public void Alterar(UsuarioModel usuarioModel){

        manager.merge(usuarioModel);        
    }

    /**
     * 
     * @param codigo
     * @return UsuarioModel
     * 
     * Consulta um usuário por código
     */    
    public UsuarioModel ConsultarPorCodigo(int codigo){

        return manager.find(UsuarioModel.class, codigo);        
    } 

    /**
     * 
     * @param codigo
     * 
     * Exclui um usuário pelo código
     */
    @javax.transaction.Transactional
    public void Excluir(int codigo){

        UsuarioModel usuarioModel = this.ConsultarPorCodigo(codigo);

        manager.remove(usuarioModel);

    }

    /**
     * 
     * @return List<UsuarioModel>
     * 
     * Consulta todos os usuários cadastrados no banco de dados
     */
    public List<UsuarioModel> TodosUsuarios(){

        return manager.createQuery("SELECT c FROM UsuarioModel c ORDER BY c.nome ", UsuarioModel.class).getResultList();    
    }

}

Otávio,

Eu estou revendo as configurações nos arquivos , que você mencionou, e verificando o ambiente de persistencia, quando resolver já retorno uma resposta, obrigado por dar umas dicas ai .

Até ;)

Boa Noite , Otávio !!!

Estou com esses Problemas , agora ! Refiz as configurações de persistencia e arquivos que você citou, segue Stack:

21:50:45,581 INFO  [org.jboss.modules] (main) JBoss Modules version 1.9.1.Final
21:50:50,479 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.11.Final
21:50:50,500 INFO  [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final
21:50:51,578 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) starting
21:51:01,747 INFO  [org.wildfly.security] (ServerService Thread Pool -- 28) ELY00001: WildFly Elytron version 1.10.4.Final
21:51:10,029 INFO  [org.jboss.as.controller] (Controller Boot Thread) OPVDX002: falha ao formatar erro de validação: null
21:51:10,055 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
    at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:143)
    at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.ServerService.boot(ServerService.java:385)
    at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:374)
    at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: javax.xml.stream.XMLStreamException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '”' (code 8221 / 0x201d) in start tag Expected a quote
 at [row,col {unknown-source}]: [162,21]
    at org.jboss.as.connector@18.0.1.Final//org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:650)
    at org.jboss.as.connector@18.0.1.Final//org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:204)
    at org.jboss.staxmapper@1.3.0.Final//org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:122)
    at org.jboss.staxmapper@1.3.0.Final//org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69)
    at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.parsing.StandaloneXml_10.parseServerProfile(StandaloneXml_10.java:607)
    at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.parsing.StandaloneXml_10.readServerElement(StandaloneXml_10.java:240)
    at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.parsing.StandaloneXml_10.readElement(StandaloneXml_10.java:137)
    at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:126)
    at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:52)
    at org.jboss.staxmapper@1.3.0.Final//org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:122)
    at org.jboss.staxmapper@1.3.0.Final//org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:76)
    at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:126)
    ... 3 more
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '”' (code 8221 / 0x201d) in start tag Expected a quote
 at [row,col {unknown-source}]: [162,21]
    at org.codehaus.woodstox@5.0.3//com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:653)
    at org.codehaus.woodstox@5.0.3//com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:3122)
    at org.codehaus.woodstox@5.0.3//com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:3043)
    at org.codehaus.woodstox@5.0.3//com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2919)
    at org.codehaus.woodstox@5.0.3//com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1123)
    at org.codehaus.woodstox@5.0.3//com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1204)
    at org.jboss.staxmapper@1.3.0.Final//org.jboss.staxmapper.XMLExtendedStreamReaderImpl.nextTag(XMLExtendedStreamReaderImpl.java:152)
    at org.jboss.as.connector@18.0.1.Final//org.jboss.as.connector.subsystems.datasources.DsParser.parseDataSources(DsParser.java:208)
    at org.jboss.as.connector@18.0.1.Final//org.jboss.as.connector.subsystems.datasources.DsParser.parse(DsParser.java:189)
    at org.jboss.as.connector@18.0.1.Final//org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:643)
    ... 14 more

21:51:10,079 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
21:51:10,315 INFO  [org.jboss.as] (MSC service thread 1-4) WFLYSRV0050: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) stopped in 216ms
solução!

O erro é devido a incompatibilidade entre as versãos do MySQL8 , estava usando a versão do WorkBench 8 e então mudei para versão MySQL 5.7 WorkBench 5, é funcionou o deployment corretamente.