Hibernate [RESOLVIDO]

2 respostas
W

Apanhei, mas consegui fazer o hibernate chegar no final...

Só que agora, tá dando o seguinte erro:
2007-03-05 17:21:50,703 WARN  hibernate.util.JDBCExceptionReporter  -> SQL Error: 0, SQLState: 42P01
   2007-03-05 17:21:50,703 ERROR hibernate.util.JDBCExceptionReporter  -> ERROR: relation "hibernate_sequence" does not exist
   Erro: could not get next sequence value
Meu arquivo de mapeamento é assim:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate Mapping DTD 3.0//EN" 
 "hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="CorrespUsr" schema="public" table="corresp_usr">
<id column="usuario" name="usuario" type="long">
<generator class="native"/>
</id>
<property column="nome" length="200" name="nome" type="string"/>
<property column="setor" length="200" name="setor" type="string"/>
<property column="senha" length="20" name="senha" type="string"/>
<property column="status_2" length="4" name="status2" type="integer"/>
</class>
</hibernate-mapping>

Qual foi a minha "cagada"?! hehehe

:lol:

Valeu!

2 Respostas

W

Ah, e se eu troco o generator class por:

Ele muda o erro pra

2007-03-06 09:26:10,109 DEBUG hibernate.jdbc.ConnectionManager -> registering flush end Erro: Could not execute JDBC batch update

Alguém?

Valeu!

:oops:

W

TÁ…

se alguém tiver o mesmo erro, é só configurar o arquivo hibernate.properties com a seguinte instrução:

Valeu aí!

:stuck_out_tongue:

Criado 5 de março de 2007
Ultima resposta 6 de mar. de 2007
Respostas 2
Participantes 1