Return-Path: X-Original-To: apmail-geronimo-user-archive@www.apache.org Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 84BA26773 for ; Thu, 23 Jun 2011 01:51:39 +0000 (UTC) Received: (qmail 89215 invoked by uid 500); 23 Jun 2011 01:51:39 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 89178 invoked by uid 500); 23 Jun 2011 01:51:39 -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 89171 invoked by uid 99); 23 Jun 2011 01:51:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 01:51:39 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kevan.miller@gmail.com designates 209.85.213.54 as permitted sender) Received: from [209.85.213.54] (HELO mail-yw0-f54.google.com) (209.85.213.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 01:51:31 +0000 Received: by ywf7 with SMTP id 7so750505ywf.13 for ; Wed, 22 Jun 2011 18:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=NiF+aurGCdSELTSt98oF0eUIjUJVkk8JI9juFVFn6IE=; b=BBGWDObrPzhI6mWyjPSq47guvztUzwEeTwXfjh43Hm/BEilKpODxwuJVF0lhA095dG Vjxnt5/pW3pf8+lkwJSJD2QALUjgyK5ZPHCAp4kHB59Kdh+9DZGXjzlVm5X0cauXmS9z WDcjWqE85vKOJs3dxLw+X9fevPGQaATDURTSA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=EszWE4vZxeo9+uNwYFTPihqApiE2b0R17rlfVO32IjRlMbMPbbHRtigehOw5A0jUe7 zyBI43PxLip6QQGaCa16+m/J9/wn5t7UimCRjAPP8Dy40Ish8c4L3XBz9VEo+UBdOU7i D+B2t79GC4prEZhzGVI0JWOs9J+CjnFJ8XCt4= Received: by 10.236.154.7 with SMTP id g7mr2096551yhk.70.1308793870375; Wed, 22 Jun 2011 18:51:10 -0700 (PDT) Received: from [10.0.1.198] (cpe-066-057-037-066.nc.res.rr.com [66.57.37.66]) by mx.google.com with ESMTPS id w66sm746682yhi.52.2011.06.22.18.51.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Jun 2011 18:51:09 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: now as new thread: hidden-classes on ear lib directory From: Kevan Miller In-Reply-To: Date: Wed, 22 Jun 2011 21:51:07 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <35984405-C083-45A9-B8E5-E46F6FE87427@gmail.com> References: To: user@geronimo.apache.org X-Mailer: Apple Mail (2.1084) On Jun 21, 2011, at 3:51 AM, Marco Laponder wrote: > Hi All: > =20 > My apologies, my previous post was a reply on another subject mixing = up the thread. > So once more my post but now really as a new thread=85 > =20 > I have an ear which contains a war file. The jar files required by my > application are in the lib directory of the ear. The WEB-INF/lib > directory is empty. I am using hibernate version 3.6.0.Final and I = want > my application to use the jpa 2.0 of hibernate = (hibernate-jpa-2.0-api), > so I have added a hidden-classes element with a filter on > javax.persistence. > =20 > However when I have this construction, hibernate doesn't recognize my > annotated classes anymore (it gives an mapping exception Unknown > Entity). But when I move the libraries from the ear lib directory to = the > WEB-INF/lib directory I no longer have this exception. Hmm. It sounds like your war's are inheriting the hidden-classes = configuration. To be honest, I can't remember the specifics of how that = will/should work.=20 In general, each of your WAR's will have a ClassLoader. Their parent = will be the EAR ClassLoader. You want the EAR ClassLoader to have the = hidden classes, but not the WAR ClassLoaders. =46rom your description, = it sounds like this isn't the case. You could try defining each of your = wars in the deployment plan. Perhaps explicitly defining their = will override this behavior? Beyond that, unless somebody = remembers more, somebody will need to dig through the code... --kevan=