From owner-freebsd-java@FreeBSD.ORG Tue Apr 22 18:30:30 2014 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id DBF27202; Tue, 22 Apr 2014 18:30:29 +0000 (UTC) Message-ID: <5356B541.2040707@FreeBSD.org> Date: Tue, 22 Apr 2014 14:30:25 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Ronald Klop , freebsd-java@freebsd.org Subject: Re: Difference between openjdk and linux-sun-java References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 18:30:30 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-04-22 05:09:40 -0400, Ronald Klop wrote: > On Sat, 19 Apr 2014 20:47:52 +0200, Juris Kaminskis > wrote: > >> Hello, >> >> I have $ java -version openjdk version "1.6.0_32" OpenJDK Runtime >> Environment (build 1.6.0_32-b30) OpenJDK 64-Bit Server VM (build >> 23.25-b01, mixed mode) >> >> and >> >> $ /usr/local/linux-sun-jdk1.7.0/bin/java -version java version >> "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) >> Java HotSpot(TM) Server VM (build 24.51-b03, mixed mode) >> >> When I run my compiled class with openjdk I get: >> >> 21:43:47,348 ERROR [I] java.lang.NullPointerException at >> org.jcp.xml.dsig.internal.dom.Utils.getBoolean(Utils.java:114) at >> org.jcp.xml.dsig.internal.dom.Utils.secureValidation(Utils.java:110) >> >> >> but when I run with linux-sun-java version no error is generated. I >> understood that it is related to Interface XMLCryptoContext, but >> how can I pinpoint the difference to trace why openjdk is not >> working for me on freebsd? >> >> thanks for any hints Juris > > > Quite a hard question for people to answer without any example > code which people can use to replay your issue. > > According to some on-line docs there is no secureValidation() or > getBoolean() method in that Utils class: > http://www.docjar.com/html/api/org/jcp/xml/dsig/internal/dom/Utils.java.html > > > > So I can't comment on your issue without more information. My > advice would be to download the source of the org.jcp...bla package > you are using (maybe it is inside the jdk, I don't know from your > information and don't the time to look it up for you) and look at > the mentioned line numbers what is happening so it generates a > NPE. These are internal classes adopted from Apache project. Please see the difference between JDK6 and JDK7. http://hg.openjdk.java.net/jdk6/jdk6/jdk/file/0d7eefa2946a/src/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java Basically, the "compiled class" is not compiled for JDK6. Please try java/openjdk7 or java/openjdk8 instead. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAEBAgAGBQJTVrU5AAoJEHyflib82/FG+xsH/1Ur8qFdJPP2U5H4jAe1/MlP EiCBHVIlV8XURX/87DFlU4vJuLH7LObHg6EucDs8MVMvbAi/3gfjbFpXSF2Ou6y3 fw4BAFQAPfJftbIAQHwQkz74OgqEuYA82CygHohZwqXBFl5mjLQPQUHmDmgE4Vqn xbz2f4xY+3M8YCu8oK2Fd2FHwsJIZoid654TDWBAHhcJPGyIXGs/YjA1XhftRbwJ ExY+wduqE27+QjnpSHcAp/flXBz763ZcEUwE7M0oWBggyUogGuGoqIxsieswU+6X 0Y0c8+Ri9Rl4i6zmt91wOf6P/jNQbNFSGTvK1oKp9C+B3eio5mGl24ltcpZKwUs= =3Lxo -----END PGP SIGNATURE-----