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

Não cria tabela

Boa tarde. Estou usando o JBOSS 7.1 e a tabela não é criada.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="auron-persistence-unit" transaction-type="JTA">
    <description>Forge Persistence Unit</description>
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>java:jboss/datasources/auronDS</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
      <property name="hibernate.show_sql" value="true"/>
      <property name="hibernate.format_sql" value="true"/>
      <property name="hibernate.transaction.flush_before_completion" value="true"/>
      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
    </properties>
  </persistence-unit>
</persistence>

15:14:18,598 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-4) HHH000389: Unsuccessful: create table Participante (id integer not null, email varchar(255), nome varchar(255), senha varchar(255), primary key (id)) ENGINE=InnoDB
15:14:18,614 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-4) Syntax error in SQL statement "
    CREATE TABLE PARTICIPANTE (
        ID INTEGER NOT NULL,
        EMAIL VARCHAR(255),
        NOME VARCHAR(255),
        SENHA VARCHAR(255),
        PRIMARY KEY (ID)
    ) ENGINE=[*]INNODB "; expected "identifier"; SQL statement:

    create table Participante (
        id integer not null,
        email varchar(255),
        nome varchar(255),
        senha varchar(255),
        primary key (id)
    ) ENGINE=InnoDB [42001-161]
15:14:18,614 INFO  [stdout] (MSC service thread 1-4) Hibernate: 
15:14:18,614 INFO  [stdout] (MSC service thread 1-4)     create table hibernate_sequence (
15:14:18,614 INFO  [stdout] (MSC service thread 1-4)          next_val bigint 
15:14:18,614 INFO  [stdout] (MSC service thread 1-4)     )
1 resposta
solução!

Testa essa dialeto => org.hibernate.dialect.MySQL5Dialect

To chutando, ok ?

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software