Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQbfZ-0006wU-Jj for pljava-dev@arkaria.postgresql.org; Sat, 05 Mar 2022 21:10:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nQbfX-0002PD-RO for pljava-dev@arkaria.postgresql.org; Sat, 05 Mar 2022 21:10:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQbfX-0002Oy-JO for pljava-dev@lists.postgresql.org; Sat, 05 Mar 2022 21:10:27 +0000 Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nQbfU-0007N8-1M for pljava-dev@lists.postgresql.org; Sat, 05 Mar 2022 21:10:26 +0000 Received: by mail-vs1-xe35.google.com with SMTP id u124so5738532vsb.10 for ; Sat, 05 Mar 2022 13:10:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coyotesong.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=EddQ/XvHP/MJYtOmhGVAHj1Lh+88xnaoNlRnkpFwqD8=; b=Y0GL1PTS8uFlsOSUm2TIkbn/qRAxLCSv2mjvzdcGjFpuMYTvZGTjbiz8G22ogxV1kv Y0SQMIc6Aec5IYqFOWbge/wMSc03hrEYye5V7whyMfTc+6mM0kIZmsziIIpPrhcmW1EQ Dk6TKBOWXmm+0OqDaGDkTFmoEJ7hAD53QTTM8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=EddQ/XvHP/MJYtOmhGVAHj1Lh+88xnaoNlRnkpFwqD8=; b=ZM/8U+QrtXBhTLRsiri1IFyE/Y5JKDRTx2lk3U7w+HeEXkIvXuzC90U2Rmr3Oex5sJ 9WhOrjW3Wz1bQrU9G10UoHs+h9vPafaFGk6vW6csXLTyxWZYTuW5szJJAhwnYfh6BrSH dSPRw8XK2thKafFmOxybWvWwPMgRnKiA+HDCjwHeuPzclSnXOdkeF3Nxh8jNFFK0nZ26 yBXwOragw6dWW5sH3FEXErocSaeqWyBzmo4Tyu9aosNDFyziY5hJu9SX4w+DylT/A9vH sDrOpCgtmFsXZV3l5YiKQHCKhfQLKhD0XSHHGhs/E/e8fd45c7h4etQxuqD8m14wFlgU prBw== X-Gm-Message-State: AOAM5335a18ytUrWOXM2XEQ0dXAbJv+lZMTsZPP3SEooSMRwpzFxdtpT fB7fyvUKJctJBrfwqOJqPTRGWrWZvqP6rtRyxzbjw0zt1R6o8g== X-Google-Smtp-Source: ABdhPJzv89jga371RPiBboCo7ZJx9hr2K9CCoJkEJmVlL57wfgQR4iMpMtYsCdSltKQ1gM2u6o7QDbt2fud88fVAC+8= X-Received: by 2002:a05:6102:3587:b0:31e:c0a0:af08 with SMTP id h7-20020a056102358700b0031ec0a0af08mr1641562vsu.12.1646514621356; Sat, 05 Mar 2022 13:10:21 -0800 (PST) MIME-Version: 1.0 From: Bear Giles Date: Sat, 5 Mar 2022 14:10:10 -0700 Message-ID: Subject: Problem running examples.jar with official postgresql pljava deb To: pljava-dev@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000001fb38405d97f0f16" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000001fb38405d97f0f16 Content-Type: text/plain; charset="UTF-8" I'm wrapping up a new set of docker images for pljava - https://hub.docker.com/beargiles/pljava - and hit a problem when installing examples.jar to get the values to provide when registering the prebuilt distributions. Basically the official version of pl/java does not include saxon. I can easily install the debian package and install the jars but I'm stuck installing the example jar. If I don't create the 'javatest' schema the execution fails because it can't find the saxon jar. postgres=# SELECT sqlj.install_jar('file:///usr/share/postgresql/14/pljava/pljava-examples-1.6.4.jar', 'ex', true); INFO: 05 Mar 22 21:01:28 org.postgresql.pljava.example.LoggerTest aggregate examples ok INFO: 05 Mar 22 21:01:28 org.postgresql.pljava.example.annotation.SPIActions issue 228 tests ok ERROR: java.sql.SQLNonTransientException: resolving static method org.postgresql.pljava.example.saxon.S9.like_regex with signature (String,String,String,boolean)boolean: java.lang.ClassNotFoundException: net.sf.saxon.trans.XPathException CONTEXT: SQL statement "CREATE OR REPLACE FUNCTION javatest.like_regex( value pg_catalog.varchar, pattern pg_catalog.varchar, flag pg_catalog.varchar DEFAULT CAST(e'' AS pg_catalog.varchar), w3cNewlines boolean DEFAULT CAST(e'false' AS boolean)) RETURNS boolean LANGUAGE java VOLATILE AS e'boolean=org.postgresql.pljava.example.saxon.S9.like_regex(java.lang.String,java.lang.String,java.lang.String,boolean)'" If I do create the 'javetest' schema the execution fails because the javatest schema already exists. Nice Catch-22 there. I tried adding the jars to both the 'public' and 'sqlj' schemas but no joy. How can I get past this? Besides providing the information requested (which I could get by looking at the underlying tables) I would like to be able to execute the query just to have an automated way to verify a successful installation. Bear --0000000000001fb38405d97f0f16 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm wrapping up a new set of docker images for= pljava - https://hub.docker.com/beargiles/pljava - and hit a problem when i= nstalling examples.jar to get the values to provide=C2=A0when registering t= he prebuilt distributions.

Basically the off= icial version of pl/java does not include saxon. I can easily install the d= ebian package and install the jars but I'm stuck installing the example= jar.

If I don't create the 'javates= t' schema the execution fails because it can't find the saxon jar.<= /div>

postgres=3D# SELECT sqlj.install_jar('fi= le:///usr/share/postgresql/14/pljava/pljava-examples-1.6.4.jar', 'e= x', true);
INFO: =C2=A005 Mar 22 21:01:28 org.postgresql.pljava.exam= ple.LoggerTest aggregate examples ok
INFO: =C2=A005 Mar 22 21:01:28 org.= postgresql.pljava.example.annotation.SPIActions issue 228 tests ok
ERROR= : =C2=A0java.sql.SQLNonTransientException: resolving static method org.post= gresql.pljava.example.saxon.S9.like_regex with signature (String,String,Str= ing,boolean)boolean: java.lang.ClassNotFoundException: net.sf.saxon.trans.X= PathException
CONTEXT: =C2=A0SQL statement "CREATE OR REPLACE FUNCT= ION javatest.like_regex( value pg_catalog.varchar, pattern pg_catalog.varch= ar, flag pg_catalog.varchar DEFAULT CAST(e'' AS pg_catalog.varchar)= , w3cNewlines boolean DEFAULT CAST(e'false' AS boolean)) RETURNS bo= olean LANGUAGE java VOLATILE AS e'boolean=3Dorg.postgresql.pljava.examp= le.saxon.S9.like_regex(java.lang.String,java.lang.String,java.lang.String,b= oolean)'"


If I do create= the 'javetest' schema the execution fails=C2=A0because the javates= t schema already exists.

Nice Catch-22 there= .

I tried adding the jars to both the 'p= ublic' and 'sqlj' schemas but no joy.

How can I get past this? Besides providing the information requested = (which I could get by looking at the underlying tables) I would like to be = able to execute the query just to have an automated way to verify a success= ful installation.

Bear
--0000000000001fb38405d97f0f16--