Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Erro ao startar o servidor com o projeto, após configurar o standalone-full para conexão com o Mysql

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jboss.invocation.proxy.AbstractProxyFactory$1 (jar:file:/C:/Users/rennan.ferreira/eclipse-workspace/5-wildfly-15.0.1.Final/modules/system/layers/base/org/jboss/invocation/main/jboss-invocation-1.5.1.Final.jar!/) to method java.lang.Object.clone()
WARNING: Please consider reporting this to the maintainers of org.jboss.invocation.proxy.AbstractProxyFactory$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
19:19:36,250 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."agendamentoemail-0.0.1-SNAPSHOT.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."agendamentoemail-0.0.1-SNAPSHOT.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "agendamentoemail-0.0.1-SNAPSHOT.war"
    at org.jboss.as.server@7.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:151)
    at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
    at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
    at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
    at org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
    at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
    at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1364)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0041: Component class br.com.alura.dao.AgendamentoEmailDAO for component AgendamentoEmailDAO has errors: 
WFLYJPA0033: Can't find a persistence unit named null in deployment "agendamentoemail-0.0.1-SNAPSHOT.war"
    at org.jboss.as.ee@15.0.1.Final//org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:201)
    at org.jboss.as.ee@15.0.1.Final//org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
    at org.jboss.as.ee@15.0.1.Final//org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:229)
    at org.jboss.as.ee@15.0.1.Final//org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:154)
    at org.jboss.as.server@7.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:144)
    ... 8 more
1 resposta
solução!

Oi RENNAN

Esse problema pode ser pelo local incorreto do arquivo persistence.xml. Por favor, coloque-o dentro do diretório META-INF. Deve ser em /agendamentoemail/src/main/webapp/WEB-INF/classes/META-INF/

Com o valor:

<?xml version="1.0" encoding="UTF-8"?>
<persistence>
   <persistence-unit name="agendamento">

        <jta-data-source>java:jboss/datasources/AgendamentoDS</jta-data-source>
        <properties>
            <property name="javax.persistence.schema-generation.database.action" value="update" />
        </properties>

    </persistence-unit>
</persistence>

Dá uma olhada no projeto disponibilizado nesse link: https://caelum-online-public.s3.amazonaws.com/1156-java-ee-8-ejb-3/02/ejb-aula-2-completa.zip