Dear All,
I'm using: hibernate 3.2, firebird 2, jboss 4.0.5 with spring framework and xdoclet for hbm files generating.
System conf:
Hibernate version:3.2
Mapping documents:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping
>
<class
name="pl.my.secret.package.SystemParameter"
table="system_parameters"
>
<id
name="id"
type="java.lang.Long"
>
<column
name="system_parameters_id"
/>
<generator class="native">
</generator>
</id>
<version
name="version"
column="version"
type="java.sql.Timestamp"
/>
<property
name="name"
type="string"
update="true"
insert="true"
>
<column
name="name"
length="255"
not-null="true"
unique="true"
/>
</property>
<property
name="value"
type="string"
update="true"
insert="true"
>
<column
name="content"
length="255"
not-null="true"
/>
</property>
<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-SystemParameter.xml
containing the additional properties and place it in your merge dir.
-->
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():any query
Full stack trace of any exception that occurs:Code:
20:30:48,472 INFO [HibernateTransactionManager] Using DataSource [org.firebirdsql.pool.FBWrappingDataSource@70c242] of Hibernate SessionFactory for HibernateTransactionManager
20:30:48,475 INFO [STDOUT] Hibernate: select this_.system_parameters_id as system1_15_0_, this_.version as version15_0_, this_.name as name15_0_, this_.content as content15_0_ from system_parameters this_ where this_.name=?
20:30:48,478 WARN [JDBCExceptionReporter] SQL Error: 335544569, SQLState: HY000
20:30:48,478 ERROR [JDBCExceptionReporter] GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -204
Table unknown
SYSTEM_PARAMETERS
At line 1, column 162
Name and version of the database you are using:Firebird 2.0-LI-V2.0.1.12810 Firebird 2.0/tcp
The generated SQL (show_sql=true):Code:
select this_.system_parameters_id as system1_15_0_, this_.version as version15_0_, this_.name as name15_0_, this_.content as content15_0_ from system_parameters this_ where this_.name=?
The problem is that when I execute this(above) query with any tool direct on firebird (adding at the end this_.name='query.name') everything is ok.
So database finds this table and returns result. But hibernate don't see it.
I think that it could be firebird problem but I also hope that somebody here will give me some clues ;-)
--
Thanks!
Maciek