I'm afraid I can only be of limited help. We use Hibernate with two
separate databases, MS SQL & H2. We use Hibernate 3.3 with
annotations 3.2, I believe. So it can work. The largest difference
between our setups is that we configure Hibernate with either
hibernate.cfg.xml or through Spring's applicationContext.xml.
The one thing I did notice... have you explicitly set the schemaUpdate
property to true? It seems like it's trying to create it, so that may
not be the issue, but at least it's a start.
Also, if you switch the dialect & jdbcURL to another database, but
leave the rest of your configuration the same... does it auto-create
that database? It would at least rule out H2 (or H2+Hibernate) as the
problem.
On Oct 23, 10:35 am, "Limbic System" <
limbicsys...@gmail.com> wrote:
> Hi folks,
>
> I'm having trouble integrating H2 with Hibernate & PostgreSQL. To be honest
> I'm not sure this is truly an H2 issue or a Hibernate one. The background
> is that we have a rather large legacy infrastructure built around Postgres
> and Hibernate. All of our "unit" tests are really functional tests that
> actually exercise Postgres. I'm trying to change them (or at least add new
> ones) so that they can talk to an H2 or HSQLDB in-memory database, both for
> speed and independence from the DB. I've been stymied by a couple of
> problems.
> The principal issue is that Hibernate doesn't seem to auto-generate schemas
> if you use JPA-style annotations and a non-default schema. I tried applying
> a patch <
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1853>