Return-Path: Delivered-To: apmail-ofbiz-user-archive@www.apache.org Received: (qmail 20381 invoked from network); 1 Feb 2008 15:20:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Feb 2008 15:20:38 -0000 Received: (qmail 53215 invoked by uid 500); 1 Feb 2008 15:18:37 -0000 Delivered-To: apmail-ofbiz-user-archive@ofbiz.apache.org Received: (qmail 53207 invoked by uid 500); 1 Feb 2008 15:18:37 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Received: (qmail 53196 invoked by uid 99); 1 Feb 2008 15:18:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2008 07:18:37 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.216.176.223] (HELO vsmtp3.tin.it) (212.216.176.223) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2008 15:18:23 +0000 Received: from [192.168.2.10] (87.9.174.220) by vsmtp3.tin.it (7.3.122) id 4676699A13282613 for user@ofbiz.apache.org; Fri, 1 Feb 2008 16:18:12 +0100 Message-ID: <47A338D1.6010000@sastau.it> Date: Fri, 01 Feb 2008 16:20:49 +0100 From: Jacopo Cappellato User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: user@ofbiz.apache.org Subject: Re: Duplicate primary key for Invoice References: <20080201145645.5D43E724954@athena.apache.org> In-Reply-To: <20080201145645.5D43E724954@athena.apache.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, this is annoying and it only happens when you reload demo data (ant run-install) over existing data when you have already created at least one invoice. The problem is that the PartyAcctgPreference.lastInvoiceNumber field (that contains the number of the last invoice) is overriden with 0. This should be fixed in rev. 617515 (however there are probably better ways to manage this stuff). Jacopo William Perng wrote: > I am having the same problem. I did a clean install, but the problem comes > back. > > William > > -----Original Message----- > From: Raj Saini [mailto:rajsaini@gmail.com] > Sent: Thursday, January 31, 2008 5:59 AM > To: user@ofbiz.apache.org > Subject: Re: Duplicate primary key for Invoice > > Are you using derby db? Try doing a clean install, by running ant clean-all. > And you dont need to run the run-install every time. You just need to do it > once. > > Raj > > simmy007 wrote: >> I m getting this same problem when I run the site with the original >> demo data i.e. without filling my custom data. >> I run the command ant run-install to run deploy the code each time. >> >> >> Raj Saini wrote: >> >>> Are using your custom data? Have you changed the company of your store? >>> I had this problem when I had the invoices generated for two >>> different entities. You can prefix invoice numbers with some letters >>> e.g. name of your company. >>> >>> Raj >>> >>> simmy007 wrote: >>> >>>> Hi, >>>> >>>> I am seeing some weird behavior on my ofbiz site. I took the trunk >>>> snapshot today. I start my site by executing the command ant >>>> run-install. I am successfully able to place an order on the site as >>>> a user. As an admin I am able to confirm the order. But when I >>>> restart the server and place a new order it generates the same >>>> invoice-id (CI1) that I had placed earlier. >>>> As a >>>> result as an admin when I go to confirm the order it gives me the >>>> error of "duplicate primary key constraint in Invoice". When I >>>> delete all the existing entries related to invoice from database it >>>> works. Shouldnt ofbiz generated a higher invoice id when restarting >>>> the server? Or am I missing something? >>>> >>>> >>>> >>>> >>> >> >