I am using Hiberbnate 3.1.3. I have a mapping as below and when I try to insert a record into the TEST_TABLE, I get an Exception: \'Exception in thread \"main\" org.hibernat
If the hibernate default schema is OTHER_SCHEMA then if you do not supply a schema for a table then it will automatically add the default
Solution is you have to add a schema for all table names except one the default. In this case you might be better off if you set the hibernate default to your schema.
Looking at the sequence using max(id) like that is not usually efficient, especially in Oracle which has sequences exactly for this use.