Hibernate version: 3.1
Hello,
I am using HSQLDB for unit testing and have a problem. When I run my junit test case I get the following error:
Code:
[junit] Hibernate: select next value for
[junit] REPOSITORY_QUESTION_SEQUENCE
[junit] from dual_
[junit] REPOSITORY_QUESTION_SEQUENCE
[junit] [mrlassist] WARN [main] JDBCExceptionReporter.logExceptions(71) | SQL Error: -22, SQLState: S0002
[junit] [mrlassist] ERROR [main] JDBCExceptionReporter.logExceptions(72) | Table not found in statement [select next value for
[junit] REPOSITORY_QUESTION_SEQUENCE
[junit] from dual_
[junit] REPOSITORY_QUESTION_SEQUENCE
in my hibernate mapping files I have:
Code:
<id name="id" type="integer" unsaved-value="null">
<column name="ID" not-null="true" unique="true"
index=" REPOSITORY_QUESTION_PK" precision="10" scale="0" />
<generator class="seqhilo">
<param name="max_lo">100</param>
<param name="sequence">
REPOSITORY_QUESTION_SEQUENCE
</param>
</generator>
</id>
As you can see, what is happening is that HSQLDialect is taking the sequence name from the mapping file and concatenating it to the string “dual_”, but the tabs or spaces that are in front of the sequence name are not being removed. If I change the sequence name in the mapping file to
Code:
<param name="sequence">REPOSITORY_QUESTION_SEQUENCE</param>
(No tabs or spaces in front of the name), then everything works fine.
Is this a known issue? Is there a way to get around this issue without modifying my mapping files?
I’d appreciate any help.
Code: