Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 72588 invoked from network); 29 Aug 2007 19:04:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Aug 2007 19:04:49 -0000 Received: (qmail 59118 invoked by uid 500); 29 Aug 2007 19:04:43 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 59084 invoked by uid 500); 29 Aug 2007 19:04:43 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 59073 invoked by uid 99); 29 Aug 2007 19:04:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2007 12:04:43 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kevan.miller@gmail.com designates 66.249.82.225 as permitted sender) Received: from [66.249.82.225] (HELO wx-out-0506.google.com) (66.249.82.225) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2007 19:04:38 +0000 Received: by wx-out-0506.google.com with SMTP id i27so254934wxd for ; Wed, 29 Aug 2007 12:04:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:in-reply-to:references:content-type:message-id:from:subject:date:to:x-mailer; b=Kwj+J1zW8fgAjSG7ie5LcIlrGOh7aMz3L4Oasnhy9qkLUDS6AEwN9UvJj1eYwQhxVEcvtW3fKan6c1M6Loh0qFdW+IeJrF4CdMgI0CDAxk5XKG9JFR2bc3CorVfpW4j5COmgnAfORd7oSnZuoQ1FkrDOVyzXyT96s2ZZ0HaWdk0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:in-reply-to:references:content-type:message-id:from:subject:date:to:x-mailer; b=c6FAvuPrnm110usNU+Acx1Nt+xXiZrjAo5QdcnbKXuEbrqnpxmGRD4RzQN29G4SGwUERXQMr+4/ykh/i4evp5OMfosmjb0bx81MAgCWoIsS7OA5graKWCCH9tKGiLLHn+GLCo64AkvCAhA3wlc2eLVuiWcYLvRQTV3ZCm1yXbG4= Received: by 10.90.100.2 with SMTP id x2mr2952668agb.1188414257078; Wed, 29 Aug 2007 12:04:17 -0700 (PDT) Received: from ?192.168.1.101? ( [69.134.127.1]) by mx.google.com with ESMTPS id 7sm182664aga.2007.08.29.12.04.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 29 Aug 2007 12:04:16 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <46D55251.30407@cofit.com> References: <46D34668.5010304@gmail.com> <1F2FC73F-4F7C-4159-B6E8-C916C77F8201@gmail.com> <46D362F6.7000303@gmail.com> <7EFAA85B-7A32-4032-821F-7EBAF8E8CA8F@yahoo.com> <475E513C-9C24-4A9C-9348-CA136C5025CD@gmail.com> <46D3F327.4030304@gmail.com> <806D5618-397C-4EAF-967D-85CE1F01CFE2@gmail.com> <46D41E02.5010900@gmail.com> <46D4408D.5020201@gmail.com> <2B9F4EC8-A59F-43A7-9F9A-CB429D4FAECD@gmail.com> <46D548F9.4040000@gmail.com> <46D54D0C.602@cofit.com> <46D55062.5020601@cofit.com> <46D55251.30407@cofit.com> Content-Type: multipart/alternative; boundary=Apple-Mail-7--346352416 Message-Id: <88615A76-28AB-4111-82C6-8DA332DD7619@gmail.com> From: Kevan Miller Subject: Re: Problem at geronimo boot Date: Wed, 29 Aug 2007 15:04:04 -0400 To: user@geronimo.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-7--346352416 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Aug 29, 2007, at 7:02 AM, Paolo Denti wrote: > Ok Kevan, found. browsing through the sources i see the the > ProxyManager interface has changed. the signature of the > createProxy methods is the following > public Object createProxy(AbstractName target, ClassLoader loader); > public Object createProxy(AbstractName target, Class type); > now i do not know exactly how to modify the > GeronimoTransactionManagerLookup in order to use new ProxyManager. Doh... Sorry. Was right in front of my face... Perhaps we should start meeting for a second cup of coffee? ;-) What a pain all this reflection, is... The following compiles. I haven't tested. Dario or Viet, could you give it a spin? Note that the this doesn't contain a package name. You'll need to add one... I'd rather the example not use the org.hibernate namespace... javac CLASSPATH setup: export CLASSPATH=geronimo-tomcat6-jee5-2.0.1/lib/geronimo- kernel-2.0.1.jar:geronimo-tomcat6-jee5-2.0.1/repository/org/apache/ geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo- jta_1.1_spec-1.1.jar:hibernate-3.2/build/hibernate3.jar New source: import org.apache.geronimo.kernel.Kernel; import org.apache.geronimo.kernel.KernelRegistry; import org.apache.geronimo.gbean.AbstractName; import org.apache.geronimo.gbean.AbstractNameQuery; import org.hibernate.HibernateException; import org.hibernate.transaction.TransactionManagerLookup; import java.util.Properties; import java.util.Set; import javax.transaction.TransactionManager; public class GeronimoTransactionManagerLookup implements TransactionManagerLookup { public static final String UserTransactionName = "java:comp/ UserTransaction"; public TransactionManager getTransactionManager(Properties props) throws HibernateException { Kernel kernel = KernelRegistry.getSingleKernel(); AbstractNameQuery tmQuery = new AbstractNameQuery(null, null, TransactionManager.class.getName()); Set tmSet = kernel.listGBeans(tmQuery); if (tmSet.size() != 1) { throw new HibernateException("Geronimo TransactionManager Lookup Failed. Too many GBean instances"); } return (TransactionManager)tmSet.toArray()[0]; } public String getUserTransactionName() { return UserTransactionName; } } --kevan > > Paolo Denti wrote: >> the problem is >> >> java.lang.NoSuchMethodException: >> org.apache.geronimo.kernel.proxy.ProxyManager.createProxy >> (javax.management.ObjectName, java.lang.Class) >> >> ?? are the online javadocs correct for the 2.0.1 version ? >> >> Paolo Denti wrote: >>> no, never mind ... too many tries and i wrote this "nonsense" >>> stuff ... the clzArray is the parameter list of the >>> createProxyMethod ... it is correct. >>> anyway it fails on the proxyManagerClass.getMethod("createProxy", >>> clzArray) call. >>> >>> Paolo Denti wrote: >>>> Kevan, i tried and following the execution, the problem is in >>>> the proxyManagerClass.getMethod("createProxy", clzArray); >>>> the getMethod call fails. >>>> >>>> But looking at the javadoc i see that the signature of the >>>> ProxyManager createProxy method is >>>> Object createProxy(javax.management.ObjectName, Class) >>>> but we are inovoking proxyManagerClass.getMethod("createProxy", >>>> clzArray) where clzArray is a Class[] as if the signature were >>>> Object createProxy(javax.management.ObjectName, Class[]) >>>> >>>> >>>> >>>> >>>> Kevan Miller wrote: >>>>> >>>>> On Aug 28, 2007, at 11:34 AM, Paolo Denti wrote: >>>>> >>>>>> ok, thanks. therefore the problem "should" lie in how the >>>>>> transactionManager is looked up, that is the method >>>>>> getTransactionManager of the GeronimoTransactionManagerLookup >>>>>> class. >>>>> >>>>> Right. Paolo, at a minimum, I think you need to update your >>>>> GeronimoTransactionManagerLookup class to contain the following >>>>> setting of TransactionMgrGBeanName: >>>>> >>>>> public static final String >>>>> TransactionMgrGBeanName="geronimo:J2EEServer=geronimo,ServiceModul >>>>> e=org.apache.geronimo.configs/transaction/2.0.1/ >>>>> car,j2eeType=TransactionManager,name=TransactionManager"; >>>>> >>>>> I don't have a working hibernate environment, at the moment. If >>>>> you could try this new setting, it would be great... >>>>> >>>>> --kevan >>>>> --Apple-Mail-7--346352416 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
On Aug 29, 2007, = at 7:02 AM, Paolo Denti wrote:

Ok Kevan, found. = browsing through the sources i see the the ProxyManager = interface has changed. the signature of the createProxy methods is the = following
public Object createProxy(AbstractName =
target, ClassLoader loader);
public Object createProxy(AbstractName target, Class type);
= now i do not know = exactly how to modify the GeronimoTransactionManagerLookup in order to = use new ProxyManager.

Doh... Sorry. Was right in = front of my face... Perhaps we should start meeting for a second cup of = coffee? ;-)=A0

What a pain all this = reflection, is...=A0The following compiles. I haven't tested. Dario or = Viet, could you give it a spin?

Note that the this doesn't = contain a package name. You'll need to add one... I'd rather the example = not use the org.hibernate namespace...

javac CLASSPATH = setup:
export = CLASSPATH=3Dgeronimo-tomcat6-jee5-2.0.1/lib/geronimo-kernel-2.0.1.jar:gero= nimo-tomcat6-jee5-2.0.1/repository/org/apache/geronimo/specs/geronimo-jta_= 1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar:hibernate-3.2/build/hibernate3.= jar

New = source:

import = org.apache.geronimo.kernel.Kernel;
import = org.apache.geronimo.kernel.KernelRegistry;
import = org.apache.geronimo.gbean.AbstractName;
import = org.apache.geronimo.gbean.AbstractNameQuery;

import = org.hibernate.HibernateException;
import = org.hibernate.transaction.TransactionManagerLookup;

import = java.util.Properties;
import java.util.Set;
import = javax.transaction.TransactionManager;

public class = GeronimoTransactionManagerLookup
=A0 =A0 implements = TransactionManagerLookup
{

=A0 =A0 public static final = String UserTransactionName =3D = "java:comp/UserTransaction";

=A0 =A0 public = TransactionManager getTransactionManager(Properties props) throws = HibernateException {
=A0 =A0 =A0 =A0 =A0 =A0 Kernel kernel =3D = KernelRegistry.getSingleKernel();
=A0 =A0 =A0 =A0 =A0 =A0 = AbstractNameQuery tmQuery =3D new AbstractNameQuery(null, null, = TransactionManager.class.getName());
=A0 =A0 =A0 =A0 =A0 =A0 = Set tmSet =3D kernel.listGBeans(tmQuery);
=A0 =A0 =A0 =A0 =A0 = =A0 if (tmSet.size() !=3D 1) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = throw new HibernateException("Geronimo TransactionManager Lookup Failed. = Too many GBean instances");
=A0 =A0 =A0 =A0 =A0 =A0 = }
=A0 =A0 =A0 =A0 =A0 =A0 return = (TransactionManager)tmSet.toArray()[0];
=A0 =A0 = }

=A0 =A0 = public String getUserTransactionName() {
=A0 =A0 =A0 =A0 = return UserTransactionName;
=A0 =A0 = }
}


--kevan


=
Paolo Denti wrote:
the problem = is

java.lang.NoSuchMethodException: = org.apache.geronimo.kernel.proxy.ProxyManager.createProxy(javax.management= .ObjectName, java.lang.Class)

?? are the online = javadocs correct for the 2.0.1 version ?

Paolo Denti wrote: =
= no, never = mind ... too many tries and i wrote this "nonsense" stuff ... the = clzArray is the parameter list of the createProxyMethod ... it is = correct.
anyway it fails on the
proxyManagerClass.getMethod("createProxy", clzArray) = call.

Paolo Denti wrote:
Kevan, i tried = and following the execution, the problem is in the = proxyManagerClass.getMethod("createProxy", clzArray);
the getMethod = call fails.

But looking at the javadoc i see that the = signature of the ProxyManager createProxy method is
=
Object =
createProxy(javax.management.ObjectName, Class)
but we are = inovoking proxyManagerClass.getMethod("createProxy", clzArray) where = clzArray is a Class[] as if the signature were
=
Object createProxy(javax.management.ObjectName, =
Class[])




Kevan Miller = wrote:

On Aug 28, 2007, at 11:34 = AM, Paolo Denti wrote:

= ok, = thanks. therefore the problem "should" lie in how the transactionManager = is looked up, that is the method getTransactionManager of the = GeronimoTransactionManagerLookup class.
=

Right. Paolo, at a = minimum, I think you need to update your = GeronimoTransactionManagerLookup class to contain the following setting = of TransactionMgrGBeanName:=A0

public = static final String = TransactionMgrGBeanName=3D"geronimo:J2EEServer=3Dgeronimo,ServiceModule=3D= org.apache.geronimo.configs/transaction/2.0.1/car,j2eeType=3DTransactionMa= nager,name=3DTransactionManager";

I don't = have a working hibernate environment, at the moment. If you could try = this new setting, it would be great...

=
--kevan

=

= --Apple-Mail-7--346352416--