References: From: Achilleas Mantzios Message-ID: <3e09c83e-d8c3-cc62-0909-721b44e56e0e@matrix.gatewaynet.com> Date: Tue, 30 May 2017 16:39:45 +0300 MIME-Version: 1.0 In-Reply-To: Subject: Re: [Pljava-dev] install_jar error Content-Type: multipart/mixed; boundary="===============5387646797532403389==" This is a multi-part message in MIME format. --===============5387646797532403389== Content-Type: multipart/alternative; boundary="------------4DEB50B9E30CF84F9F05D946" Content-Language: en-US This is a multi-part message in MIME format. --------------4DEB50B9E30CF84F9F05D946 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 30/05/2017 08:27, Antonio Giuzio wrote: > Hi, > i’m trying to install a jar but i get the follow errors: > > select sqlj.install_jar('file:///Users/antonio/GitHub/distanceJavaSQL/dist/distanceJavaSQL.jar', 'distance', true); > WARNING: java.lang.NoClassDefFoundError: org/postgresql/pljava/internal/Backend > WARNING: Unable to load class org/postgresql/pljava/internal/Backend using CLASSPATH '-Djava.class.path=/Users/antonio/Library/Application Support/Postgres/var-9.5/pljava-pg9.5-x86_64-MacOSX-gpp.jar' > WARNING: failed to load initial PL/Java classes > HINT: The most common reason is that "pljava.classpath" needs to be set, naming the proper "pljava.jar" file. > WARNING: failed to create Java virtual machine > DETAIL: JNI_CreateJavaVM returned an error code: -1 > HINT: Because an earlier attempt during this session did start a VM before failing, this probably means your Java runtime environment does not support more than one VM creation per session. You > may need to exit this session and start a new one. > ERROR: cannot use PL/Java before successfully completing its setup > > > In postgresql.conf, I added this rows > > PLJAVA.CLASSPATH='/Users/antonio/Library/Application Support/Postgres/var-9.5/pljava-pg9.5-x86_64-MacOSX-gpp.jar' > PLJAVA.VMOPTIONS='-Xms512m -Xmx1064m -Xshare:off -XX:ParallelGCThreads=2' > PLJAVA.LIBJVM_LOCATION='/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/jli/libjli.dylib’ > In 1.6 the old pljava postgresql.conf settings were removed. pljava.libjvm_location is what you need and this should point to your libjvm shared object. What version of pljava do you use? Did you use the extension ? > > how can i solve? > Thanks > > > _______________________________________________ > Pljava-dev mailing list > Pljava-dev@lists.pgfoundry.org > http://lists.pgfoundry.org/mailman/listinfo/pljava-dev -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt --------------4DEB50B9E30CF84F9F05D946 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 30/05/2017 08:27, Antonio Giuzio wrote:
Hi,
i’m trying to install a jar but i get the follow errors:

select sqlj.install_jar('file:///Users/antonio/GitHub/distanceJavaSQL/dist/distanceJavaSQL.jar', 'distance', true);
WARNING:  java.lang.NoClassDefFoundError: org/postgresql/pljava/internal/Backend
WARNING:  Unable to load class org/postgresql/pljava/internal/Backend using CLASSPATH '-Djava.class.path=/Users/antonio/Library/Application Support/Postgres/var-9.5/pljava-pg9.5-x86_64-MacOSX-gpp.jar'
WARNING:  failed to load initial PL/Java classes
HINT:  The most common reason is that "pljava.classpath" needs to be set, naming the proper "pljava.jar" file.
WARNING:  failed to create Java virtual machine
DETAIL:  JNI_CreateJavaVM returned an error code: -1
HINT:  Because an earlier attempt during this session did start a VM before failing, this probably means your Java runtime environment does not support more than one VM creation per session.  You may need to exit this session and start a new one.
ERROR:  cannot use PL/Java before successfully completing its setup


In postgresql.conf, I added this rows

PLJAVA.CLASSPATH='/Users/antonio/Library/Application Support/Postgres/var-9.5/pljava-pg9.5-x86_64-MacOSX-gpp.jar'
PLJAVA.VMOPTIONS='-Xms512m -Xmx1064m -Xshare:off -XX:ParallelGCThreads=2'
PLJAVA.LIBJVM_LOCATION='/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/jli/libjli.dylib’

In 1.6 the old pljava postgresql.conf settings were removed. pljava.libjvm_location is what you need and this should point to your libjvm shared object.
What version of pljava do you use? Did you use the extension ?

how can i solve?
Thanks

_______________________________________________
Pljava-dev mailing list
Pljava-dev@lists.pgfoundry.org
http://lists.pgfoundry.org/mailman/listinfo/pljava-dev


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
--------------4DEB50B9E30CF84F9F05D946-- --===============5387646797532403389== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Pljava-dev mailing list Pljava-dev@lists.pgfoundry.org http://lists.pgfoundry.org/mailman/listinfo/pljava-dev --===============5387646797532403389==--