openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: HSQLDB - problems
Date Mon, 12 Oct 2009 15:59:02 GMT
David-

I'm not quire sure whats going on, but do you have a stack showing the
failure?

Thanks,
Rick

On Sun, Oct 11, 2009 at 6:18 PM, David Beer <david.m.beer@googlemail.com>wrote:

> Hi All
>
> I am trying to create an application using HSQLDB 1.8.1. I have created
> a server database for testing. The problem seems to be that if I run the
> test a second time, it fails saying table already created. Well I would
> expect the table to be created as I didn't tell it drop them.
>
> The thing is that surely it should only be updating the tables if there
> is a change. Not trying to create them each time.
>
> I am using openjpa 1.2.1. Here is a copy of my persistence.xml,
> hopefully someone can see where I am going wrong.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="1.0"
> xmlns="http://java.sun.com/xml/ns/persistence"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
>  <persistence-unit name="PCM-PU" transaction-type="RESOURCE_LOCAL">
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>    <class>pcm.jpa.AddressBook</class>
>    <class>pcm.jpa.Contact</class>
>    <class>pcm.jpa.Address</class>
>    <class>pcm.jpa.ContactInfo</class>
>    <class>pcm.jpa.AdditionalInfo</class>
>    <class>pcm.jpa.IM</class>
>    <properties>
>            <property name="openjpa.ConnectionPassword" value=""/>
>            <property name="openjpa.ConnectionDriverName"
> value="org.hsqldb.jdbcDriver"/>
>            <property name="openjpa.ConnectionUserName" value="sa"/>
>            <!--<property name="openjpa.ConnectionURL"
> value="jdbc:hsqldb:file:./data/pcm"/>-->
>            <property name="openjpa.ConnectionURL"
> value="jdbc:hsqldb:hsql://localhost/xdb"/>
>            <property name="openjpa.Log" value="DefaultLevel=WARN,
> Runtime=INFO, Tool=INFO, SQL=TRACE"/>
>            <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(ForeignKeys=true)"/>
>            <property name="openjpa.jdbc.DBDictionary"
> value="org.apache.openjpa.jdbc.sql.HSQLDictionary"/>
>            <property name="openjpa.jdbc.Schema" value="PCM"/>
>            </properties>
>  </persistence-unit>
> </persistence>
>
> The other issue I am having is that it seems to be ignoring the scheam
> value entered and creating the tables in the PUBLIC schema.
>
> I am simply connecting to the database creating my EntityManager and
> then disconnecting.
>
>
> --
> Thanks
>
> David
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message