public inbox for [email protected]
help / color / mirror / Atom feedFrom: Chapman Flack <[email protected]>
To: Kartik Ohri <[email protected]>
Cc: [email protected]
Subject: Re: Starting build-system work (Windows/Mac users please speak up)
Date: Fri, 5 Jun 2020 10:32:14 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAASLQ4Od6-0=3+4ENKh1Z-Wcu5Wir-bwUn_ccO2UCmDhoR4vtQ@mail.gmail.com>
References: <[email protected]>
<CAASLQ4OdOma6h5Mu=hMEPyk0M4-MomYZLnhGH+2wVoL1vt_UEg@mail.gmail.com>
<[email protected]>
<CAASLQ4P11FFgefy_xK0Tcw3vWt1F1MNyVgK5eU=PFGvYrpZcyw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAASLQ4PAQ0PNAxJ5ad9U6o+RT2ip19FXvgoK2y1kGWaJbTZ1WQ@mail.gmail.com>
<[email protected]>
<CAASLQ4OXAb+_J=oK54PH5eYuXjkV9KMsoXEcp-TYaQPqxk1Xbg@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAASLQ4PfvmgKPp+aFf_r5RsBwigc+EC5Hm2CuzwJSTDCT64i-A@mail.gmail.com>
<[email protected]>
<CAASLQ4Px21jyb2vJYSrjF5P0RqhA-G_DDWR9QHG68r+W+AqbxQ@mail.gmail.com>
<CAASLQ4NYE-TW6hjbkSOuAY2Z4NM2cYzqSQ9ahO2LAUhdP9axeQ@mail.gmail.com>
<[email protected]>
<CAASLQ4Od6-0=3+4ENKh1Z-Wcu5Wir-bwUn_ccO2UCmDhoR4vtQ@mail.gmail.com>
On 06/05/20 09:44, Kartik Ohri wrote:
> pljava.debug | default | off
> pljava.enable | default | on
> pljava.implementors | default | postgresql
> pljava.java_thread_pg_entry | default | allow
> pljava.libjvm_location | session | C:/Program
> Files/Java/jdk14/bin/server/jvm.dll
> pljava.module_path | default | C:/Program
> Files/PostgreSQL/12/share/pljava/pljava-1.6.0-SNAPSHOT.jar;C:/Program
> Files/PostgreSQL/12/share/pljava/pljava-api-1.6.0-SNAPSHOT.jar
> pljava.release_lingering_savepoints | default | off
> pljava.statement_cache_size | default | 11
> pljava.vmoptions | default |
>
> ...
> 2020-06-05 13:27:20.385 UTC [3096] WARNING: Java virtual machine not yet
> loaded
> 2020-06-05 13:27:20.385 UTC [3096] DETAIL: Access is denied.
>
>
> 2020-06-05 13:27:20.385 UTC [3096] HINT: SET pljava.libjvm_location TO the
My attention is drawn most strongly to the "Access is denied." That isn't
a familiar error to me from non-Windows environments, so it might indicate
some Windows-specific access control policy that is preventing a file
being opened.
I would not read too much into what the HINT says; it is just a constant
string in the PL/Java source. It mentions libjvm_location because that's
a usual suspect, but it doesn't really know why the dlopen failed. The
DETAIL is the best information for that.
It might help some to say
\set VERBOSITY verbose
(a local command in psql, from the department of redundancy department),
and
set client_min_messages to debug2; -- it has to be spelled right :)
or even to experiment with pg_ls_dir(), pg_stat_file(),
pg_read_binary_file() [1] with the name of the JVM DLL or the directory
it lives in, to see if PostgreSQL always gets "Access is denied".
Presumably, if you spell the name wrong on purpose, you might get a
different error for that, and then you'll know this isn't a matter
of spelling the name right.
I found a StackOverflow thread [2] about some Windows settings that
might be relevant. Most of the answers there suggest changing settings
through the GUI (file/directory properties or service properties). I
didn't see anything about how to change from a script, though I assume
with PowerShell there is probably a way.
If this turns out to be a necessary step it will be good to get the
details into the PL/Java documentation for Windows, because I'm
pretty sure there's nothing about it in there now.
One more thing about setting client_min_messages; PL/Java only looks once,
just when starting the JVM, so for that setting to affect PL/Java, it has
to come before the first statement that causes PL/Java to load,
Regards,
-Chap
[1]
https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADMIN-GENFILE
[2]
https://stackoverflow.com/questions/4267051/error-5-access-denied-when-starting-windows-service
view thread (61+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Starting build-system work (Windows/Mac users please speak up)
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox