Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNIZs-0003LY-Oz for pgsql-general@arkaria.postgresql.org; Thu, 15 Nov 2018 14:25:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gNIZq-0004E9-Sm for pgsql-general@arkaria.postgresql.org; Thu, 15 Nov 2018 14:25:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNIZq-00044K-CY for pgsql-general@lists.postgresql.org; Thu, 15 Nov 2018 14:25:02 +0000 Received: from dnvrco-outbound-snat.email.rr.com ([107.14.73.226] helo=dnvrco-cmomta01.email.rr.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNIZm-0003fc-PW for pgsql-general@lists.postgresql.org; Thu, 15 Nov 2018 14:25:00 +0000 Received: from dnvrco-web17 ([107.14.70.248]) by cmsmtp with ESMTPA id NIZkgLjO4P088NIZkg95Ir; Thu, 15 Nov 2018 14:24:56 +0000 Message-ID: <20181115142456.28DD7.52206.root@dnvrco-web17> Date: Thu, 15 Nov 2018 14:24:56 +0000 From: To: pgsql-general@lists.postgresql.org Subject: Re: Java UnsatisfiedLinkError exception when connecting to Postgresql database In-Reply-To: <460656ee-83ac-d615-b1e0-7f9b9e38c1bf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) Sensitivity: Normal X-Originating-IP: from 40.132.190.3 by mail.twc.com; Thu, 15 Nov 2018 14:24:56 +0000 X-CMAE-Envelope: MS4wfPEj0MAaWNnwy3MxFDXbL+6aVsJi3En1+Bd4FD9SzBej/sO9G/r9gFJsYd5j96zMo7bZ1S6EwGF3IawRefgt/ZwaCjPKGZ8u4jAxO+GRZlfAagO1jqZl DHi5e9n2thWYrpIZnPd6GIKLCCGcYmTY/4z7Il0lj7wb76KIUA7o6rVeTBrlGZ/ZIL9U34o0cEaHGw== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ---- Rob Sargent wrote: > > On 11/14/18 5:03 PM, dclark@cinci.rr.com wrote: > > ---- Adrian Klaver wrote: > >> On 11/14/18 10:24 AM, dclark@cinci.rr.com wrote: > >> Please reply to list also. > >> Ccing list. > >>> ---- Adrian Klaver wrote: > >>>> On 11/14/18 9:25 AM, dclark@cinci.rr.com wrote: > >>>>> Hello; > >>>>> > >>>>> I've written a Java program which uses Postgresql via JDBC. The program works fine on all RedHat systems I've tested except one, where it yields an UnsatisifiedLinkError. Here is the stack trace: > >>>>> > >>>>> sun.misc.VM.latestUserDefinedLoader0(Native > >>>>> Method) > >>>>> sun.misc.VM.latestUserDefinedLoader(VM.java:411) > >>>>> java.io.ObjectInputStream.latestUserDefinedLoader(ObjectInputStream.java:2351) > >>>>> java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:686) > >>>>> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1866) > >>>>> java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1749) > >>>>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2040) > >>>>> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571) > >>>>> java.io.ObjectInputStream.readObject(ObjectInputStream.java:431) > >>>>> org.postgresql.ds.common.BaseDataSource.readBaseObject(BaseDataSource.java:1210) > >>>>> org.postgresql.ds.common.BaseDataSource.initializeFrom(BaseDataSource.java:1220) > >>>>> org.postgresql.ds.PGPoolingDataSource.initialize(PGPoolingDataSource.java:267) > >>>>> org.postgresql.ds.PGPoolingDataSource.getConnection(PGPoolingDataSource.java:324) > >>>>> > >>>>> Any ideas? > >>>> What is different about the system that throws the error? > >>>> > >>>> For example: > >>>> > >>>> OS version > >>>> JDBC version > >>>> Postgres version > >>>> Java version > >>> Thank you for your reply. > >>> > >>> OS on working system: Linux 3.10.0-693.11.6.el7.x86_64 x86_64 > >>> OS on problem system: Linux 3.10.0-693.21.1.el7.x86_64 x86_64 > >>> > >>> JDBC version on both systems: 9.4.1209 > >>> > >>> Postgres version on both systems: 9.6.5 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11), 64-bit > >>> > >>> Java version on both systems: > >>> > >>> openjdk version "1.8.0_171" > >>> OpenJDK Runtime Environment (build 1.8.0_171-b10) > >>> OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode) > >>> > >> Hmm. > >> So what was the UnsatisifiedLinkError message, before the traceback above? > > java.lang.UnsatisfiedLinkError: sun.misc.VM.latestUserDefinedLoader0()Ljava/lang/ClassLoader; > > > > Thank you. > > > > > Should OpenJDK be looking for a sun class? Ah ha, that's it. Part of the deployment on the problem system was outdated. Thanks to all.