Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 46846 invoked from network); 24 Mar 2010 19:53:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Mar 2010 19:53:49 -0000 Received: (qmail 97959 invoked by uid 500); 24 Mar 2010 19:53:49 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 97677 invoked by uid 500); 24 Mar 2010 19:53:48 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 97669 invoked by uid 99); 24 Mar 2010 19:53:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 19:53:48 +0000 X-ASF-Spam-Status: No, hits=-1123.8 required=10.0 tests=ALL_TRUSTED,AWL 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; Wed, 24 Mar 2010 19:53:47 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 474CF234C4E7 for ; Wed, 24 Mar 2010 19:53:27 +0000 (UTC) Message-ID: <1044539390.469461269460407291.JavaMail.jira@brutus.apache.org> Date: Wed, 24 Mar 2010 19:53:27 +0000 (UTC) From: "Andreas Veithen (JIRA)" To: java-dev@axis.apache.org Subject: [jira] Resolved: (AXIS2-4618) Configuration from URL ("axis2.xml.url") fails with 'stream closed' (unusable) 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/AXIS2-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Veithen resolved AXIS2-4618. ------------------------------------ Resolution: Fixed Fix Version/s: 1.6 Applied your suggested fix. Thanks for pointing out this issue! > Configuration from URL ("axis2.xml.url") fails with 'stream closed' (unusable) > ------------------------------------------------------------------------------ > > Key: AXIS2-4618 > URL: https://issues.apache.org/jira/browse/AXIS2-4618 > Project: Axis2 > Issue Type: Bug > Affects Versions: 1.5.1 > Environment: * Java: > java version "1.6.0_16" > Java(TM) SE Runtime Environment (build 1.6.0_16-b01) > Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) > * Eclipse Dynamic Web Project > * Apache Axis2 v1.5.1 > Reporter: Dave Lindquist > Assignee: Andreas Veithen > Fix For: 1.6 > > Original Estimate: 1h > Remaining Estimate: 1h > > Attempting to use a URL to point to the axis2.xml file does not work -- every call will fail with a "stream closed" exception. > The problem is in WarBasedAxisConfigurator, which has these lines of code (lines 113 to 135, nb line 124): > String axis2xmlpath = config.getInitParameter(PARAM_AXIS2_XML_PATH); > if (axis2xmlpath != null) { > // when init parameter was present. > axis2Stream = new FileInputStream(axis2xmlpath); > log.debug("using axis2.xml from path: " + axis2xmlpath); > } > if (axis2Stream == null) { > String axisurl = config.getInitParameter(PARAM_AXIS2_XML_URL); > if (axisurl != null) { > axis2Stream = new URL(axisurl).openStream(); > axisConfig = populateAxisConfiguration(axis2Stream); > log.debug("loading axis2.xml from URL: " + axisurl); > } > } > if (axis2Stream == null) { > // both the axis2.xml.path and axis2.xml.url init parameters were not present > // try to find the default /WEB-INF/conf/axis2.xml > axis2Stream = config.getServletContext() > .getResourceAsStream("/WEB-INF/conf/axis2.xml"); > log.debug("trying to load axis2.xml from module: /WEB-INF/conf/axis2.xml"); > } > And then further down at line 157: > axisConfig = populateAxisConfiguration(axis2Stream); > The problem is that we are attempting to call populateAxisConfiguration TWICE -- once when we grab the URL, and once at the very end. No other configuration method attempts to do this; just the URL-based method. > This should be an incredibly easy fix -- just remove the call on line 124. -- 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: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org