From dev-return-20145-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 15 15:55:26 2012 Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-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 BA6D99C6B for ; Wed, 15 Feb 2012 15:55:26 +0000 (UTC) Received: (qmail 82901 invoked by uid 500); 15 Feb 2012 15:55:26 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 82807 invoked by uid 500); 15 Feb 2012 15:55:26 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 82799 invoked by uid 99); 15 Feb 2012 15:55:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 15:55:26 +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; Wed, 15 Feb 2012 15:55:22 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A717E1B82D9 for ; Wed, 15 Feb 2012 15:55:01 +0000 (UTC) Date: Wed, 15 Feb 2012 15:55:01 +0000 (UTC) From: "Heath Thomann (Updated) (JIRA)" To: dev@openjpa.apache.org Message-ID: <1466204889.40957.1329321301686.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (OPENJPA-758) OpenJPA doesn't find ValueHandlers with an applicable class loader 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/OPENJPA-758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Heath Thomann updated OPENJPA-758: ---------------------------------- Affects Version/s: 2.2.0 1.2.2 2.0.0 2.1.1 Fix Version/s: 2.2.0 2.1.2 2.0.3 1.2.3 1.0.5 > OpenJPA doesn't find ValueHandlers with an applicable class loader > ------------------------------------------------------------------ > > Key: OPENJPA-758 > URL: https://issues.apache.org/jira/browse/OPENJPA-758 > Project: OpenJPA > Issue Type: Improvement > Affects Versions: 1.0.3, 1.2.2, 2.0.0, 2.1.1, 2.2.0 > Environment: WebSphere 6.1, any other, 1.0.3 and probably all existing others > Reporter: Jan Dockx > Assignee: Heath Thomann > Priority: Blocker > Fix For: 1.0.5, 1.2.3, 2.0.3, 2.1.2, 2.2.0 > > Attachments: OPENJPA-758-1.2.x.patch > > Original Estimate: 72h > Remaining Estimate: 72h > > We are working with ValueHandlers for enterprise applications that > will be deployed on WebSphere, currently 6.1.0.19. We believe that the > current OpenJPA implementation has made a less than stellar choice in > how to load value handlers, and suggest a change > ValueHandlers are naturally (or so we find) specific for certain value > types, that are often dependent on the semantics of your business, and > thus are part of the application, in some way bundled in the ear you > are deploying. We do unit testing out of the container with OpenJPA > 1.0.3, and everything works like a charm. > When we deploy on WebSphere however, nothing works. OpenJPA does not > find our value handlers. > Luckily OpenJPA is open source :-), so we found with certainty that > the reason is that OpenJPA tries to load the value handler with the > class loader that loaded the meta information for the property. The > class of that object is part of OpenJPA, and inside WebSphere, OpenJPA > is loaded with a class loader that has no access to the application > code, the code in the ear. So, ClassNotFoundException. Bummer. > The long term solution, we believe, is not to use the classloader > associated with the meta information for the property (i.e., the > OpenJPA class loader), but instead the class loader of the entity for > which we are working (which is also reachable via the parameters of > the method that does the loading). Using the class loader of the > actual value we want to handle is not an option, since the value can > be null. The entity however is normally also part of the application, > the ear, and cannot be null. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira