Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 15699 invoked from network); 1 Feb 2010 12:57:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Feb 2010 12:57:55 -0000 Received: (qmail 57630 invoked by uid 500); 1 Feb 2010 12:57:55 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 57578 invoked by uid 500); 1 Feb 2010 12:57:55 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 57570 invoked by uid 99); 1 Feb 2010 12:57:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2010 12:57:55 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gregory.joseph@magnolia-cms.com designates 109.71.96.11 as permitted sender) Received: from [109.71.96.11] (HELO mail.magnolia-cms.com) (109.71.96.11) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2010 12:57:42 +0000 Received: from [10.0.0.106] ([213.173.174.10]) (authenticated user gregory.joseph@magnolia-cms.com) by mail.magnolia-cms.com (Kerio MailServer 6.7.3 patch 1) (using TLSv1/SSLv3 with cipher AES128-SHA (128 bits)) for dev@jackrabbit.apache.org; Mon, 1 Feb 2010 13:57:20 +0100 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1077) Subject: Re: [31392] MAGNOLIA-2988 ntReg.getNodeTypeDef() has a different return type in jackrabbit 2.0, so this causes a binary incompatibility if we compile the provider class with jackrabbit 1 .6 From: =?windows-1252?Q?Gr=E9gory_Joseph?= In-Reply-To: <5C03D035-5D6A-49CC-81FA-E4AAA8ED00EE@magnolia-cms.com> Date: Mon, 1 Feb 2010 13:57:20 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <4492B8AB-12F6-4348-883D-1995F6ED4E62@magnolia-cms.com> References: <20100131210750.DFFD47688F20@dev.magnolia.info> <5C03D035-5D6A-49CC-81FA-E4AAA8ED00EE@magnolia-cms.com> To: dev@jackrabbit.apache.org X-Mailer: Apple Mail (2.1077) X-Virus-Checked: Checked by ClamAV on apache.org Sorry, wrong list, obviously. On Feb 1, 2010, at 1:50 PM, Gr=E9gory Joseph wrote: > Why don't we use a different implementation and module for this = instead ? >=20 > -g >=20 > On Jan 31, 2010, at 10:07 PM, svn@magnolia-cms.com wrote: >=20 >> Revision >> 31392 >> Author >> fgiust >> Date >> 2010-01-31 22:07:49 +0100 (Sun, 31 Jan 2010) >> Log Message >>=20 >> MAGNOLIA-2988 ntReg.getNodeTypeDef() has a different return type in = jackrabbit 2.0, so this causes a binary incompatibility if we compile = the provider class with jackrabbit 1.6 >> Modified Paths >>=20 >> =95 = community/magnolia/trunk/magnolia-core/src/main/java/info/magnolia/jackrab= bit/ProviderImpl.java >> Diff >>=20 >> Modified: = community/magnolia/trunk/magnolia-core/src/main/java/info/magnolia/jackrab= bit/ProviderImpl.java (31391 =3D> 31392) >>=20 >> --- = community/magnolia/trunk/magnolia-core/src/main/java/info/magnolia/jackrab= bit/ProviderImpl.java 2010-01-31 18:15:13 UTC (rev 31391) >> +++ = community/magnolia/trunk/magnolia-core/src/main/java/info/magnolia/jackrab= bit/ProviderImpl.java 2010-01-31 21:07:49 UTC (rev 31392) >>=20 >> @@ -73,6 +73,7 @@ >>=20 >> import java.io.FileNotFoundException; >>=20 >> import java.io.IOException; >>=20 >> import java.io.InputStream; >>=20 >> +import java.lang.reflect.InvocationTargetException; >>=20 >> import java.lang.reflect.Method; >>=20 >> import java.util.Hashtable; >>=20 >> import java.util.Iterator; >>=20 >> @@ -333,18 +334,45 @@ >>=20 >> } >>=20 >>=20 >>=20 >> try { >>=20 >> - ntReg.getNodeTypeDef(ntname); >>=20 >> + >> + // return value has changed in jackrabbit 2, we = still have to use reflection here >> + // ntReg.getNodeTypeDef(ntname); >> + >> + Method method =3D = ntReg.getClass().getMethod("getNodeTypeDef", Name.class); >> + method.invoke(ntReg, ntname); >>=20 >> } >>=20 >> - catch (NoSuchNodeTypeException nsne) { >> - log.info("Registering nodetype {}", ntname); = //$NON-NLS-1$ >>=20 >> + catch (IllegalArgumentException e) >> + { >> + throw new RepositoryException(e.getMessage(), = e); >> + } >> + catch (IllegalAccessException e) >> + { >> + throw new RepositoryException(e.getMessage(), = e); >> + } >> + catch (SecurityException e) >> + { >> + throw new RepositoryException(e.getMessage(), = e); >> + } >> + catch (NoSuchMethodException e) >> + { >> + throw new RepositoryException(e.getMessage(), = e); >> + } >> + catch (InvocationTargetException ite) >> + { >> + if (ite.getTargetException() instanceof = NoSuchNodeTypeException) >> + { >> + log.info("Registering nodetype {}", ntname); = //$NON-NLS-1$ >>=20 >>=20 >>=20 >> - try { >> - // reflection for jackrabbit 1+2 = compatibility >> - getMethod(NodeTypeRegistry.class, = "registerNodeType").invoke(ntReg, new Object[]{def}); >>=20 >> + try >> + { >> + // reflection for jackrabbit 1+2 = compatibility >> + getMethod(NodeTypeRegistry.class, = "registerNodeType").invoke(ntReg, new Object[]{def }); >> + } >> + catch (Exception e) >> + { >> + throw new = RepositoryException(e.getMessage(), e); >> + } >>=20 >> } >>=20 >> - catch (Exception e) { >> - throw new = RepositoryException(e.getMessage(), e); >> - } >>=20 >> } >>=20 >> } >>=20 >>=20 >>=20 >>=20 >>=20 >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: >> ---------------------------------------------------------------- >=20 >=20