Powered by Blogger.

Tuesday, November 11, 2008

Tag: , , , , , ,

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

About David Millán Escrivá

David completed his studies in Universidad Politecnica de Valencia in IT with a Master's degree in artificial intelligence, computer graphics, and pattern recognition, focusing on pattern recognition and Computer Vision. David has more than 15 years of experience in IT, with more than ten years of experience in Computer Vision, computer graphics, and pattern recognition, working on different projects and start-ups, applying his knowledge of Computer Vision, optical character recognition, and augmented reality. Co-Author of two OpenCV books and reviewer of few more.

3 comments:

  1. 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/

    ReplyDelete
  2. 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

    ReplyDelete
  3. Thank you. this information was very helpful.

    ReplyDelete