Subject JPA, Hibernate and Firebird
Author Laurent Duperval
Hi,

I am trying to create an implementation of our JPA application using
Firebird 2, Hibernate and JPA. However, I am running into a few issues,
and I wonder if anyone can help.

The goal is to have an identical implementation for all supported
databases (so far only Postgres but I am trying to get a Firebird
implementation).

These are the main issues I have found so far:

* When I try to create the database (using the JPA automation). I
get this error, and I don't understand what it means:

* 17:46:43,875 WARN [SettingsFactory] Could not obtain connection
metadata
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544344. I/O
error for file %.0s"CreateFile (open)"
null
Error while trying to open file
null
Reason: I/O error for file %.0s"CreateFile (open)"
null
Error while trying to open file
null
at
org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:122)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:131)
at
java.sql.DriverManager.getConnection(DriverManager.java:525)
at
java.sql.DriverManager.getConnection(DriverManager.java:140)
at
org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:
10)
at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
at
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
* I also get an error that says:
javax.persistence.PersistenceException:
org.hibernate.MappingException: Dialect does not support identity
key generation. That, I understand. Is there a way to make this
work without resorting to using a UUID (32 char) generator? Is
there a generator that can be used/defined specifically for
running under Firebird?

For the creation error, I am aware that I could write the whole script
by hand, but I don't really want that. I want to understand what the
error is an how to work around it.

Any help is greatly appreciated!

Thanks,

L


[Non-text portions of this message have been removed]