Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D685E200D04 for ; Mon, 11 Sep 2017 21:32:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D4F131609C4; Mon, 11 Sep 2017 19:32:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F27EE1609B7 for ; Mon, 11 Sep 2017 21:32:39 +0200 (CEST) Received: (qmail 35946 invoked by uid 500); 11 Sep 2017 19:32:38 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 35933 invoked by uid 99); 11 Sep 2017 19:32:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Sep 2017 19:32:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 282791A4D9C for ; Mon, 11 Sep 2017 19:32:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ghII2cKrdJc1 for ; Mon, 11 Sep 2017 19:32:36 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D303D60D12 for ; Mon, 11 Sep 2017 19:32:35 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id i189so47425261wmf.1 for ; Mon, 11 Sep 2017 12:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=k/c2+3j0ezg1P0Mw4l0prK5SRI7NnGDBOjdJmfTnsrE=; b=N1bz40GFu9G2E9gpSljv+LFqEpDNf26LYGWtMAb9GjLems6ZsghK4ZxJiim41f6X4H 7YNtFBs4HcxR0KwLzN79KEHTHSa3Zgy+apvlLPftce5hytN77peYwm1h8UUlUm5eO6m9 9CXgiTfXxJ04v0nS5sfsJUA+c18qfHpN2nBe/ZSGTZKov+rI9JfFl+OcTmSaZXXDijU4 oIlnO/YYWw93WMARwjxJoFPI3cU/JZR0tD5aAakahz3zqfdqJ4NWBT6ioWOo9p/pMlDu jfpLwzSwv551cr/XoGahXXOQK2OI8etqyjsX5MfPX246lhJoGXCA1SAmrTXy0gkfkdzg q1/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=k/c2+3j0ezg1P0Mw4l0prK5SRI7NnGDBOjdJmfTnsrE=; b=TyYSJaKeJoPF4w/O4aPi3Fz0dfm6mpg0zzw++gVT3TTTEaLhLE3AZt6/dFdZET03YT 3MgroJgPeXDjWm539WN4omLVeZRfiRcY11ktVp/XYuPyIM3uPSseuHpmUFyQhvY+iX7R Tp/WkCEcPWXpr21vjGd0QwyEF/e04EbeJ97jq6ANhMcJbMFERhhyFndmWTZXKxwQWebs jCxCFx476GKV6z7csBblnpqNRhWt+1K0M68lzvbgog/zD5d9v6SGgTTvnu+uzantP/k9 zOL0Bc2ItVK9wku/r+rYtXG4MAJU7GSeLXLkWEQgJiANDnggMkKMIUva+FZ6qgxJxCGM r1cQ== X-Gm-Message-State: AHPjjUj6euube5Tj08NK8T8UmNwX2YYzjsNxp9uN/DhxUoK5BJsbqP41 wa2aBIWO8r+CaIcBzbFWSlbg99Wi+0aygxc/exA= X-Google-Smtp-Source: AOwi7QBknMbMMRmmy7kL9O6HPc95PA4Mj9NIFYHKEwGkdy7QDqXTyWo6n/Y0ZHoCAJUAfCMbfBx2GADmMNYun8V2yE0= X-Received: by 10.28.146.68 with SMTP id u65mr4239429wmd.28.1505158355179; Mon, 11 Sep 2017 12:32:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.66.211 with HTTP; Mon, 11 Sep 2017 12:32:34 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Kent_S=C3=B8lvsten?= Date: Mon, 11 Sep 2017 21:32:34 +0200 Message-ID: Subject: Re: JOOQ problems To: dev@polygene.apache.org Content-Type: multipart/alternative; boundary="001a1143dfa2175dc40558eefd3a" archived-at: Mon, 11 Sep 2017 19:32:41 -0000 --001a1143dfa2175dc40558eefd3a Content-Type: text/plain; charset="UTF-8" What do you mean by a commit() being executed in the driver ? autocommit turned on as a default? If that is the case, it might be worth checking whether JOOQ could be turning that off - so the schema creation is actually not commit()-ed. On Mon, Sep 11, 2017 at 3:15 AM, Niclas Hedhman wrote: > Yeah, I can also run the commands and it works. There is a connection pool, > but even if it was two different connections, there is a commit() being > executed (yes, in the Driver) and the SCHEMA does NOT show up in the DB > itself. So, I thought it ended up in another database, but if I pre-created > the schema then a "schema already exists" is received, so I know it > actually tries to put it in there. > > > > On Mon, Sep 11, 2017 at 3:03 AM, Stanislav Muhametsin < > stanislav.muhametsin@zest.mail.kapsi.fi> wrote: > > > When I run the following code in PgAdmin's SQL window, it succeeds: > > > > create schema "POLYGENE"; > > create table if not exists "POLYGENE"."TYPES"("_identity" varchar null, > > "_table_name" varchar null, "_created_at" timestamp null, "_modified_at" > > timestamp null); > > > > ("Query returned successfully with no result in 52 msec.", and schema is > > then visible in pgAdmin after refresh.) > > > > So I guess the problem is in JOOQ somewhere... Are you using connection > > pool, and maybe it uses different connection for 2nd statement? That's my > > only guess at this moment, without knowing anything about JOOQ internals. > > > > On 10/09/2017 19:03, Niclas Hedhman wrote: > > > >> Hi, > >> I need to consult some SQL-savvy folks here. > >> > >> I am getting all kinds of errors in my new SQL EntityStore, which is in > >> principle implemented, but not functional. > >> > >> Each of the supported SQL systems have different issues, and it is > >> probably > >> too much to bring all of it here. Let's start with the one that should > be > >> the most SQL-compliant out there, Postgres. > >> > >> I get the following in the log; > >> > >> > >> [@main ] DEBUG org.jooq.tools.LoggerListener - Executing query > >> : create schema "POLYGENE" > >> [@main ] DEBUG org.jooq.tools.LoggerListener - Affected row(s) > >> : 0 > >> [@main ] DEBUG org.jooq.tools.StopWatch - Query executed > : > >> Total: 13.804ms > >> [@main ] DEBUG org.jooq.tools.StopWatch - Finishing > : > >> Total: 14.469ms, +0.664ms > >> [@main ] DEBUG org.jooq.impl.DefaultConnectionProvider - commit > >> > >> [@main ] DEBUG org.jooq.tools.LoggerListener - Executing query > >> : create table if not exists "POLYGENE"."TYPES"("_identity" varchar > >> null, > >> "_table_name" varchar null, "_created_at" timestamp null, "_modified_at" > >> timestamp null) > >> [@main ] DEBUG org.jooq.tools.LoggerListener - Exception > >> > >> org.jooq.exception.DataAccessException: SQL [create table if not exists > >> "POLYGENE"."TYPES"("_identity" varchar null, "_table_name" varchar null, > >> "_created_at" timestamp null, "_modified_at" timestamp null)]; ERROR: > >> schema "POLYGENE" does not exist > >> > >> > >> It tells me that the POLYGENE schema doesn't exist, even though it was > >> created milliseconds earlier (durable but not for very long?). I even > have > >> the schema creation in a transaction (see the "commit"?) to make sure. > >> > >> IF I break before the Schema is created and manually create the Schema > >> from > >> psql, then the Schema creation fails, because it already exists. IF I > >> break > >> after the Schema is created and committed in the code, there is no > Schema > >> in the Postgres DB when checked with psql. > >> > >> Does anyone have a clue of what is going on?? > >> > >> > >> Cheers > >> > > > > > > > -- > Niclas Hedhman, Software Developer > http://polygene.apache.org - New Energy for Java > --001a1143dfa2175dc40558eefd3a--