Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 29955 invoked from network); 24 Nov 2008 02:48:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Nov 2008 02:48:46 -0000 Received: (qmail 50601 invoked by uid 500); 24 Nov 2008 02:48:55 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 50582 invoked by uid 500); 24 Nov 2008 02:48:55 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 50571 invoked by uid 99); 24 Nov 2008 02:48:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Nov 2008 18:48:55 -0800 X-ASF-Spam-Status: No, hits=4.8 required=10.0 tests=DNS_FROM_OPENWHOIS,HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2008 02:47:29 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L4RUj-0007bz-VJ for user@cayenne.apache.org; Sun, 23 Nov 2008 18:48:13 -0800 Message-ID: <20654024.post@talk.nabble.com> Date: Sun, 23 Nov 2008 18:48:13 -0800 (PST) From: rigel To: user@cayenne.apache.org Subject: Loading cayenne mapped class from URLClassLoader MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6716_11224511.1227494893963" X-Nabble-From: zetatau@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_6716_11224511.1227494893963 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I am trying to load some "jarred" class mappings generated by Cayenne using the URLClassLoader, of course if I load all libs into the starting classloader all goes well, but when I use the URLClassLoader I receive the following error message suddenly after invoking "context.performQuery(select1)" : [v.2.0.4 October 8 2007] No DataMap found, can't route query org.apache.cayenne.query.SelectQuery@1764be1[root=class ...] My code: DataContext context = DataContext.createDataContext(); URLClassLoader urlClassLoader = new URLClassLoader(remoteLibs); try { //Class clzz = Class.forName("org.someproject.SomeClass",true,urlClassLoader); Class clzz = urlClassLoader.loadClass("org.someproject.SomeClass"); Method m = clzz.getDeclaredMethod("executeCustom", new Class[]{DataContext.class}); m.invoke(null, new Object[]{context}); } catch (Throwable e) { e.printStackTrace(); } Just to run it, where can I declare some local filesystem position to search for XML data mappings? P.S. I noticed FileConfiguration.addResourcePath & co. but it works only if all libraries are loaded by the starting classloader -- View this message in context: http://www.nabble.com/Loading-cayenne-mapped-class-from-URLClassLoader-tp20654024p20654024.html Sent from the Cayenne - User mailing list archive at Nabble.com. ------=_Part_6716_11224511.1227494893963--