polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject JOOQ problems
Date Sun, 10 Sep 2017 16:03:40 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message