axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <>
Subject [jira] Resolved: (AXIS2-2484) IllegalArgumentException: Null InputStream is not a valid argument when loading axis client from URLClassLoader
Date Fri, 20 Apr 2007 18:34:15 GMT


Davanum Srinivas resolved AXIS2-2484.

    Resolution: Fixed

> IllegalArgumentException: Null InputStream is not a valid argument when loading axis
client from URLClassLoader
> ---------------------------------------------------------------------------------------------------------------
>                 Key: AXIS2-2484
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.1.1
>         Environment: Sun JDK 1.4.2, Axis 1.1.1, Windows 2000, ADB data binding
>            Reporter: Jacques Desmazieres
> I have a application with a plugin feature. I have implemented an Axis 2 service and
generated both service and client using java2wsdl and wsdl2java.
> When invoking the service using the generated client, loaded in the classpath, everything
is ok. 
> But when I load the client in an URLClassloader, with all the Axis2 libraries specified
in the url[] parameter, I have the following message:
> java.lang.IllegalArgumentException: Null InputStream is not a valid argument
> 	at com.ctc.wstx.stax.WstxInputFactory.createSR(
> 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(
> 	at
> 	at org.apache.axis2.deployment.DescriptionBuilder.buildOM(
> 	at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(
> 	at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(
> 	at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(
> After some investigation, it appears that the exception is raised beacause the FileSystemConfigurator
class cannot find the default axis2.xml configuration file.
> I have found that the issue comes from the loading of the default axis2.xml config file
in the  org.apache.axis2.deployment.getAxisConfiguration() method line 106:
> ClassLoader cl = Thread.currentThread().getContextClassLoader();
> In my case, the classloader retrieved is the one of the calling application (not the
plugin's classloader) and so the axis2 (and mainly axis2-kernel-1.1.1.jar) is not found.
> Why retrieving the context classloader ? Is there a reason for that ? Can I fix that
with a proper configuration ? Deploying the axis2 kernel jar at application level is not an
> If you replace the source code line by the following fixes the problem:
> ClassLoader cl = getClass().getClassLoader();
> As we retrieve the service client's classloader, Axis is able to find the default configuration
> Jacques Desmazières

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:
For additional commands, e-mail:

View raw message