Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 15143 invoked from network); 19 May 2008 17:12:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 May 2008 17:12:20 -0000 Received: (qmail 11990 invoked by uid 500); 19 May 2008 17:12:20 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 11972 invoked by uid 500); 19 May 2008 17:12:20 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 11961 invoked by uid 99); 19 May 2008 17:12:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2008 10:12:20 -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; Mon, 19 May 2008 17:11:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A45FA234C117 for ; Mon, 19 May 2008 10:11:55 -0700 (PDT) Message-ID: <1663276820.1211217115672.JavaMail.jira@brutus> Date: Mon, 19 May 2008 10:11:55 -0700 (PDT) From: "Alton Idowu (JIRA)" To: issues@cxf.apache.org Subject: [jira] Created: (CXF-1596) DynamicClientFactory.setupClasspath throws a null pointer exception if classloader does not contain jars MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org DynamicClientFactory.setupClasspath throws a null pointer exception if classloader does not contain jars -------------------------------------------------------------------------------------------------------- Key: CXF-1596 URL: https://issues.apache.org/jira/browse/CXF-1596 Project: CXF Issue Type: Bug Components: JAXB Databinding Affects Versions: 2.1 Environment: Websphere 6.1.0.7, jdk 1.5.09, Solaris Reporter: Alton Idowu On WAS, one of the ExtClassCloader returns a null instead of an empty array when getUrls is called. Stack trace: Caused by: java.lang.RuntimeException: java.lang.NullPointerException at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:215) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:150) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:129) at mil.af.ilss.common.service.WebServiceUtil.invokeWebService(WebServiceUtil.java:43) ... 1 more Caused by: java.lang.NullPointerException at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.setupClasspath(DynamicClientFactory.java:404) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:213) The following is the list of classloaders in order: com.ibm.ws.classloader.CompoundClassLoader Delegation Mode: PARENT_FIRST com.ibm.ws.classloader.JarClassLoader Delegation mode: PARENT_LAST com.ibm.ws.classloader.ProtectionClassLoader com.ibm.ws.bootstrap.ExtClassLoader The following code should fix the issue. setupClasspath method line 402: if (tcl instanceof URLClassLoader) { URL[] urls = ((URLClassLoader)tcl).getURLs(); if (urls != null) { for (URL url : urls) { if (url.getProtocol().startsWith("file")) { File file; try { file = new File(url.toURI().getPath()); } catch (URISyntaxException urise) { file = new File(url.getPath()); } if (file.exists()) { classPath.append(file.getAbsolutePath()) .append(System .getProperty("path.separator")); if (file.getName().endsWith(".jar")) { addClasspathFromManifest(classPath, file); } } } } } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.