Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0 Beta 4
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using: Firebird 1.5.2 (on Windows XP Professional)
The generated SQL (show_sql=true):
[java] 17:04:17,908 DEBUG SchemaExport:154 - alter table AuctionItem add constraint FK522A9BD61107FE9B foreign key (seller) references AuctionUser
Debug level Hibernate log excerpt:
[java] 17:06:00,746 ERROR SchemaExport:160 - Unsuccessful: alter table AuctionItem add constraint FK522A9BD61107FE9B foreign key (seller) references AuctionUser
[java] 17:06:00,746 ERROR SchemaExport:161 - Resource Exception. unsuccessful metadata update
[java] object AUCTIONUSER is in use
[java] Reason: unsuccessful metadata update
[java] object AUCTIONUSER is in use
I get the above error (and more) when I try to run 'ant eg'.
I've downloaded Hibernate 3.0 B4, Firebird 1.5.2 and JayBird for 1.4 JDK.
I've configured Firebird to expose the UDF's like 'lower' - initially I got a failure from that.
I'm using FirebirdDialect.
In your "Firebird Known Issues" I found this:
"If you are altering tables you should be in single user mode. This
can be achieved by running gfix -shut. It's also sufficient to have
only one database connection open (eg. immediately after starting the
application). If more than one connection is open, you will see
errors like "table is in use". To restart your database use gfix -
online."
I looked at 'gfix -shut' and I think what you're saying is that I
can shut down my database to see if there are other users using it?
But to address the problem itself, what does "you should be in single
user mode" mean? The paragraph above makes sense if only the admin
is altering tables on rare occasions, but I originally started
looking into this because the eg example makes 'alter
table' calls and it's failing.
And if I DO use Firebird in single user mode with Hibernate, does that
make Hibernate less useful in any way? Am I unable to use connection pools, for example?
There are also various failures if I do 'ant junitreport', among which a testcase named legacy.FooBarTest takes a VERY long time and eventually fails saying that an XML file is invalid. (I know, I should name the XML file but I've been waiting for it to fail for about 20 minutes now and I need to go. I'll leave it and you can ask me tomorrow.)
Thanks,
-Jeff