From user-return-6747-apmail-geronimo-user-archive=geronimo.apache.org@geronimo.apache.org Fri Jun 08 15:11:34 2007 Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 1249 invoked from network); 8 Jun 2007 15:11:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jun 2007 15:11:33 -0000 Received: (qmail 70410 invoked by uid 500); 8 Jun 2007 15:11:34 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 70379 invoked by uid 500); 8 Jun 2007 15:11:34 -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 70357 invoked by uid 99); 8 Jun 2007 15:11:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2007 08:11:34 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [69.147.95.67] (HELO smtp104.plus.mail.sp1.yahoo.com) (69.147.95.67) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 08 Jun 2007 08:11:28 -0700 Received: (qmail 9269 invoked from network); 8 Jun 2007 15:11:07 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=qExIB/oKR7RqrveIe+dZ91YXCFtW0ydzENk1agP7ZeGqiQ1qW700Op1ELDN+mw7DgNKlFOTEL6nDQZsz64rgo7LTI4z7iiSxiIQFykppnOD8D7a4c0OQSN5p4ExZquZUxGV7lRHNU4V4iV7FJBWDZyWXnFsh2xwuKA8w0lptt0o= ; Received: from unknown (HELO ?10.11.55.8?) (david_jencks@63.105.20.225 with plain) by smtp104.plus.mail.sp1.yahoo.com with SMTP; 8 Jun 2007 15:11:07 -0000 X-YMail-OSG: XfhFuIUVM1khjvg.pwPY4vd870bwK3FpucUATRcj_HbEt9eBHgk8sOun0fQwkh5CHZ6ShWmZ8oGurFn8pVAYuOWagwJhafRAV9wSdsHDM4NqRI1HEg-- Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <11024722.post@talk.nabble.com> References: <11024722.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9EB2F269-BF74-489D-BF2F-BF7D12AFD47C@yahoo.com> Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: Problems in configuring dependency on EAR Date: Fri, 8 Jun 2007 08:11:44 -0700 To: user@geronimo.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org On Jun 8, 2007, at 4:25 AM, Alex Korostov wrote: > > I'm using Geronimo 1.1 and 1.1.1 with Tomcat. > > I have a EAR that includes JARs and a WAR. This application works > fine. > > Also I have another (second) WAR application that is NOT included > in that > EAR, but have to use some classes from the JARs and a WAR resided > in the > EAR. > I declared dependency on this EAR module in the geronimo-web.xml of > the > second WAR. However I got the NoClassDefFoundError exceptions when > trying to > use the classes from EAR's JARs or WAR. > It looks like that by default, if I create a dependency on EAR I > still do > not have the EAR's classes in the classpath. > > Note, that if I have two WARs (not inside EARs), the same > dependency between > WARs works well. Even classes from the JARs located in the WEB-INF/lib > folder are accessible for the second WAR. Since this works I think that you have successfully figured out to depend on the deployed module "car" file rather than the undeployed war/ear/whatever file. > > What should I do to get the same approach work if I need use > classes from > EAR? In an ear, we set up one classloader for all the rar and ejb jar modules, together with their manifest classpath (I'll call this the ear classloader), and one classloader for each war file. If you have a dependency on the ear module you just get the classes in the ear classloader. I don't think it's possible to have a dependency on one of the internal war classloaders. So I think your options are: - use 2.0-M6 and put all the classes you need in jars in a lib directory inside the ear - use 1.1.1 and add a fake ejb jar that has a deployment descriptor but no ejbs. Either put the classes you need externally in this jar or reference the jars in the manifest classpath. You could also open a jira requesting the ability to depend on wars inside ears. thanks david jencks > > -- > View this message in context: http://www.nabble.com/Problems-in- > configuring-dependency-on-EAR-tf3889208s134.html#a11024722 > Sent from the Apache Geronimo - Users mailing list archive at > Nabble.com. >