HSQLDB and java entity class most common error

Last day, i’m developing an application with hsqldb and java swing with jpa entites classes, and whe i set a primary key or class attribute as int, integer, long or similar number type, when it parsed to sql statment with toplink it’s created as Number instead as integer.

Before i looking many hours in Google i find the solution thanks to this web

The solution is include  in persistence.xml this line:

<property name=“toplink.target-database” value=“HSQL”/>

We need specify to Toplink JPA the target database to HSQL.

But we can specify more types or database as Attunity, Cloudspace, Database, MySQL4, Oracle… You can find the documentation and databases suport in Toplink Essential JPA Extension Reference

3 Comments to “HSQLDB and java entity class most common error”

  1. Binod 12 December 2008 at 6:28 pm #

    You can more information on HSQLDB from below link. You would

    be also come that how to setup the HSQLDB for your project.

    [b]http://binodsuman.blogspot.com/[/b]
    Thanks,

    Binod Suman
    http://binodsuman.blogspot.com/

  2. damiles 12 December 2008 at 9:15 pm #

    Thanks Binod for your comment, good your tutorial about setting HSQLDB, my project was finished, only i have this error in setting, but i solve and create a little proyect but usefull for client.

    Thanks for help.

    In this post I only want other peolple that get same error give a fast solution without explain more about hsqldb

  3. Karlos D7 25 August 2009 at 2:27 pm #

    Thank you. this information was very helpful.


Leave a Reply