You are viewing a plain text version of this content. The canonical link for it is here.
Posted to savan-dev@ws.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2010/03/24 20:07:27 UTC
[jira] Assigned: (AXIS2-4618) Configuration from URL
("axis2.xml.url") fails with 'stream closed' (unusable)
[ https://issues.apache.org/jira/browse/AXIS2-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen reassigned AXIS2-4618:
--------------------------------------
Assignee: Andreas Veithen
> 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
> 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