Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 230AF6E11 for ; Mon, 30 May 2011 09:20:29 +0000 (UTC) Received: (qmail 69115 invoked by uid 500); 30 May 2011 09:20:29 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 69071 invoked by uid 500); 30 May 2011 09:20:28 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 69064 invoked by uid 99); 30 May 2011 09:20:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2011 09:20:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2011 09:20:27 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 56E82E858F for ; Mon, 30 May 2011 09:19:47 +0000 (UTC) Date: Mon, 30 May 2011 09:19:47 +0000 (UTC) From: "Robert Lieb (JIRA)" To: derby-dev@db.apache.org Message-ID: <991332833.53068.1306747187352.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <7524304.214151294417125932.JavaMail.jira@thor> Subject: [jira] [Commented] (DERBY-4961) org.apache.derby.tools.sysinfo return wrong minor & major versions if ClientDriver is used MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-4961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041052#comment-13041052 ] Robert Lieb commented on DERBY-4961: ------------------------------------ If the sysinfo class always returns the embedded version, why is DBMS.properties than not in the derbyclient jar file. This would solve the problem and is compline to the API. > org.apache.derby.tools.sysinfo return wrong minor & major versions if ClientDriver is used > ------------------------------------------------------------------------------------------ > > Key: DERBY-4961 > URL: https://issues.apache.org/jira/browse/DERBY-4961 > Project: Derby > Issue Type: Bug > Components: Network Client > Affects Versions: 10.7.1.1 > Reporter: Juraj Burian > > I am not sure that this is a bug. > Hibernate uses code like this: > final Class sysinfoClass = ReflectHelper.classForName( "org.apache.derby.tools.sysinfo", this.getClass() ); > final Method majorVersionGetter = sysinfoClass.getMethod( "getMajorVersion", ReflectHelper.NO_PARAM_SIGNATURE ); > final Method minorVersionGetter = sysinfoClass.getMethod( "getMinorVersion", ReflectHelper.NO_PARAM_SIGNATURE ); > driverVersionMajor = ( (Integer) majorVersionGetter.invoke( null, ReflectHelper.NO_PARAMS ) ).intValue(); > driverVersionMinor = ( (Integer) minorVersionGetter.invoke( null, ReflectHelper.NO_PARAMS ) ).intValue(); > The problem is that if ClientDriver is used, this code returns -1, -1 instead of correct version numbers. > Hibernate checks versions and if not correct numbers returned, then exception is raised (versions are checked when sequence is used - so it is new feature for both of sides :-) ) > I tried test this by hands and achieved the same behavior. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira