|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Firebird via hibernate
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"
"(URL address blocked: See forum rules)">
<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='mysupername') everything is ok. So database finds this table and returns result. But hibernate don't see it. Any clues? Thanks! -- Best Regards macieh |
|
#2
|
|||
|
|||
|
cache
This may be due to cache issues..
>Are there known issues with Interbase / Firebird?(Michael Jakl)Yes. Due to some limitations in Interbase / Firebird we must use some workarounds:Always set the size of your statement cache to zero (hibernate.statement_cache.sizeorhibernate.c3p0.max_stat B.T.W, could you let me know which direver and connection setting used connect hibernate to firebird pl. Regards, Raja Nagendra Kumar, C.T.O TejaSoft |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Firebird via hibernate |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|