Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 59239 invoked from network); 17 May 2008 20:14:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 May 2008 20:14:23 -0000 Received: (qmail 75627 invoked by uid 500); 17 May 2008 20:14:21 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 75247 invoked by uid 500); 17 May 2008 20:14:19 -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 75079 invoked by uid 99); 17 May 2008 20:14:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 May 2008 13:14:19 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 May 2008 20:13:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1D88F234C127 for ; Sat, 17 May 2008 13:13:56 -0700 (PDT) Message-ID: <320255511.1211055236120.JavaMail.jira@brutus> Date: Sat, 17 May 2008 13:13:56 -0700 (PDT) From: "Deepal Jayasinghe (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Assigned: (AXIS2-3756) Issue loading module when classpath is on a network In-Reply-To: <507687388.1208765541507.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-3756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Deepal Jayasinghe reassigned AXIS2-3756: ---------------------------------------- Assignee: Deepal Jayasinghe > Issue loading module when classpath is on a network > --------------------------------------------------- > > Key: AXIS2-3756 > URL: https://issues.apache.org/jira/browse/AXIS2-3756 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: kernel > Affects Versions: 1.3 > Environment: Windows XP, Windows Server 2003 > Reporter: Mikkel T. Jensen > Assignee: Deepal Jayasinghe > > When the classpath of a client application is setup to point to a network (e.g. \\servername\share\domain_classpath, for instance in a cluster of application servers), axis2 fails to engage modules on the classpath with an AxisFault with the message "Unable to engage module". The problem is located in the class org.apache.axis2.deployment.RepositoryListener in the method loadClassPathModules(): > protected void loadClassPathModules() { > ModuleDeployer deployer = deploymentEngine.getModuleDeployer(); > // Find Modules on the class path (i.e. if classpath includes "addressing.mar" then > // addressing will be available for engaging) > ClassLoader loader = Thread.currentThread().getContextClassLoader(); > try { > Enumeration moduleURLs = loader.getResources("META-INF/module.xml"); > while (moduleURLs.hasMoreElements()) { > try { > URL url = (URL)moduleURLs.nextElement(); > String fileName = url.toString(); > if (fileName.startsWith("jar")) { > url = ((java.net.JarURLConnection) url.openConnection()).getJarFileURL(); > fileName = url.toString(); > File f = new File(new URI(fileName)); > addFileToDeploy(f, deployer ,WSInfo.TYPE_MODULE); > } else if (fileName.startsWith("file")) { > fileName = fileName.substring(0, fileName.lastIndexOf("/META-INF/module.xml")); > File f = new File(new URI(fileName)); // *** IllegalArgumentException thrown here! > addFileToDeploy(f, deployer ,WSInfo.TYPE_MODULE); > } > } catch (URISyntaxException e) { > log.info(e); > } > } > } catch (Exception e) { > // Oh well, log the problem > log.debug(e); > } > // rest of method omitted. > The method finds all the module.xml files on the classpath and creates a File object for each of them. The use of the File class assumes that the classloader is not a network classloader. However, If the classpath is set up as mentioned above, the URI created will contain an authority part, and an IllegalArgumentException is thrown in the line marked *** above. To make things worse, the loop is terminated by the exception, which is debugged to a log (meaning it is lost in my system, and probably most others). > Possible solutions: > As a minimum, error handling should be improved to make it easier to locate this problem when it happens. > The use of File instances to load the module.xml files should eliminated (replaced by InputStreams?) to make module loading robust to classloaders working over a network. -- 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