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 1jhDOR-0007Pt-Lj for pljava-dev@arkaria.postgresql.org; Fri, 05 Jun 2020 14:32:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jhDOQ-0008KE-KF for pljava-dev@arkaria.postgresql.org; Fri, 05 Jun 2020 14:32:22 +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 1jhDOQ-0008K7-4Z for pljava-dev@lists.postgresql.org; Fri, 05 Jun 2020 14:32:22 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhDOM-0002vL-Sd for pljava-dev@lists.postgresql.org; Fri, 05 Jun 2020 14:32:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xQzSRqw6Qaq/hOzkXyIuAhcCjEnd9bM/hPDL9PFaZlo=; b=KObB7MCya9s++F2P/qJNVRGzsl TfOGCosaMglMCNbHlxYvUBzxFT61UhtGuFI8T+IWQ11RSAC8jPv4KQehxRQ9mNGoqYgjiUyc5Rnit Kl3G/ENrJ0cV4HwD8R9y6EmSukHRH/Y8tKGxqyosxufvSgE/I9CHD1gROpVGjSRANe6u8wZD8sOfw qivTZGo8LG+o4i/Zlu649dQLCyjkeQsfPONGjSJ0IGtfL2Cf6K9gtxh5qqKKYpVb+0OOSihsEGOBi LaHYxgMlPIPROg3zqoS3JyrJyj29TuNDieeV/MDnLS96vby6NfZISuoxcGrsa96q+oUwQ8yE8gYSv qJQ6ICbg==; Received: from [184.19.31.139] (port=36248) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jhDOJ-0053aL-JL; Fri, 05 Jun 2020 10:32:16 -0400 Subject: Re: Starting build-system work (Windows/Mac users please speak up) To: Kartik Ohri References: <5EC17E17.7070002@anastigmatix.net> <5ECED046.3000308@anastigmatix.net> <5ED0FCB0.405@anastigmatix.net> <5ED10C6D.2020000@anastigmatix.net> <5ED10F36.7060304@anastigmatix.net> <5ED15825.9060504@anastigmatix.net> <5ED270BA.9010001@anastigmatix.net> <5ED3D488.1010401@anastigmatix.net> <5ED474CA.3000106@anastigmatix.net> <5ED4EA10.4030801@anastigmatix.net> <5ED7E74B.9020800@anastigmatix.net> Cc: pljava-dev@lists.postgresql.org From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <5EDA576E.2000204@anastigmatix.net> Date: Fri, 5 Jun 2020 10:32:14 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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