Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JPA and HSQL(Trouble on DB creation)
JPA and HSQL [message #1403500] Thu, 24 July 2014 08:14 Go to next message
Giacomo Guarguaglini is currently offline Giacomo GuarguagliniFriend
Messages: 1
Registered: July 2014
Junior Member
Hi all
I'm new in this task, so maybe my question could be very trivila.
Anyway, I'm trying to use JPA/Eclipselink with embedded HSQL.
All works very fine, I'm able to run tests, to create objects (tables) with attributes, to retrieve them, to execute queries and even to delete all objects.
But I don't see what I expected to see on disk.
My expectation was to see in folder also DB file(s); all I can see is a temp empty dir and 4 file (.lock, ,log, .properties and .script).

Here is my persistence.xml file

<?xml version="1.0" encoding="UTF-8" ?>
<persistence .....>

<!-- EclipseLink -->
<persistence-unit name="Test" transaction-type="RESOURCE_LOCAL">
<description>MIT</description>
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

<class>org.test.jpa.JpaManagedObject</class>
<class>org.test.jpa.JpaManagedRelationship</class>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:file:db/hsql/db"/>
<property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
<property name="javax.persistence.jdbc.user" value="sa"/>
<property name="javax.persistence.jdbc.password" value="*"/>
<property name="eclipselink.target-database" value="HSQL"/>

<property name="eclipselink.ddl-generation" value="create-tables"/>
<property name="eclipselink.create-ddl-jdbc-file-name" value="createDDL_ddlGeneration.jdbc"/>
<property name="eclipselink.drop-ddl-jdbc-file-name" value="dropDDL_ddlGeneration.jdbc"/>
<property name="eclipselink.ddl-generation.output-mode" value="both"/>
</properties>
</persistence-unit>
</persistence>

I'm using EclipseLink 2.5.2 and HSQL 2.3.2.

Is anyone able to help me?

Thanks in advance
Re: JPA and HSQL [message #1403624 is a reply to message #1403500] Thu, 24 July 2014 16:18 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 07/24/2014 07:49 AM, Giacomo Guarguaglini wrote:
> Hi all
> I'm new in this task, so maybe my question could be very trivila.
> Anyway, I'm trying to use JPA/Eclipselink with embedded HSQL.
> All works very fine, I'm able to run tests, to create objects (tables)
> with attributes, to retrieve them, to execute queries and even to delete
> all objects.
> But I don't see what I expected to see on disk. My expectation was to
> see in folder also DB file(s); all I can see is a temp empty dir and 4
> file (.lock, ,log, .properties and .script).
>
> Here is my persistence.xml file
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <persistence .....>
>
> <!-- EclipseLink -->
> <persistence-unit name="Test" transaction-type="RESOURCE_LOCAL">
> <description>MIT</description>
> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
> <class>org.test.jpa.JpaManagedObject</class>
> <class>org.test.jpa.JpaManagedRelationship</class>
> <properties>
> <property name="javax.persistence.jdbc.url"
> value="jdbc:hsqldb:file:db/hsql/db"/>
> <property name="javax.persistence.jdbc.driver"
> value="org.hsqldb.jdbcDriver"/>
> <property name="javax.persistence.jdbc.user" value="sa"/>
> <property name="javax.persistence.jdbc.password" value="*"/>
> <property name="eclipselink.target-database" value="HSQL"/>
>
> <property name="eclipselink.ddl-generation"
> value="create-tables"/>
> <property name="eclipselink.create-ddl-jdbc-file-name"
> value="createDDL_ddlGeneration.jdbc"/>
> <property name="eclipselink.drop-ddl-jdbc-file-name"
> value="dropDDL_ddlGeneration.jdbc"/>
> <property name="eclipselink.ddl-generation.output-mode"
> value="both"/>
> </properties>
> </persistence-unit> </persistence>
>
> I'm using EclipseLink 2.5.2 and HSQL 2.3.2.
>
> Is anyone able to help me?
>
> Thanks in advance

You'll do better asking this in the EclipseLink forum--also an Eclipse
forum--rather than the newcomers' forum.
Previous Topic:Komodo TCL debugger inside eclipse
Next Topic:NIEM
Goto Forum:
  


Current Time: Tue Oct 15 08:27:01 GMT 2019

Powered by FUDForum. Page generated in 0.04055 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top