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

Erro ao iniciar Wildfly

Boa noite,

Comecei o curso de CDI, JSF e JSA: Parte I Tudo estava funcionando normalmente, quando adicionar as configurações do DAO, Persistence.xml, alterei o standalone-full.xml começaram os erros.

Ja procurei em tudo que é forum e paginas do google e até agora nada, estou usando a versão 10.x do wildfly igual a video aula.

segue erro no console:

00:01:02,966 INFO  [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final
00:01:03,151 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
00:01:03,223 INFO  [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) starting
00:01:03,905 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.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
    at org.jboss.as.server.ServerService.boot(ServerService.java:356)
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
    at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: org.jboss.as.connector.util.ParserException: IJ010061: Unexpected element: datasources
    at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:637)
    at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:200)
    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
    at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69)
    at org.jboss.as.server.parsing.StandaloneXml_4.parseServerProfile(StandaloneXml_4.java:546)
    at org.jboss.as.server.parsing.StandaloneXml_4.readServerElement(StandaloneXml_4.java:242)
    at org.jboss.as.server.parsing.StandaloneXml_4.readElement(StandaloneXml_4.java:141)
    at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:103)
    at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
    at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
    ... 3 more
Caused by: org.jboss.as.connector.util.ParserException: IJ010061: Unexpected element: datasources
    at org.jboss.as.connector.subsystems.datasources.DsParser.parseDataSources(DsParser.java:254)
    at org.jboss.as.connector.subsystems.datasources.DsParser.parse(DsParser.java:182)
    at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:630)
    ... 14 more

00:01:03,907 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
00:01:03,909 INFO  [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested.
00:01:03,920 INFO  [org.jboss.as] (MSC service thread 1-3) WFLYSRV0050: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) stopped in 5ms

Alguma dica de solução ?

5 respostas

Esse é meu standalone-full.xml:

<subsystem xmlns="urn:jboss:domain:datasources:4.0">
            <datasources>
                <datasources>
                    <datasource jndi-name="java:jboss/datasources/sistemawebDS"
                        pool-name="sistemawebDS" jta="true" enabled="true"
                        use-java-context="true" use-ccm="true">

                        <connection-url>jdbc:mysql://localhost:3306/sistemaweb</connection-url>

                        <connection-property name="DatabaseName">
                            sistemaweb
                        </connection-property>
                        <driver>mysql</driver>
                        <pool>
                            <min-pool-size>10</min-pool-size>
                            <max-pool-size>20</max-pool-size>
                        </pool>
                        <security>
                            <user-name>root</user-name>
                            <password>root</password>
                        </security>
                    </datasource>

                    <drivers>
                        <driver name="mysql" module="com.mysql">
                            <datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</datasource-class>
                        </driver>
                    </drivers>
                </datasources>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
            <deployment-scanner path="deployments"
                relative-to="jboss.server.base.dir" scan-interval="5000"
                runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}" />
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:ee:4.0">
            <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
            <concurrent>
                <context-services>
                    <context-service name="default"
                        jndi-name="java:jboss/ee/concurrency/context/default"
                        use-transaction-setup-provider="true" />
                </context-services>
                <managed-thread-factories>
                    <managed-thread-factory name="default"
                        jndi-name="java:jboss/ee/concurrency/factory/default"
                        context-service="default" />
                </managed-thread-factories>
                <managed-executor-services>
                    <managed-executor-service name="default"
                        jndi-name="java:jboss/ee/concurrency/executor/default"
                        context-service="default" hung-task-threshold="60000"
                        keepalive-time="5000" />
                </managed-executor-services>
                <managed-scheduled-executor-services>
                    <managed-scheduled-executor-service
                        name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default"
                        context-service="default" hung-task-threshold="60000"
                        keepalive-time="3000" />
                </managed-scheduled-executor-services>
            </concurrent>
            <default-bindings context-service="java:jboss/ee/concurrency/context/default"
                datasource="java:jboss/datasources/ExampleDS"
                jms-connection-factory="java:jboss/DefaultJMSConnectionFactory"
                managed-executor-service="java:jboss/ee/concurrency/executor/default"
                managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default"
                managed-thread-factory="java:jboss/ee/concurrency/factory/default" />
        </subsystem>
solução!

Aqui o problema:

<datasources>
                <datasources>

Você duplicou a tag :). Acho que é só tirar uma que vai funcionar ou pelo menos o erro vai mudar.

Alberto, muito obrigado pela ajuda.Realmente funcionou depois que tirei essa tag.

Porém agora o erro é 404 not found na minha pagina. Pode me ajudar a encontrar a solução desse outro erro ?

Oi Pedro, sempre começo pelo básico, 404 quer dizer que o endereço que você está acessando não foi encontrado pelo servidor. A página realmente existe? No log é informado que a aplicação foi corretamente deployada?

Oi Alberto, Realmente a pagina existe, porém o servidor não estava encontrando. Acho que era algum conflito da IDE(Eclipse Oxygen), pois quando refiz a instalação do servidor, plugin, IDE, banco de dados, tudo funcionou corretamente igual no curso. Muito obrigado pela ajuda.