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

Erro final aula 3

Boa tarde, se alguém puder me dar uma luz.... Bom final de semana

16:28:52,559 INFORMAÇÕES [org.jboss.modules] JBoss Modules version 1.1.1.GA
16:28:52,739 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
16:28:52,812 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
16:28:53,627 INFO  [org.xnio] XNIO Version 3.0.3.GA
16:28:53,627 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
16:28:53,635 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
16:28:53,651 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
16:28:53,670 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
16:28:53,674 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
16:28:53,680 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
16:28:53,727 INFO  [org.jboss.as.connector] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
16:28:53,758 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
16:28:53,758 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
16:28:53,758 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
16:28:53,758 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
16:28:53,779 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final
16:28:53,840 INFO  [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service
16:28:53,872 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-6) JBAS015400: Bound mail session [java:jboss/mail/Default]
16:28:53,897 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
16:28:53,905 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
16:28:53,975 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-5) JBoss Web Services - Stack CXF Server 4.0.2.GA
16:28:54,210 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-6) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
16:28:54,367 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory C:\Java\jboss-as-7.1.1.Final\standalone\deployments
16:28:54,383 INFO  [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100: Listening on /127.0.0.1:9999
16:28:54,383 INFO  [org.jboss.as.remoting] (MSC service thread 1-8) JBAS017100: Listening on localhost/127.0.0.1:4447
16:28:54,398 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found livraria.war in deployment directory. To trigger deployment create a file called livraria.war.dodeploy
16:28:54,483 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:/livrariaDS]
16:28:54,483 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
16:28:54,514 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "livraria.war"
16:28:55,584 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) JBAS011401: Read persistence.xml for livraria
16:28:55,595 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."livraria.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."livraria.war".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment "livraria.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_80]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_80]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_80]
Caused by: java.lang.IllegalArgumentException: JBAS011439: Class level javax.persistence.PersistenceContext annotations must provide a name
    at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.processClass(JPAAnnotationParseProcessor.java:207)
    at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.processPersistenceAnnotations(JPAAnnotationParseProcessor.java:127)
    at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.deploy(JPAAnnotationParseProcessor.java:90)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    ... 5 more

16:28:55,595 INFO  [org.jboss.as] (MSC service thread 1-4) JBAS015951: Admin console listening on http://127.0.0.1:9990
16:28:55,595 ERROR [org.jboss.as] (MSC service thread 1-4) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 3303ms - Started 142 of 219 services (1 services failed or missing dependencies, 74 services are passive or on-demand)
16:28:55,595 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "livraria.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"livraria.war\".DEPENDENCIES" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"livraria.war\".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment \"livraria.war\""}}
16:28:55,785 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment livraria.war in 183ms
16:28:55,785 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."livraria.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."livraria.war".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment "livraria.war"

16:28:55,785 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"livraria.war\".DEPENDENCIES" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"livraria.war\".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment \"livraria.war\""}}}}
1 resposta
solução!

Ola Ronney,

Verifique se você está usando a anotação @PersistenceContext em alguma de suas classes.

Diferente de quando você usa esta anotação em um EntityManagerpara fazer injeção de dependências, quando a utiliza em uma classe, é necessário passar um valor para sua propriedade name:

@PersistenceContext(name="nomeParaReferenciaInternaDoContainer")
public class Exemplo{
...
}