Return-Path: X-Original-To: apmail-isis-users-archive@www.apache.org Delivered-To: apmail-isis-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A3E08101AE for ; Wed, 5 Feb 2014 14:23:50 +0000 (UTC) Received: (qmail 3489 invoked by uid 500); 5 Feb 2014 14:23:50 -0000 Delivered-To: apmail-isis-users-archive@isis.apache.org Received: (qmail 3380 invoked by uid 500); 5 Feb 2014 14:23:44 -0000 Mailing-List: contact users-help@isis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@isis.apache.org Delivered-To: mailing list users@isis.apache.org Received: (qmail 3371 invoked by uid 99); 5 Feb 2014 14:23:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 14:23:42 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.216.41] (HELO mail-qa0-f41.google.com) (209.85.216.41) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 14:23:35 +0000 Received: by mail-qa0-f41.google.com with SMTP id w8so604070qac.14 for ; Wed, 05 Feb 2014 06:23:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=a74LYe4Du5Gh2JafRbpC2wxZuni2fTvhTmvkhksktIE=; b=UWzV7/e/Gi1Y8gL+CLAnNoIHk4ml9bqUxz16IalN16zi77VwMMNXBDxGhQeiEDVdKB xjm+W6UmfZzDGrYJGeyaQov5Y+XVFs5rRw9zPhB51q8A48JHzFQBVPE68pwnNFKJ8w6p aEDPF6nTcqqLFTQgkUUrNdmkS3LwPZgo0vXrifk0WpGPl2aDQVer+4SXdFAEmjPwKW1+ 0z4W1xg+D7mFV9/gT77J6rHYuDZ187w/Li1VEcwJJ4Phq6ffCtv5hvYtZ4oPvJo0xXPG 46mAGYCeeYGZO1u5ZX7CnMmFTBD+07ChU7VA/92tnjXZgrgvqwRzYnersxyuOMJwpQNh ACvg== X-Gm-Message-State: ALoCoQkh585mc4Quy8IeBVP4MhEpAhjBqjS/gYn7AS0dPe7OlhYR11in07CcMipp7LyyQhE0v7Z0 X-Received: by 10.140.88.112 with SMTP id s103mr2719891qgd.47.1391610194031; Wed, 05 Feb 2014 06:23:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.37.83 with HTTP; Wed, 5 Feb 2014 06:22:53 -0800 (PST) X-Originating-IP: [193.178.95.4] In-Reply-To: <24796235A2F23E4DABCBF8D28DD0B6120150B87C@DEERLM99EX1MSX.ww931.my-it-solutions.net> References: <24796235A2F23E4DABCBF8D28DD0B6120150B7FE@DEERLM99EX1MSX.ww931.my-it-solutions.net> <24796235A2F23E4DABCBF8D28DD0B6120150B87C@DEERLM99EX1MSX.ww931.my-it-solutions.net> From: Dan Haywood Date: Wed, 5 Feb 2014 14:22:53 +0000 Message-ID: Subject: Re: Domain create table issue To: users Content-Type: multipart/alternative; boundary=001a11c117ce48724704f1a97fad X-Virus-Checked: Checked by ClamAV on apache.org --001a11c117ce48724704f1a97fad Content-Type: text/plain; charset=ISO-8859-1 On 5 February 2014 13:47, Chohan, Dharmesh wrote: > Hi Dan > > I could not see the CREATE TABLE for the domain in the logging. > OK. Although DataNucleus will lazily create tables on first use, we've found a few issues with that if subtypes of classes are only discovered lazily. So we find it a good idea to force the creation of all entities. The website explains how to do this [1]. Do you have this configuration? > > The application works fine, the error was produced when installing the > fixture from wicket viewer Prototyping->Install fixtures. The error was > caused by calling the isisJdoSupport.executeUpdate("delete from > \"TopUpAmount\"") > > > I have removed the line isisJdoSupport.executeUpdate("delete from > \"TopUpAmount\"") and now it does not throw the error. It seems the table > is created on first use of the domain. > > OK... understood... the table didn't exist because it was lazily created, but the fixture you were running eagerly expected it to be there. In which case the RegisterEntities should sort things out. Cheers Dan > Regards > Dharmesh > > [1] https://isis.apache.org/components/objectstores/jdo/eagerly-registering-entities.html > -----Original Message----- > From: Dan Haywood [mailto:dan@haywood-associates.co.uk] > Sent: Wednesday, February 05, 2014 12:33 PM > To: users > Subject: Re: Domain create table issue > > On 5 February 2014 11:14, Chohan, Dharmesh > wrote: > > > Hi > > > > I have added a new domain as below and when I check the output it does > > not create the table for that domain. The problem comes when > > installing the fixture and running the command > > isisJdoSupport.executeUpdate("delete from > > \"TopUpAmount\"") > > > > I don't quite follow this. > > Do you see the 'CREATE TABLE' statement in the logging? If so, then we > know that the JDO/DN annotations are correct. > > > To confirm, if you comment out the fixture setup, does Isis boot up ok? > > If it does, then check the output; I'm guessing that there might be an > issue with the table name; that could be dependent on the JDBC driver you > are dependent on. Postgres requires the double quotes to be escaped, > others support [square brackets] etc. > > > > > > > [snip] > > @ObjectType("TopUp Amount") > > @Bookmarkable > > public class TopUpAmount implements Comparable { .... } > > > > > > > ~~~ > Also, not sure if it's your issue, but there shouldn't be a space in the > @ObjectType value. That gets used internally to create the OID of the > object, and could be causing a problem later on > > Let us know > > Dan > > > > > > For all other domains ISIS creates a table for them. > > > > > > Any ideas. > > > > Thanks > > Dharmesh > > > > > > > > > > > --001a11c117ce48724704f1a97fad--