Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
2.0
[color=darkred]Hibernate: select nextval ('usuario_id_usuario_seq')
2006-09-17 00:17:41,222 WARN [net.sf.hibernate.util.JDBCExceptionReporter] - <SQL Error: 0, SQLState: 25P02>
2006-09-17 00:17:41,223 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] - <ERROR: current transaction is aborted, commands ignored until end of transaction block>
2006-09-17 00:17:41,223 WARN [net.sf.hibernate.util.JDBCExceptionReporter] - <SQL Error: 0, SQLState: 25P02>
2006-09-17 00:17:41,223 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] - <ERROR: current transaction is aborted, commands ignored until end of transaction block>
net.sf.hibernate.exception.SQLGrammarException: Could not save object
at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30)
at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4110)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:792)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:747)
at br.com.efat2.frw.dao.bo.AlarmeBO.save(AlarmeBO.java:127)
at br.com.efat2.frw.testes.MainTesteUsuarioBO.<clinit>(MainTeste.java:46)
at br.com.efat2.frw.testes.MainTeste.main(MainTeste.java:29)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "hibernate_sequence" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1527)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1311)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:190)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:258)
at net.sf.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:64)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:774)
... 4 more
net.sf.hibernate.exception.GenericJDBCException: Could not save object
at net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:81)
at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30)
at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4110)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:792)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:747)
at br.com.efat2.frw.dao.bo.UsuarioBO.save(UsuarioBO.java:115)
at br.com.efat2.frw.testes.MainTesteUsuarioBO.<clinit>(MainTeste.java:64)
at br.com.efat2.frw.testes.MainTeste.main(MainTeste.java:29)
Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1527)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1311)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:190)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:258)
at net.sf.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:64)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:774)
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html
[/color]