[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hsqldb-user
Subject:    Re: [Hsqldb-user] Problem with sequence between restart of server
From:       "Fred Toussi" <fredt () users ! sourceforge ! net>
Date:       2011-06-20 9:50:38
Message-ID: 1308563438.2214.1465066501 () webmail ! messagingengine ! com
[Download RAW message or body]

Your workaround is fine.

This looks like an issue and will be fixed in the next point release.

Fred

On Mon, 20 Jun 2011 11:37 +0530, j.amit@polaris.co.in wrote:
> 
> Hi
> 
> I am using hsqldb2.2.4 jar and facing problem with sequence number not
> set
> to right value in between server stop.
> 
> My environment details :
> Tomcat5.5
> HSQLDB2.2.4 (with write_delay=false)
> Hiberante3
> 
> In beginning sequence number is 1
> 
> When I first record i get sequence number 1 , for second record i get
> sequence number 2.
> Now I stop/kill tomcat5.5 java instance , when I go to .log file of
> hsqldb
> I can see restart sequence with 2 and insert statement in log
> 
> Now when I start the tomcat again all statement in log file goes to
> script
> file. Now when I try to add new record i get sequence number as 2 which
> causes unique key constraint exception.
> 
> Problem is that if i can continue adding record it give proper sequence
> value but if server is killed/restarted if does increment the last value
> for sequence.
> 
> For solving the problem when server start in static block i am connecting
> to the database and finding max in table and resetting the sequence to
> proper value.  Is this right approach for correcting the sequence number
> or
> I am doing some configuration wrong ?
> 
> Thanks
> 
> Regards
> 
> Amit Jain
> 
> 
> 
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are
> requested to delete this mail immediately. You are also hereby notified
> that any use, any form of reproduction, dissemination, copying,
> disclosure, modification, distribution and/or publication of this e-mail
> message, contents or its attachment other than by its intended
> recipient/s is strictly prohibited.
> 
> Visit us at http://www.polaris.co.in
> 
> 
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
> 

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic