Bom dia galera,
uso um sistema que roda com o BD Postgres 7.4, estou tendando migrar para Postgres 8.3.
A Migração de Driver funcionou, consegui logar no sistema.
Mas…
Tenho uma classe que tem o seguinte atributo
private boolean available = true;
Ao tentar cadastrar um item ocorre o seguinte erro!!
13811 WARN [AWT-EventQueue-0] org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 42804
13812 ERROR [AWT-EventQueue-0] org.hibernate.util.JDBCExceptionReporter - Batch entry 0 insert into tribute (name, aliquot, available, considerable_value, minimum_total_value, tribute_id) values (TESTE, 1.0, 1, 1.0, 1.0, 9) was aborted. Call getNextException to see the cause.
13812 WARN [AWT-EventQueue-0] org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 42804
13812 ERROR [AWT-EventQueue-0] org.hibernate.util.JDBCExceptionReporter - ERROR: column "available" is of type integer but expression is of type boolean
13829 ERROR [AWT-EventQueue-0] org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:179)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:678)
Alguém sabe me ajudar??
Na minha classe tenho o seguinte hbm.xml
<property name="available" type="java.lang.Boolean">
<column name="available" length="3" not-null="true"
sql-type="int"/>
</property>
Mas nada resolveu ERROR: column “available” is of type integer but expression is of type boolean