Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 96596 invoked from network); 16 May 2007 22:30:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 May 2007 22:30:40 -0000 Received: (qmail 78709 invoked by uid 500); 16 May 2007 22:30:43 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 78653 invoked by uid 500); 16 May 2007 22:30:43 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 78641 invoked by uid 99); 16 May 2007 22:30:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2007 15:30:43 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2007 15:30:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 26AA771406C for ; Wed, 16 May 2007 15:30:16 -0700 (PDT) Message-ID: <24226767.1179354616126.JavaMail.jira@brutus> Date: Wed, 16 May 2007 15:30:16 -0700 (PDT) From: "Alex G (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Created: (AXIS2-2679) DeploymentClassloader unable to access resources from parent classloader MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org DeploymentClassloader unable to access resources from parent classloader ------------------------------------------------------------------------ Key: AXIS2-2679 URL: https://issues.apache.org/jira/browse/AXIS2-2679 Project: Axis 2.0 (Axis2) Issue Type: Bug Components: kernel Affects Versions: 1.2 Reporter: Alex G The following code does not work: AxisService serv = _log.debug("DEPLOYED SERVICE: " + serv.getName()); _log.info("************* SPRING LOAD *****************"); ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext( new String[] { "/META-INF/spring/web-components.xml" }, false, parentContext); appContext.setClassLoader(serv.getClassLoader()); appContext.refresh(); It complains about missing schemas (since web-components.xml is using spring schemas). I tracked the problem down to Axis2 DeploymentClassloader and discovered that this classloader would not load any resource that is located in the parent classloader dues to the following code: public InputStream getResourceAsStream(String name) { URL url =findResource(name); if(url!=null){ try { return url.openStream(); } catch (IOException e) { throw new RuntimeException(e); } } return null; } Acoording to J2SE API spec (in my interpretaion), first line should be URL url =getResource(name); and not URL url =findResource(name); Changing findResource to getResource - fixes the problem. Formal diff: ==== modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java#1 - modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java ====252c252 < URL url =findResource(name); --- > URL url =getResource(name); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org