Serviços não instalados Hibernate PersistenceUnit

20 views
Skip to first unread message

Elienai Vieira Silva Remigio

unread,
May 29, 2017, 3:34:59 PM5/29/17
to caelum-vraptor-en
Boa tarde. 

Depois de efetuar os relacionamentos entre entidades estou tendo problemas com os seguintes erros e não consegui resolver.


13:13:32,663 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "vraptor.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"vraptor.war#default\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"vraptor.war#default\": javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
    Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [create table Beneficiario (id bigint not null, ativo bit not null, cpf varchar(11) not null, data_criacao datetime not null, dataNascimento datetime not null, email varchar(60) not null, endereco varchar(200) not null, nome varchar(100) not null, profissao varchar(50) not null, rg varchar(20) not null, primary key (id)) type=InnoDB]
    Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement \"CREATE TABLE BENEFICIARIO (ID BIGINT NOT NULL, ATIVO BIT NOT NULL, CPF VARCHAR(11) NOT NULL, DATA_CRIACAO DATETIME NOT NULL, DATANASCIMENTO DATETIME NOT NULL, EMAIL VARCHAR(60) NOT NULL, ENDERECO VARCHAR(200) NOT NULL, NOME VARCHAR(100) NOT NULL, PROFISSAO VARCHAR(50) NOT NULL, RG VARCHAR(20) NOT NULL, PRIMARY KEY (ID)) TYPE[*]=INNODB \"; SQL statement:
create table Beneficiario (id bigint not null, ativo bit not null, cpf varchar(11) not null, data_criacao datetime not null, dataNascimento datetime not null, email varchar(60) not null, endereco varchar(200) not null, nome varchar(100) not null, profissao varchar(50) not null, rg varchar(20) not null, primary key (id)) type=InnoDB [42000-173]"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.persistenceunit.\"vraptor.war#default\""],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
13:13:32,712 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "postgresql-9.3-1104.jdbc41.jar" (runtime-name : "postgresql-9.3-1104.jdbc41.jar")
13:13:32,712 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "hsqldb.jar" (runtime-name : "hsqldb.jar")
13:13:32,712 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "vraptor.war" (runtime-name : "vraptor.war")
13:13:32,714 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.persistenceunit."vraptor.war#default": org.jboss.msc.service.StartException in service jboss.persistenceunit."vraptor.war#default": javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory


pom.xml

<modelVersion>4.0.0</modelVersion>

<groupId>vraptor</groupId>
<artifactId>vraptor</artifactId>
<version>1.0</version>
<packaging>war</packaging>

<description>vraptor</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<weld.version>2.1.2.Final</weld.version>
</properties>

<dependencies>
<dependency>
<groupId>br.com.caelum</groupId>
<artifactId>vraptor</artifactId>
<version>4.2.0-RC5</version>
</dependency>

<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<version>5.1.1.Final</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>

<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.18.1-GA</version>
</dependency>

<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-jpa</artifactId>
<version>4.0.5</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.0.Final</version> <!-- Ou outra versão compatível com JPA 2.1 -->
<scope>provided</scope>
</dependency>

<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-java8</artifactId>
<version>4.0.0.Final</version>
</dependency>

<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.sifionsolution</groupId>
<artifactId>vraptor-encryptor</artifactId>
<version>1.0</version> <!-- Check for the latest version -->
</dependency>

<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-simple-validator</artifactId>
<version>4.1.0-RC3</version>
</dependency>

<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.1.0</version>
</dependency>

<dependency>
<groupId>br.com.caelum</groupId>
<artifactId>restfulie</artifactId>
<version>1.0.1</version>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
</dependency>
</dependencies>

<build>
<finalName>vraptor</finalName>
<outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<fork>true</fork>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-parameters</compilerArgument>
<testCompilerArgument>-parameters</testCompilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<path>/</path>
</configuration>
</plugin>

</plugins>
</build>
</project>


Alguem poderia ajudar?

Desde já, obrigado!
Reply all
Reply to author
Forward
0 new messages