Quantcast
Channel: Programação - GUJ
Viewing all articles
Browse latest Browse all 33093

[Resolvido] Persistência - JPA, Hibernate e JBoss (Wildfly)

$
0
0

@felipe.b31 escreveu:

Bom dia Pessoal, estou tentando rodar o projeto web, mas não consigo sair desse erro ao tentar dar start no Wildfly.

Segue erro:

11:12:25,461 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
11:12:25,671 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
11:12:25,753 INFO  [org.jboss.as] (MSC service thread 1-7) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
11:12:27,563 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment prjDocumentacaoWeb.war
11:12:27,564 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found prjDocumentacaoWeb.war in deployment directory. To trigger deployment create a file called prjDocumentacaoWeb.war.dodeploy
11:12:27,594 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
11:12:27,614 INFO  [org.xnio] (MSC service thread 1-2) XNIO version 3.2.2.Final
11:12:27,624 INFO  [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.2.2.Final
11:12:27,664 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 34) JBAS010280: Activating Infinispan subsystem.
11:12:27,674 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 49) JBAS013171: Activating Security Subsystem
11:12:27,674 INFO  [org.jboss.as.security] (MSC service thread 1-4) JBAS013170: Current PicketBox version=4.0.21.Beta1
11:12:27,684 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 44) JBAS011800: Activating Naming Subsystem
11:12:27,684 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 41) JBAS012615: Activated the following JSF Implementations: [main]
11:12:27,685 INFO  [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 38) JBAS010260: Activating JGroups subsystem.
11:12:27,685 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.5.Final)
11:12:27,706 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 50) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
11:12:27,708 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 33) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
11:12:27,756 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 52) JBAS015537: Activating WebServices Extension
11:12:27,857 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 29) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
11:12:27,897 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) JBAS010417: Started Driver service with driver-name = h2
11:12:27,939 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 29) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
11:12:28,040 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) JBAS010417: Started Driver service with driver-name = com.mysql
11:12:28,040 INFO  [org.jboss.as.naming] (MSC service thread 1-5) JBAS011802: Starting Naming Service
11:12:28,040 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-4) JBAS015400: Bound mail session [java:jboss/mail/Default]
11:12:28,040 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017502: Undertow 1.0.15.Final starting
11:12:28,050 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 51) JBAS017502: Undertow 1.0.15.Final starting
11:12:28,252 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 51) JBAS017527: Creating file handler for path E:\Google Drive\16. Caelum\wildfly-8.1.0.Final/welcome-content
11:12:28,257 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 4.0.3.Final
11:12:28,325 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017525: Started server default-server.
11:12:28,393 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017531: Host default-host starting
11:12:28,672 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) JBAS017519: Undertow AJP listener ajp listening on /0.0.0.0:8009
11:12:28,677 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) JBAS017519: Undertow HTTP listener default listening on /0.0.0.0:8080
11:12:28,734 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 54) MODCLUSTER000001: Initializing mod_cluster version 1.3.0.Final
11:12:28,754 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 54) MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364
11:12:28,806 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) JBAS015012: Started FileSystemDeploymentService for directory E:\Google Drive\16. Caelum\wildfly-8.1.0.Final\standalone\deployments
11:12:28,806 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "prjDocumentacaoWeb.war" (runtime-name: "prjDocumentacaoWeb.war")
11:12:29,253 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:/fj25DS]
11:12:29,253 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
11:12:29,253 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:/documentacaoDS]
11:12:29,427 INFO  [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
11:12:29,701 ERROR [org.jboss.remoting.remote.connection] (XNIO-1 I/O-2) JBREM000200: Remote connection failed: java.io.IOException: An established connection was aborted by the software in your host machine
11:12:30,206 INFO  [org.jboss.weld.deployer] (MSC service thread 1-6) JBAS016002: Processing weld deployment prjDocumentacaoWeb.war
11:12:30,267 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-6) HV000001: Hibernate Validator 5.1.0.Final
11:12:30,524 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named CheckListDAO in deployment unit deployment "prjDocumentacaoWeb.war" are as follows:

	java:global/prjDocumentacaoWeb/CheckListDAO!prjDocumentacaoWeb.dao.CheckListDAO
	java:app/prjDocumentacaoWeb/CheckListDAO!prjDocumentacaoWeb.dao.CheckListDAO
	java:module/CheckListDAO!prjDocumentacaoWeb.dao.CheckListDAO
	java:global/prjDocumentacaoWeb/CheckListDAO
	java:app/prjDocumentacaoWeb/CheckListDAO
	java:module/CheckListDAO

11:12:30,574 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."prjDocumentacaoWeb.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."prjDocumentacaoWeb.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "prjDocumentacaoWeb.war"
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_101]
	at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_101]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component CheckListDAO
	at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:95)
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
	... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014227: EJB CheckListDAO of type prjDocumentacaoWeb.dao.CheckListDAO must have public default constructor
	at org.jboss.as.ejb3.component.EJBValidationConfigurator.configure(EJBValidationConfigurator.java:66)
	at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
	... 6 more

11:12:30,584 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "prjDocumentacaoWeb.war")]) - failure description: {
    "JBAS014671: Failed services" => {"jboss.deployment.unit.\"prjDocumentacaoWeb.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"prjDocumentacaoWeb.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"prjDocumentacaoWeb.war\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component CheckListDAO
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014227: EJB CheckListDAO of type prjDocumentacaoWeb.dao.CheckListDAO must have public default constructor"},
    "JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"prjDocumentacaoWeb.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"prjDocumentacaoWeb.war\".beanmanager]"]
}
11:12:30,644 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 30) JBAS018559: Deployed "prjDocumentacaoWeb.war" (runtime-name : "prjDocumentacaoWeb.war")
11:12:30,644 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.deployment.unit."prjDocumentacaoWeb.war".beanmanager (missing) dependents: [service jboss.deployment.unit."prjDocumentacaoWeb.war".weld.weldClassIntrospector] 
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."prjDocumentacaoWeb.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."prjDocumentacaoWeb.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "prjDocumentacaoWeb.war"

11:12:30,674 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://0.0.0.0:9990/management
11:12:30,674 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://0.0.0.0:9990
11:12:30,674 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.1.0.Final "Kenny" started (with errors) in 5555ms - Started 233 of 364 services (2 services failed or missing dependencies, 166 services are lazy, passive or on-demand)
11:12:30,918 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment prjDocumentacaoWeb.war (runtime-name: prjDocumentacaoWeb.war) in 27ms
11:12:30,969 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "prjDocumentacaoWeb.war" (runtime-name: "prjDocumentacaoWeb.war")
11:12:30,969 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."prjDocumentacaoWeb.war".INSTALL

11:12:35,670 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015003: Found prjDocumentacaoWeb.war in deployment directory. To trigger deployment create a file called prjDocumentacaoWeb.war.dodeploy
`
persistence.xml
`<persistence version="2.1" 
	xmlns="http://xmlns.jcp.org/xml/ns/persistence" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">

	<!-- unidade de persistencia com o nome controlefinancas -->
	<persistence-unit name="documentacao" transaction-type="JTA">
	
		<!-- Implementacao do JPA2, no nosso caso Hibernate -->
		<provider>org.hibernate.ejb.HibernatePersistence</provider>
		
		<jta-data-source>java:/documentacaoDS</jta-data-source>
		
		<!-- Aqui são listadas todas as entidades -->
		<class>prjDocumentacaoWeb.modelo.CheckList</class>
		
		<properties>
			<!-- Configuracoes especificas do Hibernate -->
			<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
			
			<!-- <class>prjDocumentacaoWe.modelo.CheckList<class> -->
			
			<property name="hibernate.show_sql" value="true" />
			<property name="hibernate.format_sql" value="true" />
			
			<!-- poderia ser: update, create, create-drop, none -->
			<property name="hibernate.hbm2ddl.auto" value="update" />
			<!-- 
			<property name="hibernate.cache.use_second_level_cache" value="true"/>
			<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory"/>
			 -->
		</properties>
	</persistence-unit>

</persistence>
`

Mensagens: 4

Participantes: 2

Ler tópico completo


Viewing all articles
Browse latest Browse all 33093


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>