java.lang.AssertionError: expected 201 code, but got 422
at org.folio.rest.RestVerticleTest.lambda$mutateURLs$13(RestVerticleTest.java:407)
20000 THEN RETURN rows; END IF; q = 'with counter as (' || regexp_replace( query, '\mselect.*?from', 'select null FROM', 'i' ) || ' LIMIT 20000 ), ' || ' count_on as ( SELECT count(*) as count from counter ) ' || ' SELECT count FROM count_on'; EXECUTE q INTO rec; rows := rec."count"; IF rows = 20000 THEN rows = harvard_mod_configuration.count_estimate_smart2(20000, 20000, query); IF rows < 20000 THEN rows = 20000 ; END IF; END IF; RETURN rows; END; $$ LANGUAGE plpgsql IMMUTABLE STRICT;
11 Jan 2018 15:58:32:691 INFO PostgresClient Successfully executed: CREATE OR REPLACE FUNCTION harvard_mod_configuration.count_estimate_smart(query text) RETURNS integer AS $$
DECLARE rec record; rows integer; q text; BEGIN rows = harvard_mod_configuration.count_estimate_smart2(20000 , 20000 , query); IF rows > 20000 THEN RETURN rows; END IF; q = 'with counter as (' || regexp_replace( query, '\mselect.*?from', 'select null FROM', 'i' ) || ' LIMIT 20000 ), ' || ' count_on as ( SELECT count(*) as count from counter ) ' || ' SELECT count FROM count_on'; EXECUTE q INTO rec; rows := rec."count"; IF rows = 20000 THEN rows = harvard_mod_configuration.count_estimate_smart2(20000, 20000, query); IF rows < 20000 THEN rows = 20000 ; END IF; END IF; RETURN rows; END; $$ LANGUAGE plpgsql IMMUTABLE STRICT;
11 Jan 2018 15:58:32:691 INFO PostgresClient trying to execute: CREATE OR REPLACE FUNCTION harvard_mod_configuration.count_estimate_smart_depricated(query text) RETURNS integer AS $$
DECLARE rec record; rows integer; BEGIN FOR rec IN EXECUTE 'EXPLAIN ' || query LOOP rows := substring(rec."QUERY PLAN" FROM ' rows=([[:digit:]]+)'); EXIT WHEN rows IS NOT NULL; END LOOP; IF rows < 20000 THEN EXECUTE regexp_replace( query, '\mselect.*?from', 'select count(*) FROM', 'i' ) INTO rec; rows := rec."count"; END IF; RETURN rows; END; $$ LANGUAGE plpgsql VOLATILE STRICT;
11 Jan 2018 15:58:32:692 INFO PostgresClient Successfully executed: CREATE OR REPLACE FUNCTION harvard_mod_configuration.count_estimate_smart_depricated(query text) RETURNS integer AS $$
DECLARE rec record; rows integer; BEGIN FOR rec IN EXECUTE 'EXPLAIN ' || query LOOP rows := substring(rec."QUERY PLAN" FROM ' rows=([[:digit:]]+)'); EXIT WHEN rows IS NOT NULL; END LOOP; IF rows < 20000 THEN EXECUTE regexp_replace( query, '\mselect.*?from', 'select count(*) FROM', 'i' ) INTO rec; rows := rec."count"; END IF; RETURN rows; END; $$ LANGUAGE plpgsql VOLATILE STRICT;
11 Jan 2018 15:58:32:692 INFO PostgresClient trying to execute: CREATE OR REPLACE FUNCTION f_unaccent(text)
RETURNS text AS $func$ SELECT public.unaccent('public.unaccent', $1) -- schema-qualify function and dictionary $func$ LANGUAGE sql IMMUTABLE;
11 Jan 2018 15:58:32:692 INFO PostgresClient Successfully executed: CREATE OR REPLACE FUNCTION f_unaccent(text)
RETURNS text AS $func$ SELECT public.unaccent('public.unaccent', $1) -- schema-qualify function and dictionary $func$ LANGUAGE sql IMMUTABLE;
11 Jan 2018 15:58:32:692 INFO PostgresClient trying to execute: CREATE TABLE IF NOT EXISTS harvard_mod_configuration.config_data ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), jsonb JSONB NOT NULL );
11 Jan 2018 15:58:32:698 INFO PostgresClient Successfully executed: CREATE TABLE IF NOT EXISTS harvard_mod_configuration.config_data ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), jsonb JSONB NOT NULL );
11 Jan 2018 15:58:32:699 INFO PostgresClient trying to execute: ALTER TABLE harvard_mod_configuration.config_data ADD COLUMN IF NOT EXISTS creation_date timestamp WITH TIME ZONE, ADD COLUMN IF NOT EXISTS created_by text;
11 Jan 2018 15:58:32:703 INFO PostgresClient Successfully executed: ALTER TABLE harvard_mod_configuration.config_data ADD COLUMN IF NOT EXISTS creation_date timestamp WITH TIME ZONE, ADD COLUMN IF NOT EXISTS created_by text;
11 Jan 2018 15:58:32:704 INFO PostgresClient trying to execute: CREATE INDEX IF NOT EXISTS config_data_module_idx ON harvard_mod_configuration.config_data ( lower ( jsonb->>'module' ) ) ;
11 Jan 2018 15:58:32:707 INFO PostgresClient Successfully executed: CREATE INDEX IF NOT EXISTS config_data_module_idx ON harvard_mod_configuration.config_data ( lower ( jsonb->>'module' ) ) ;
11 Jan 2018 15:58:32:707 INFO PostgresClient trying to execute: CREATE INDEX IF NOT EXISTS config_data_default_idx ON harvard_mod_configuration.config_data ( ( jsonb->'default' ) ) ;
11 Jan 2018 15:58:32:715 INFO PostgresClient Successfully executed: CREATE INDEX IF NOT EXISTS config_data_default_idx ON harvard_mod_configuration.config_data ( ( jsonb->'default' ) ) ;
11 Jan 2018 15:58:32:715 INFO PostgresClient trying to execute: CREATE INDEX IF NOT EXISTS config_data_configName_idx_like ON harvard_mod_configuration.config_data ( lower ( jsonb->>'configName' ) text_pattern_ops) WHERE ((jsonb->>'enabled'))::boolean = true;
11 Jan 2018 15:58:32:719 INFO PostgresClient Successfully executed: CREATE INDEX IF NOT EXISTS config_data_configName_idx_like ON harvard_mod_configuration.config_data ( lower ( jsonb->>'configName' ) text_pattern_ops) WHERE ((jsonb->>'enabled'))::boolean = true;
11 Jan 2018 15:58:32:719 INFO PostgresClient trying to execute: CREATE INDEX IF NOT EXISTS config_data_code_idx_like ON harvard_mod_configuration.config_data ( lower ( jsonb->>'code' ) text_pattern_ops) ;
11 Jan 2018 15:58:32:725 INFO PostgresClient Successfully executed: CREATE INDEX IF NOT EXISTS config_data_code_idx_like ON harvard_mod_configuration.config_data ( lower ( jsonb->>'code' ) text_pattern_ops) ;
11 Jan 2018 15:58:32:725 INFO PostgresClient trying to execute: CREATE INDEX IF NOT EXISTS config_data_value_idx_gin ON harvard_mod_configuration.config_data USING GIN ( lower ( f_unaccent( jsonb->>'value' ) ) gin_trgm_ops) ;
11 Jan 2018 15:58:32:725 INFO PostgresClient Successfully executed: CREATE INDEX IF NOT EXISTS config_data_value_idx_gin ON harvard_mod_configuration.config_data USING GIN ( lower ( f_unaccent( jsonb->>'value' ) ) gin_trgm_ops) ;
11 Jan 2018 15:58:32:726 INFO PostgresClient trying to execute: DROP TRIGGER IF EXISTS update_config_data_references ON harvard_mod_configuration.config_data CASCADE;
11 Jan 2018 15:58:32:727 INFO PostgresClient Successfully executed: DROP TRIGGER IF EXISTS update_config_data_references ON harvard_mod_configuration.config_data CASCADE;
11 Jan 2018 15:58:32:729 INFO PostgresClient trying to execute: DROP FUNCTION IF EXISTS update_config_data_references();
11 Jan 2018 15:58:32:729 INFO PostgresClient Successfully executed: DROP FUNCTION IF EXISTS update_config_data_references();
11 Jan 2018 15:58:32:729 INFO PostgresClient trying to execute: DROP TRIGGER IF EXISTS set_id_injson_config_data ON harvard_mod_configuration.config_data CASCADE;
11 Jan 2018 15:58:32:729 INFO PostgresClient Successfully executed: DROP TRIGGER IF EXISTS set_id_injson_config_data ON harvard_mod_configuration.config_data CASCADE;
11 Jan 2018 15:58:32:730 INFO PostgresClient trying to execute: DROP FUNCTION IF EXISTS set_id_injson_config_data();
11 Jan 2018 15:58:32:730 INFO PostgresClient Successfully executed: DROP FUNCTION IF EXISTS set_id_injson_config_data();
11 Jan 2018 15:58:32:730 INFO PostgresClient trying to execute: CREATE OR REPLACE FUNCTION config_data_set_md()
RETURNS TRIGGER AS $$ BEGIN NEW.creation_date = to_timestamp(NEW.jsonb->'metadata'->>'createdDate', 'YYYY-MM-DD"T"HH24:MI:SS.MS'); NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$ language 'plpgsql';
11 Jan 2018 15:58:32:730 INFO PostgresClient Successfully executed: CREATE OR REPLACE FUNCTION config_data_set_md()
RETURNS TRIGGER AS $$ BEGIN NEW.creation_date = to_timestamp(NEW.jsonb->'metadata'->>'createdDate', 'YYYY-MM-DD"T"HH24:MI:SS.MS'); NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$ language 'plpgsql';
11 Jan 2018 15:58:32:730 INFO PostgresClient trying to execute: DROP TRIGGER IF EXISTS set_config_data_md_trigger ON harvard_mod_configuration.config_data CASCADE;
11 Jan 2018 15:58:32:731 INFO PostgresClient Successfully executed: DROP TRIGGER IF EXISTS set_config_data_md_trigger ON harvard_mod_configuration.config_data CASCADE;
11 Jan 2018 15:58:32:731 INFO PostgresClient trying to execute: CREATE TRIGGER set_config_data_md_trigger BEFORE INSERT ON harvard_mod_configuration.config_data FOR EACH ROW EXECUTE PROCEDURE config_data_set_md();
11 Jan 2018 15:58:32:731 INFO PostgresClient Successfully executed: CREATE TRIGGER set_config_data_md_trigger BEFORE INSERT ON harvard_mod_configuration.config_data FOR EACH ROW EXECUTE PROCEDURE config_data_set_md();
11 Jan 2018 15:58:32:732 INFO PostgresClient trying to execute: CREATE OR REPLACE FUNCTION set_config_data_md_json()
RETURNS TRIGGER AS $$ DECLARE createdDate timestamp WITH TIME ZONE; createdBy text ; updatedDate timestamp WITH TIME ZONE; updatedBy text ; injectedId text; BEGIN createdBy = NEW.created_by; createdDate = NEW.creation_date; updatedDate = NEW.jsonb->'metadata'->>'updatedDate'; updatedBy = NEW.jsonb->'metadata'->>'updatedByUserId'; if createdBy ISNULL then createdBy = 'undefined'; end if; if updatedBy ISNULL then updatedBy = 'undefined'; end if; if createdDate IS NOT NULL then injectedId = '{"createdDate":"'||to_char(createdDate,'YYYY-MM-DD"T"HH24:MI:SS.MS')||'" , "createdByUserId":"'||createdBy||'", "updatedDate":"'||to_char(updatedDate,'YYYY-MM-DD"T"HH24:MI:SS.MSOF')||'" , "updatedByUserId":"'||updatedBy||'"}'; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata}' , injectedId::jsonb , false); else NEW.jsonb = NEW.jsonb; end if; RETURN NEW; END; $$ language 'plpgsql';
11 Jan 2018 15:58:32:733 INFO PostgresClient Successfully executed: CREATE OR REPLACE FUNCTION set_config_data_md_json()
RETURNS TRIGGER AS $$ DECLARE createdDate timestamp WITH TIME ZONE; createdBy text ; updatedDate timestamp WITH TIME ZONE; updatedBy text ; injectedId text; BEGIN createdBy = NEW.created_by; createdDate = NEW.creation_date; updatedDate = NEW.jsonb->'metadata'->>'updatedDate'; updatedBy = NEW.jsonb->'metadata'->>'updatedByUserId'; if createdBy ISNULL then createdBy = 'undefined'; end if; if updatedBy ISNULL then updatedBy = 'undefined'; end if; if createdDate IS NOT NULL then injectedId = '{"createdDate":"'||to_char(createdDate,'YYYY-MM-DD"T"HH24:MI:SS.MS')||'" , "createdByUserId":"'||createdBy||'", "updatedDate":"'||to_char(updatedDate,'YYYY-MM-DD"T"HH24:MI:SS.MSOF')||'" , "updatedByUserId":"'||updatedBy||'"}'; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata}' , injectedId::jsonb , false); else NEW.jsonb = NEW.jsonb; end if; RETURN NEW; END; $$ language 'plpgsql';
11 Jan 2018 15:58:32:733 INFO PostgresClient trying to execute: DROP TRIGGER IF EXISTS set_config_data_md_json_trigger ON harvard_mod_configuration.config_data CASCADE;
11 Jan 2018 15:58:32:733 INFO PostgresClient Successfully executed: DROP TRIGGER IF EXISTS set_config_data_md_json_trigger ON harvard_mod_configuration.config_data CASCADE;
11 Jan 2018 15:58:32:733 INFO PostgresClient trying to execute: CREATE TRIGGER set_config_data_md_json_trigger BEFORE UPDATE ON harvard_mod_configuration.config_data FOR EACH ROW EXECUTE PROCEDURE set_config_data_md_json();
11 Jan 2018 15:58:32:733 INFO PostgresClient Successfully executed: CREATE TRIGGER set_config_data_md_json_trigger BEFORE UPDATE ON harvard_mod_configuration.config_data FOR EACH ROW EXECUTE PROCEDURE set_config_data_md_json();
11 Jan 2018 15:58:32:733 INFO PostgresClient trying to execute: CREATE TABLE IF NOT EXISTS harvard_mod_configuration.audit_config_data ( id UUID PRIMARY KEY, orig_id UUID NOT NULL, operation char(1) NOT NULL, jsonb jsonb, created_date timestamp not null );
11 Jan 2018 15:58:32:739 INFO PostgresClient Successfully executed: CREATE TABLE IF NOT EXISTS harvard_mod_configuration.audit_config_data ( id UUID PRIMARY KEY, orig_id UUID NOT NULL, operation char(1) NOT NULL, jsonb jsonb, created_date timestamp not null );
11 Jan 2018 15:58:32:739 INFO PostgresClient trying to execute: CREATE OR REPLACE FUNCTION audit_config_data_changes() RETURNS TRIGGER AS $config_data_audit$
BEGIN IF (TG_OP = 'DELETE') THEN INSERT INTO harvard_mod_configuration.audit_config_data SELECT gen_random_uuid(), OLD.id, 'D', OLD.jsonb, current_timestamp; RETURN OLD; ELSIF (TG_OP = 'UPDATE') THEN INSERT INTO harvard_mod_configuration.audit_config_data SELECT gen_random_uuid(), NEW.id, 'U', NEW.jsonb, current_timestamp; RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN INSERT INTO harvard_mod_configuration.audit_config_data SELECT gen_random_uuid(), NEW.id, 'I', NEW.jsonb, current_timestamp; RETURN NEW; END IF; RETURN NULL; END; $config_data_audit$ LANGUAGE plpgsql;
11 Jan 2018 15:58:32:739 INFO PostgresClient Successfully executed: CREATE OR REPLACE FUNCTION audit_config_data_changes() RETURNS TRIGGER AS $config_data_audit$
BEGIN IF (TG_OP = 'DELETE') THEN INSERT INTO harvard_mod_configuration.audit_config_data SELECT gen_random_uuid(), OLD.id, 'D', OLD.jsonb, current_timestamp; RETURN OLD; ELSIF (TG_OP = 'UPDATE') THEN INSERT INTO harvard_mod_configuration.audit_config_data SELECT gen_random_uuid(), NEW.id, 'U', NEW.jsonb, current_timestamp; RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN INSERT INTO harvard_mod_configuration.audit_config_data SELECT gen_random_uuid(), NEW.id, 'I', NEW.jsonb, current_timestamp; RETURN NEW; END IF; RETURN NULL; END; $config_data_audit$ LANGUAGE plpgsql;
11 Jan 2018 15:58:32:739 INFO PostgresClient trying to execute: DROP TRIGGER IF EXISTS audit_config_data ON config_data CASCADE;
11 Jan 2018 15:58:32:740 INFO PostgresClient Successfully executed: DROP TRIGGER IF EXISTS audit_config_data ON config_data CASCADE;
11 Jan 2018 15:58:32:740 INFO PostgresClient trying to execute: CREATE TRIGGER audit_config_data AFTER INSERT OR UPDATE OR DELETE ON config_data FOR EACH ROW EXECUTE PROCEDURE audit_config_data_changes();
11 Jan 2018 15:58:32:740 INFO PostgresClient Successfully executed: CREATE TRIGGER audit_config_data AFTER INSERT OR UPDATE OR DELETE ON config_data FOR EACH ROW EXECUTE PROCEDURE audit_config_data_changes();
11 Jan 2018 15:58:32:740 INFO PostgresClient trying to execute: GRANT ALL PRIVILEGES ON audit_config_data TO harvard_mod_configuration;
11 Jan 2018 15:58:32:740 INFO PostgresClient Successfully executed: GRANT ALL PRIVILEGES ON audit_config_data TO harvard_mod_configuration;
11 Jan 2018 15:58:32:741 INFO PostgresClient trying to execute: SET search_path TO harvard_mod_configuration, public;
11 Jan 2018 15:58:32:741 INFO PostgresClient Successfully executed: SET search_path TO harvard_mod_configuration, public;
11 Jan 2018 15:58:32:741 INFO PostgresClient trying to execute: COPY config_data (jsonb) FROM 'data/locales.data' ENCODING 'UTF8';
copyInStatement: COPY config_data (jsonb) FROM STDIN ENCODING 'UTF8';
11 Jan 2018 15:58:32:761 INFO PostgresClient Successfully executed: COPY config_data (jsonb) FROM 'data/locales.data' ENCODING 'UTF8';
11 Jan 2018 15:58:32:761 INFO PostgresClient trying to execute: GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA harvard_mod_configuration TO harvard_mod_configuration;
11 Jan 2018 15:58:32:761 INFO PostgresClient Successfully executed: GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA harvard_mod_configuration TO harvard_mod_configuration;
11 Jan 2018 15:58:32:765 INFO PostgresClient Successfully committed: -1559214180
11 Jan 2018 15:58:32:891 INFO LogUtil org.folio.rest.RestVerticle start invoking postTenant
11 Jan 2018 15:58:32:903 INFO LogUtil 127.0.0.1:54002 POST /_/tenant null HTTP_1_1 201 5 746 tid=harvard Created
"[ ]"
{"module":"NOTHING","configName":"validation_rules","code":"PATRON_RULE","description":"for patrons","default":true,"enabled":true,"value":"","metadata":{"createdDate":1515682712933,"createdByUserId":"2b94c631-fca9-a892-c730-03ee529ffe2a","updatedDate":1515682712933}}
11 Jan 2018 15:58:33:021 INFO PostgresClient reqId=999999999999 Using schema: harvard
11 Jan 2018 15:58:33:022 INFO PostgresClient reqId=999999999999 postgreSQLClientConfig = {"maxPoolSize":26,"port":57369,"queryTimeout":10000,"username":"harvard_mod_configuration","charset":"UTF8","host":"localhost","database":"postgres","password":"..."}
11 Jan 2018 15:58:33:022 INFO BaseSQLClient reqId=999999999999 Creating configuration for localhost:57369
11 Jan 2018 15:58:33:046 WARN RestVerticle reqId=999999999999 Problem parsing x-okapi-token header, for path /configurations/entries - null
11 Jan 2018 15:58:33:048 WARN RestVerticle reqId=999999999999 Problem parsing x-okapi-token header, for path /configurations/entries - null
sending... postConfigurationsTables
sending... postConfigurationsTables
11 Jan 2018 15:58:33:195 INFO PostgreSQLConnectionHandler Received notice NoticeMessage(fields=Map(Line -> 239, File -> misc.c, SQLSTATE -> 01000, Routine -> pg_signal_backend, V -> WARNING, Message -> PID 11 is not a PostgreSQL server process, Severity -> WARNING))
11 Jan 2018 15:58:33:202 WARN RestVerticle reqId=999999999999 Problem parsing x-okapi-token header, for path /configurations/entries - null
11 Jan 2018 15:58:33:240 INFO LogUtil reqId=999999999999 127.0.0.1:54016 POST /configurations/entries null HTTP_1_1 422 480 -1 tid=null Unprocessable Entity {"errors":[{"message":"muss auf Ausdruck \"^[a-f0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$\" passen","type":"1","code":"-1","parameters":[{"key":"metadata.createdByUserId","value":"123456"}]},{"message":"darf nicht null sein","type":"1","code":"-1","parameters":[{"key":"metadata.createdDate","value":"null"}]},{"message":"muss null sein","type":"1","code":"-1","parameters":[{"key":"metadata","value":"org.folio.rest.jaxrs.model.Metadata@149060c8"}]}]}
11 Jan 2018 15:58:33:243 INFO LogUtil reqId=999999999999 127.0.0.1:54018 POST /configurations/entries null HTTP_1_1 422 153 -1 tid=null Unprocessable Entity {"errors":[{"message":"muss null sein","type":"1","code":"-1","parameters":[{"key":"metadata","value":"org.folio.rest.jaxrs.model.Metadata@28eed8bf"}]}]}
Content-type application/json
Transfer-Encoding chunked
Status - 422 at 1515682713246 for http://localhost:61801/configurations/entries
11 Jan 2018 15:58:33:246 ERROR ContextImpl Unhandled exception
java.lang.AssertionError: expected 201 code, but got 422
at io.vertx.ext.unit.impl.TestContextImpl.reportAssertionError(TestContextImpl.java:432)
at io.vertx.ext.unit.impl.TestContextImpl.fail(TestContextImpl.java:310)
at org.folio.rest.RestVerticleTest.lambda$mutateURLs$11(RestVerticleTest.java:380)
at io.vertx.core.http.impl.HttpClientRequestBase.handleException(HttpClientRequestBase.java:136)
at io.vertx.core.http.impl.HttpClientRequestImpl.handleException(HttpClientRequestImpl.java:51)
at io.vertx.core.http.impl.HttpClientRequestBase.handleResponse(HttpClientRequestBase.java:152)
at io.vertx.core.http.impl.ClientConnection.handleResponse(ClientConnection.java:308)
at io.vertx.core.http.impl.ClientHandler.doMessageReceived(ClientHandler.java:70)
at io.vertx.core.http.impl.ClientHandler.doMessageReceived(ClientHandler.java:38)
at io.vertx.core.http.impl.VertxHttpHandler.lambda$channelRead$0(VertxHttpHandler.java:71)
at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:335)
at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:193)
at io.vertx.core.http.impl.VertxHttpHandler.channelRead(VertxHttpHandler.java:71)
at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:122)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)
11 Jan 2018 15:58:33:254 WARN RestVerticle reqId=999999999999 Problem parsing x-okapi-token header, for path /configurations/entries - null
locking q -> false
11 Jan 2018 15:58:33:267 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking deleteAdminKillQuery
Content-Type text/plain
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
11 Jan 2018 15:58:33:269 INFO LogUtil reqId=999999999999 127.0.0.1:54014 DELETE /admin/kill_query pid=11 HTTP_1_1 404 2 219 tid=harvard Not Found
host localhost:61801
Transfer-Encoding chunked
Status - 404 at 1515682713269 for http://localhost:61801/admin/kill_query?pid=11
complete
11 Jan 2018 15:58:33:281 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking putAdminLoglevel
Content-Type application/json
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Transfer-Encoding chunked
Status - 200 at 1515682713285 for http://localhost:61801/admin/loglevel?level=FINE&java_package=org.folio.rest.persist
complete
11 Jan 2018 15:58:33:285 INFO LogUtil reqId=999999999999 127.0.0.1:54024 PUT /admin/loglevel level=FINE&java_package=org.folio.rest.persist HTTP_1_1 200 92 28 tid=harvard OK
sending... postConfigurationsTables
sending... postConfigurationsTables
sending... deleteConfigurationsTablesByTableId
11 Jan 2018 15:58:33:299 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking postConfigurationsEntries
11 Jan 2018 15:58:33:301 INFO LogUtil reqId=999999999999 127.0.0.1:54008 POST /configurations/entries null HTTP_1_1 201 1043 354 tid=harvard Created
Content-Type application/json
Location /configurations/entries/8b27d702-7e4b-4d1f-88d4-8eccb051dba1
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Transfer-Encoding chunked
Location - /configurations/entries/8b27d702-7e4b-4d1f-88d4-8eccb051dba1
Status - 201 at 1515682713331 for http://localhost:61801/configurations/entries
complete
11 Jan 2018 15:58:33:335 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking postConfigurationsEntries
11 Jan 2018 15:58:33:336 INFO LogUtil reqId=999999999999 127.0.0.1:54012 POST /configurations/entries null HTTP_1_1 201 1044 136 tid=harvard Created
11 Jan 2018 15:58:33:337 DEBUG PostgresClient reqId=999999999999 query = DELETE FROM harvard_mod_configuration.config_data WHERE id='123456'
11 Jan 2018 15:58:33:340 ERROR PostgreSQLConnection Error with message -> ErrorMessage(fields=Map(Position -> 61, Line -> 146, File -> uuid.c, SQLSTATE -> 22P02, Routine -> string_to_uuid, V -> ERROR, Message -> invalid input syntax for uuid: "123456", Severity -> ERROR))
11 Jan 2018 15:58:33:341 ERROR PostgreSQLConnection Error on connection
com.github.mauricio.async.db.postgresql.exceptions.GenericDatabaseException: ErrorMessage(fields=Map(Position -> 61, Line -> 146, File -> uuid.c, SQLSTATE -> 22P02, Routine -> string_to_uuid, V -> ERROR, Message -> invalid input syntax for uuid: "123456", Severity -> ERROR))
at com.github.mauricio.async.db.postgresql.PostgreSQLConnection.onError(PostgreSQLConnection.scala:175)
at com.github.mauricio.async.db.postgresql.codec.PostgreSQLConnectionHandler.channelRead0(PostgreSQLConnectionHandler.scala:206)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)
11 Jan 2018 15:58:33:343 ERROR PostgreSQLConnection Setting error on future Future()
11 Jan 2018 15:58:33:345 ERROR PostgresClient reqId=999999999999 ErrorMessage(fields=Map(Position -> 61, Line -> 146, File -> uuid.c, SQLSTATE -> 22P02, Routine -> string_to_uuid, V -> ERROR, Message -> invalid input syntax for uuid: "123456", Severity -> ERROR))
com.github.mauricio.async.db.postgresql.exceptions.GenericDatabaseException: ErrorMessage(fields=Map(Position -> 61, Line -> 146, File -> uuid.c, SQLSTATE -> 22P02, Routine -> string_to_uuid, V -> ERROR, Message -> invalid input syntax for uuid: "123456", Severity -> ERROR))
at com.github.mauricio.async.db.postgresql.PostgreSQLConnection.onError(PostgreSQLConnection.scala:175)
at com.github.mauricio.async.db.postgresql.codec.PostgreSQLConnectionHandler.channelRead0(PostgreSQLConnectionHandler.scala:206)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)
11 Jan 2018 15:58:33:345 ERROR ConfigAPI reqId=999999999999 com.github.mauricio.async.db.postgresql.exceptions.GenericDatabaseException: ErrorMessage(fields=Map(Position -> 61, Line -> 146, File -> uuid.c, SQLSTATE -> 22P02, Routine -> string_to_uuid, V -> ERROR, Message -> invalid input syntax for uuid: "123456", Severity -> ERROR))
11 Jan 2018 15:58:33:346 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking deleteConfigurationsEntriesByEntryId
Content-Type text/plain
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Transfer-Encoding chunked
Status - 404 at 1515682713346 for http://localhost:61801/configurations/entries/123456
complete
11 Jan 2018 15:58:33:347 INFO LogUtil reqId=999999999999 127.0.0.1:54022 DELETE /configurations/entries/123456 null HTTP_1_1 404 6 91 tid=harvard Not Found
11 Jan 2018 15:58:33:347 DEBUG PostgresClient reqId=999999999999 timer: get DELETE FROM harvard_mod_configuration.config_data WHERE id='123456' (ns) 55731093
11 Jan 2018 15:58:33:347 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking postConfigurationsEntries
Content-Type application/json
Location /configurations/entries/25e46535-f172-48c4-864d-f6e93ee5d3b4
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Transfer-Encoding chunked
Location - /configurations/entries/25e46535-f172-48c4-864d-f6e93ee5d3b4
11 Jan 2018 15:58:33:348 INFO LogUtil reqId=999999999999 127.0.0.1:54020 POST /configurations/entries null HTTP_1_1 201 231 95 tid=harvard Created
Status - 201 at 1515682713351 for http://localhost:61801/configurations/entries
complete
Content-type application/json
Transfer-Encoding chunked
Status - 422 at 1515682713354 for http://localhost:61801/configurations/entries
complete
Content-Type application/json
Location /configurations/entries/b88bf9c7-a651-40e6-bb9a-b62223fd6e2c
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Transfer-Encoding chunked
Location - /configurations/entries/b88bf9c7-a651-40e6-bb9a-b62223fd6e2c
Status - 201 at 1515682713364 for http://localhost:61801/configurations/entries
complete
11 Jan 2018 15:58:33:367 WARN RestVerticle reqId=999999999999 Problem parsing x-okapi-token header, for path /configurations/entries/8b27d702-7e4b-4d1f-88d4-8eccb051dba1 - null
sending... putConfigurationsTablesByTableId
11 Jan 2018 15:58:33:372 DEBUG PostgresClient reqId=999999999999 query = UPDATE harvard_mod_configuration.config_data SET jsonb = ?::jsonb WHERE id='8b27d702-7e4b-4d1f-88d4-8eccb051dba1'
11 Jan 2018 15:58:33:387 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking putConfigurationsEntriesByEntryId
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Content-Length 0
Status - 204 at 1515682713390 for http://localhost:61801/configurations/entries/8b27d702-7e4b-4d1f-88d4-8eccb051dba1
complete
11 Jan 2018 15:58:33:391 INFO LogUtil reqId=999999999999 127.0.0.1:54036 PUT /configurations/entries/8b27d702-7e4b-4d1f-88d4-8eccb051dba1 null HTTP_1_1 204 0 25 tid=harvard No Content
11 Jan 2018 15:58:33:391 DEBUG PostgresClient reqId=999999999999 timer: get UPDATE harvard_mod_configuration.config_data SET jsonb = ?::jsonb WHERE id='8b27d702-7e4b-4d1f-88d4-8eccb051dba1' (ns) 20333444
11 Jan 2018 15:58:33:405 WARN RestVerticle reqId=999999999999 Problem parsing x-okapi-token header, for path /configurations/entries/25e46535-f172-48c4-864d-f6e93ee5d3b4 - null
sending... putConfigurationsTablesByTableId
11 Jan 2018 15:58:33:406 DEBUG PostgresClient reqId=999999999999 query = UPDATE harvard_mod_configuration.config_data SET jsonb = ?::jsonb WHERE id='25e46535-f172-48c4-864d-f6e93ee5d3b4'
11 Jan 2018 15:58:33:411 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking postConfigurationsEntries
Content-Type application/json
Location /configurations/entries/e33b2e8f-79ad-4da1-a868-25780cb582c6
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Transfer-Encoding chunked
Location - /configurations/entries/e33b2e8f-79ad-4da1-a868-25780cb582c6
Status - 201 at 1515682713415 for http://localhost:61801/configurations/entries
complete
11 Jan 2018 15:58:33:419 INFO LogUtil reqId=999999999999 127.0.0.1:54010 POST /configurations/entries null HTTP_1_1 201 1044 371 tid=harvard Created
11 Jan 2018 15:58:33:421 WARN RestVerticle reqId=999999999999 Problem parsing x-okapi-token header, for path /configurations/entries/b88bf9c7-a651-40e6-bb9a-b62223fd6e2c - null
11 Jan 2018 15:58:33:422 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking putConfigurationsEntriesByEntryId
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Content-Length 0
Status - 204 at 1515682713423 for http://localhost:61801/configurations/entries/25e46535-f172-48c4-864d-f6e93ee5d3b4
complete
11 Jan 2018 15:58:33:424 INFO LogUtil reqId=999999999999 127.0.0.1:54038 PUT /configurations/entries/25e46535-f172-48c4-864d-f6e93ee5d3b4 null HTTP_1_1 204 0 19 tid=harvard No Content
11 Jan 2018 15:58:33:424 DEBUG PostgresClient reqId=999999999999 timer: get UPDATE harvard_mod_configuration.config_data SET jsonb = ?::jsonb WHERE id='25e46535-f172-48c4-864d-f6e93ee5d3b4' (ns) 17771609
sending... putConfigurationsTablesByTableId
11 Jan 2018 15:58:33:425 DEBUG PostgresClient reqId=999999999999 query = UPDATE harvard_mod_configuration.config_data SET jsonb = ?::jsonb WHERE id='b88bf9c7-a651-40e6-bb9a-b62223fd6e2c'
11 Jan 2018 15:58:33:433 WARN RestVerticle reqId=999999999999 Problem parsing x-okapi-token header, for path /configurations/entries/e33b2e8f-79ad-4da1-a868-25780cb582c6 - null
11 Jan 2018 15:58:33:433 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking putConfigurationsEntriesByEntryId
11 Jan 2018 15:58:33:433 INFO LogUtil reqId=999999999999 127.0.0.1:54040 PUT /configurations/entries/b88bf9c7-a651-40e6-bb9a-b62223fd6e2c null HTTP_1_1 204 0 13 tid=harvard No Content
11 Jan 2018 15:58:33:434 DEBUG PostgresClient reqId=999999999999 timer: get UPDATE harvard_mod_configuration.config_data SET jsonb = ?::jsonb WHERE id='b88bf9c7-a651-40e6-bb9a-b62223fd6e2c' (ns) 8588366
sending... putConfigurationsTablesByTableId
11 Jan 2018 15:58:33:435 DEBUG PostgresClient reqId=999999999999 query = UPDATE harvard_mod_configuration.config_data SET jsonb = ?::jsonb WHERE id='e33b2e8f-79ad-4da1-a868-25780cb582c6'
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Content-Length 0
Status - 204 at 1515682713440 for http://localhost:61801/configurations/entries/b88bf9c7-a651-40e6-bb9a-b62223fd6e2c
complete
11 Jan 2018 15:58:33:440 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking putConfigurationsEntriesByEntryId
x-okapi-request-id 999999999999
authorization harvard
x-okapi-tenant harvard
accept application/json,text/plain
host localhost:61801
Content-Length 0
Status - 204 at 1515682713441 for http://localhost:61801/configurations/entries/e33b2e8f-79ad-4da1-a868-25780cb582c6
complete
11 Jan 2018 15:58:33:441 INFO LogUtil reqId=999999999999 127.0.0.1:54042 PUT /configurations/entries/e33b2e8f-79ad-4da1-a868-25780cb582c6 null HTTP_1_1 204 0 12 tid=harvard No Content
11 Jan 2018 15:58:33:441 DEBUG PostgresClient reqId=999999999999 timer: get UPDATE harvard_mod_configuration.config_data SET jsonb = ?::jsonb WHERE id='e33b2e8f-79ad-4da1-a868-25780cb582c6' (ns) 5944039
CREATE UNLOGGED TABLE IF NOT EXISTS harvard_mod_configuration.mytablecache AS select * from harvard_mod_configuration.config_data where jsonb->>'config_name' = 'validation_rules'
11 Jan 2018 15:58:34:946 DEBUG PostgresClient reqId=999999999999 CREATE TABLE AS timer: CREATE UNLOGGED TABLE IF NOT EXISTS harvard_mod_configuration.mytablecache AS select * from harvard_mod_configuration.config_data where jsonb->>'config_name' = 'validation_rules' took 7
0
true
11 Jan 2018 15:58:34:952 DEBUG PostgresClient reqId=999999999999 DROP TABLE timer: mytablecache took 3
11 Jan 2018 15:58:36:994 INFO TenantAPI reqId=999999999999 sending... deleteTenant for harvard
11 Jan 2018 15:58:36:997 INFO TenantAPI reqId=999999999999 Deleting tenant harvard
11 Jan 2018 15:58:36:998 INFO TenantAPI reqId=999999999999 Attempting to run delete script for: harvard
11 Jan 2018 15:58:37:000 INFO PostgresClient reqId=999999999999 Executing multiple statements with id -562701396
sending... getConfigurationsTables
11 Jan 2018 15:58:37:007 INFO PostgresClient reqId=999999999999 trying to execute: REVOKE ALL PRIVILEGES ON DATABASE postgres from harvard_mod_configuration;
11 Jan 2018 15:58:37:011 INFO PostgresClient reqId=999999999999 Successfully executed: REVOKE ALL PRIVILEGES ON DATABASE postgres from harvard_mod_configuration;
11 Jan 2018 15:58:37:011 INFO PostgresClient reqId=999999999999 trying to execute: DROP SCHEMA IF EXISTS harvard_mod_configuration CASCADE;
11 Jan 2018 15:58:37:013 INFO PostgresClient reqId=999999999999 Successfully executed: DROP SCHEMA IF EXISTS harvard_mod_configuration CASCADE;
11 Jan 2018 15:58:37:013 INFO PostgresClient reqId=999999999999 trying to execute: DROP USER IF EXISTS harvard_mod_configuration;
11 Jan 2018 15:58:37:014 INFO PostgresClient reqId=999999999999 Successfully executed: DROP USER IF EXISTS harvard_mod_configuration;
11 Jan 2018 15:58:37:016 INFO PostgresClient reqId=999999999999 Successfully committed: -562701396
11 Jan 2018 15:58:37:044 DEBUG PostgresClient reqId=999999999999 Parse query for count_estimate function (ns) 24937065
11 Jan 2018 15:58:37:048 DEBUG PostgresClient reqId=999999999999 timer: buildFacetQuery (ns) 174061
11 Jan 2018 15:58:37:055 DEBUG PostgresClient reqId=999999999999 query = with facets as (
SELECT * FROM harvard_mod_configuration.config_data
LIMIT 10000
)
,
count_on as (
SELECT
harvard_mod_configuration.count_estimate_smart2(count(*) , 10000, 'SELECT * FROM harvard_mod_configuration.config_data ') AS count
FROM facets
)
,
grouped_by as (
SELECT
jsonb->>'code' as code,
jsonb->>'module' as module,
count(*) as count
FROM facets
GROUP BY GROUPING SETS (
code,
module )
)
,
lst1 as(
SELECT
jsonb_build_object(
'type' , 'code',
'facetValues',
json_build_array(
jsonb_build_object(
'value', code,
'count', count)
)
) AS jsonb,
count as count
FROM grouped_by
where code is not null
group by code, count
order by count desc
)
,
lst2 as(
SELECT
jsonb_build_object(
'type' , 'module',
'facetValues',
json_build_array(
jsonb_build_object(
'value', module,
'count', count)
)
) AS jsonb,
count as count
FROM grouped_by
where module is not null
group by module, count
order by count desc
)
,
ret_records as (
select id as id, jsonb FROM facets
)
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb FROM lst1 limit 5)
UNION
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb FROM lst2 limit 5)
UNION
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb_build_object('count' , count) FROM count_on)
UNION ALL
(select id as id, jsonb from ret_records LIMIT 10 OFFSET 0);
sending... getConfigurationsTables
11 Jan 2018 15:58:37:060 ERROR PostgreSQLConnection Error with message -> ErrorMessage(fields=Map(Position -> 36, Line -> 1139, File -> parse_relation.c, SQLSTATE -> 42P01, Routine -> parserOpenTable, V -> ERROR, Message -> relation "harvard_mod_configuration.config_data" does not exist, Severity -> ERROR))
11 Jan 2018 15:58:37:060 ERROR PostgreSQLConnection Error on connection
com.github.mauricio.async.db.postgresql.exceptions.GenericDatabaseException: ErrorMessage(fields=Map(Position -> 36, Line -> 1139, File -> parse_relation.c, SQLSTATE -> 42P01, Routine -> parserOpenTable, V -> ERROR, Message -> relation "harvard_mod_configuration.config_data" does not exist, Severity -> ERROR))
at com.github.mauricio.async.db.postgresql.PostgreSQLConnection.onError(PostgreSQLConnection.scala:175)
at com.github.mauricio.async.db.postgresql.codec.PostgreSQLConnectionHandler.channelRead0(PostgreSQLConnectionHandler.scala:206)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)
11 Jan 2018 15:58:37:060 ERROR PostgreSQLConnection Setting error on future Future()
11 Jan 2018 15:58:37:079 DEBUG PostgresClient reqId=999999999999 Parse query for count_estimate function (ns) 7053538
11 Jan 2018 15:58:37:082 DEBUG PostgresClient reqId=999999999999 timer: buildFacetQuery (ns) 18183
11 Jan 2018 15:58:37:085 DEBUG PostgresClient reqId=999999999999 query = with facets as (
SELECT * FROM harvard_mod_configuration.config_data WHERE lower(f_unaccent(config_data.jsonb->>'module')) LIKE lower(f_unaccent('CIRCULATION'))
LIMIT 10000
)
,
count_on as (
SELECT
harvard_mod_configuration.count_estimate_smart2(count(*) , 10000, 'SELECT * FROM harvard_mod_configuration.config_data WHERE lower(f_unaccent(config_data.jsonb->>''module'')) LIKE lower(f_unaccent(''CIRCULATION'')) ') AS count
FROM facets
)
,
grouped_by as (
SELECT
jsonb->>'code' as code,
jsonb->>'module' as module,
count(*) as count
FROM facets
GROUP BY GROUPING SETS (
code,
module )
)
,
lst1 as(
SELECT
jsonb_build_object(
'type' , 'code',
'facetValues',
json_build_array(
jsonb_build_object(
'value', code,
'count', count)
)
) AS jsonb,
count as count
FROM grouped_by
where code is not null
group by code, count
order by count desc
)
,
lst2 as(
SELECT
jsonb_build_object(
'type' , 'module',
'facetValues',
json_build_array(
jsonb_build_object(
'value', module,
'count', count)
)
) AS jsonb,
count as count
FROM grouped_by
where module is not null
group by module, count
order by count desc
)
,
ret_records as (
select id as id, jsonb FROM facets
)
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb FROM lst1 limit 5)
UNION
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb FROM lst2 limit 5)
UNION
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb_build_object('count' , count) FROM count_on)
UNION ALL
(select id as id, jsonb from ret_records LIMIT 10 OFFSET 0);
11 Jan 2018 15:58:37:089 ERROR PostgreSQLConnection Error with message -> ErrorMessage(fields=Map(Position -> 36, Line -> 1139, File -> parse_relation.c, SQLSTATE -> 42P01, Routine -> parserOpenTable, V -> ERROR, Message -> relation "harvard_mod_configuration.config_data" does not exist, Severity -> ERROR))
11 Jan 2018 15:58:37:089 ERROR PostgreSQLConnection Error on connection
com.github.mauricio.async.db.postgresql.exceptions.GenericDatabaseException: ErrorMessage(fields=Map(Position -> 36, Line -> 1139, File -> parse_relation.c, SQLSTATE -> 42P01, Routine -> parserOpenTable, V -> ERROR, Message -> relation "harvard_mod_configuration.config_data" does not exist, Severity -> ERROR))
at com.github.mauricio.async.db.postgresql.PostgreSQLConnection.onError(PostgreSQLConnection.scala:175)
at com.github.mauricio.async.db.postgresql.codec.PostgreSQLConnectionHandler.channelRead0(PostgreSQLConnectionHandler.scala:206)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)
11 Jan 2018 15:58:37:090 ERROR PostgreSQLConnection Setting error on future Future()
11 Jan 2018 15:58:37:091 ERROR PostgresClient reqId=999999999999 ErrorMessage(fields=Map(Position -> 36, Line -> 1139, File -> parse_relation.c, SQLSTATE -> 42P01, Routine -> parserOpenTable, V -> ERROR, Message -> relation "harvard_mod_configuration.config_data" does not exist, Severity -> ERROR))
com.github.mauricio.async.db.postgresql.exceptions.GenericDatabaseException: ErrorMessage(fields=Map(Position -> 36, Line -> 1139, File -> parse_relation.c, SQLSTATE -> 42P01, Routine -> parserOpenTable, V -> ERROR, Message -> relation "harvard_mod_configuration.config_data" does not exist, Severity -> ERROR))
at com.github.mauricio.async.db.postgresql.PostgreSQLConnection.onError(PostgreSQLConnection.scala:175)
at com.github.mauricio.async.db.postgresql.codec.PostgreSQLConnectionHandler.channelRead0(PostgreSQLConnectionHandler.scala:206)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)
11 Jan 2018 15:58:37:092 ERROR ConfigAPI reqId=999999999999 ErrorMessage(fields=Map(Position -> 36, Line -> 1139, File -> parse_relation.c, SQLSTATE -> 42P01, Routine -> parserOpenTable, V -> ERROR, Message -> relation "harvard_mod_configuration.config_data" does not exist, Severity -> ERROR))
com.github.mauricio.async.db.postgresql.exceptions.GenericDatabaseException: ErrorMessage(fields=Map(Position -> 36, Line -> 1139, File -> parse_relation.c, SQLSTATE -> 42P01, Routine -> parserOpenTable, V -> ERROR, Message -> relation "harvard_mod_configuration.config_data" does not exist, Severity -> ERROR))
at com.github.mauricio.async.db.postgresql.PostgreSQLConnection.onError(PostgreSQLConnection.scala:175)
at com.github.mauricio.async.db.postgresql.codec.PostgreSQLConnectionHandler.channelRead0(PostgreSQLConnectionHandler.scala:206)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)
11 Jan 2018 15:58:37:094 INFO LogUtil reqId=999999999999 org.folio.rest.RestVerticle start invoking getConfigurationsEntries
Status - 400 http://localhost:/configurations/entries?query=module==CIRCULATION&facets=code&facets=module
11 Jan 2018 15:58:37:095 ERROR HttpClientRequestBase java.lang.AssertionError: expected 200 , got 400
11 Jan 2018 15:58:37:096 INFO LogUtil reqId=999999999999 127.0.0.1:54046 GET /configurations/entries query=module==CIRCULATION&facets=code&facets=module HTTP_1_1 400 234 127 tid=harvard Bad Request
11 Jan 2018 15:58:37:097 DEBUG PostgresClient reqId=999999999999 timer: get with facets as (
SELECT * FROM harvard_mod_configuration.config_data WHERE lower(f_unaccent(config_data.jsonb->>'module')) LIKE lower(f_unaccent('CIRCULATION'))
LIMIT 10000
)
,
count_on as (
SELECT
harvard_mod_configuration.count_estimate_smart2(count(*) , 10000, 'SELECT * FROM harvard_mod_configuration.config_data WHERE lower(f_unaccent(config_data.jsonb->>''module'')) LIKE lower(f_unaccent(''CIRCULATION'')) ') AS count
FROM facets
)
,
grouped_by as (
SELECT
jsonb->>'code' as code,
jsonb->>'module' as module,
count(*) as count
FROM facets
GROUP BY GROUPING SETS (
code,
module )
)
,
lst1 as(
SELECT
jsonb_build_object(
'type' , 'code',
'facetValues',
json_build_array(
jsonb_build_object(
'value', code,
'count', count)
)
) AS jsonb,
count as count
FROM grouped_by
where code is not null
group by code, count
order by count desc
)
,
lst2 as(
SELECT
jsonb_build_object(
'type' , 'module',
'facetValues',
json_build_array(
jsonb_build_object(
'value', module,
'count', count)
)
) AS jsonb,
count as count
FROM grouped_by
where module is not null
group by module, count
order by count desc
)
,
ret_records as (
select id as id, jsonb FROM facets
)
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb FROM lst1 limit 5)
UNION
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb FROM lst2 limit 5)
UNION
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb_build_object('count' , count) FROM count_on)
UNION ALL
(select id as id, jsonb from ret_records LIMIT 10 OFFSET 0);
(ns) 24591767
sending... getConfigurationsTables
11 Jan 2018 15:58:37:099 DEBUG PostgresClient reqId=999999999999 Parse query for count_estimate function (ns) 2049715
11 Jan 2018 15:58:37:099 DEBUG PostgresClient reqId=999999999999 timer: buildFacetQuery (ns) 10688
11 Jan 2018 15:58:37:100 DEBUG PostgresClient reqId=999999999999 query = with facets as (
SELECT * FROM harvard_mod_configuration.config_data WHERE lower(f_unaccent(config_data.jsonb->>'module')) LIKE lower(f_unaccent('CIRCULATION3'))
LIMIT 10000
)
,
count_on as (
SELECT
harvard_mod_configuration.count_estimate_smart2(count(*) , 10000, 'SELECT * FROM harvard_mod_configuration.config_data WHERE lower(f_unaccent(config_data.jsonb->>''module'')) LIKE lower(f_unaccent(''CIRCULATION3'')) ') AS count
FROM facets
)
,
grouped_by as (
SELECT
jsonb->>'code' as code,
jsonb->>'module' as module,
count(*) as count
FROM facets
GROUP BY GROUPING SETS (
code,
module )
)
,
lst1 as(
SELECT
jsonb_build_object(
'type' , 'code',
'facetValues',
json_build_array(
jsonb_build_object(
'value', code,
'count', count)
)
) AS jsonb,
count as count
FROM grouped_by
where code is not null
group by code, count
order by count desc
)
,
lst2 as(
SELECT
jsonb_build_object(
'type' , 'module',
'facetValues',
json_build_array(
jsonb_build_object(
'value', module,
'count', count)
)
) AS jsonb,
count as count
FROM grouped_by
where module is not null
group by module, count
order by count desc
)
,
ret_records as (
select id as id, jsonb FROM facets
)
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb FROM lst1 limit 5)
UNION
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb FROM lst2 limit 5)
UNION
(SELECT '00000000-0000-0000-0000-000000000000'::uuid as id, jsonb_build_object('count' , count) FROM count_on)
UNION ALL
(select id as id, jsonb from ret_records LIMIT 10 OFFSET 0);
]]>
java.lang.AssertionError: expected 200 , got 400