Ok I removed that from the virtual database configuration and from the
hibernate class to table mapping file.
Now it works from the console application
jdbc:sequoia://aolias.indra.es/ITECBAN_DB (itecban) > insert into
people (first_name, second_name, id) values ('KArlos', 'ElgrenasFas',
people_seq.nextval)
Affected rows: 1
Query executed in 0 s 8 ms .
jdbc:sequoia://aolias.indra.es/ITECBAN_DB (itecban) >
but I still get an error from my java application
Load Driver!
log4j:WARN No appenders could be found for logger
(org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Load Driver!
Exception in thread "main"
org.hibernate.exception.GenericJDBCException: could not get next
sequence value
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at
org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:96)
at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:98)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at
org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at
org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
at com.indra.itecban.hibernatesample.Main.sampleWrite(Main.java:30)
at com.indra.itecban.hibernatesample.Main.main(Main.java:18)
Caused by: org.continuent.sequoia.common.exceptions.driver.DriverSQLException:
Message of cause: Query 3 is not in the list of currently scheduled
queries
at
org.continuent.sequoia.driver.Connection.statementExecuteQuery(Connection.java:2848)
at
org.continuent.sequoia.driver.Statement.executeQuery(Statement.java:467)
at
org.continuent.sequoia.driver.PreparedStatement.executeQuery(PreparedStatement.java:163)
at
org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:75)
... 11 more
Caused by:
org.continuent.sequoia.common.exceptions.driver.protocol.BackendDriverException:
Query 3 is not in the list of currently scheduled queries
I suppose it might be some hibernate to c-jdbc communication problem,
but the same code works without using c-jdbc
best regards
Alfonso
On 11/9/06, Emmanuel Cecchet <[EMAIL PROTECTED]> wrote:
Alfonso Olias Sanz wrote:
> Ok this is it, I guess there is nothing strange?
>
> ...
> <DatabaseSchema schemaName="prbgrid"
> gatherSystemTables="false"/>
>
Could you try without forcing a schema name (just remove the attribute)
to see if the problems comes from here ?
> But why this table is fetched with a select and not with an insert?
Because 'select' parser does not have to lock tables in the schema and
it will not complain if the table does not exist. The parser for
'insert' statements will complain because it has to lock the table.
Hope this helps,
Emmanuel
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia