axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stromas, Aaron" <>
Subject RE: ConfigurationContextFactory.createConfigurationContextFromFileSystem yields IllegalArgumentException
Date Mon, 13 Aug 2012 17:22:46 GMT
Hi Martin,

Please, bear with me. Where is the module.xml come from and where should it reside? I have
followed the article
which never mentioned modules.xml, nor did I see it mentioned on the Rampart site.
I am using Axis/Rampart to consume the web service written in .NET and the client is a standalone
application, so META-INF isn't applicable.

Having examined axis2.xml extracted from the axis2-kernel.jar I see that it references the
addressing module, so I attempted to add the rampart and rahas modules, as well. It did not
help me much.  Thanks to your explanation I understand that these modules need to be configured,
but where should that configuration file be placed in case of the client?



From: Martin Gainty []
Sent: Monday, 13 August, 2012 12:59
To:; Stromas, Aaron
Subject: RE: ConfigurationContextFactory.createConfigurationContextFromFileSystem yields IllegalArgumentException


If the InputStream is null this means your module.xml is either incorrectly configured and
or classes missing when you package your rampart*.mar
can we take a look at the META-INF\ copy for 1.4 is:

<module name="rampart" class="org.apache.rampart.Rampart">

    <Description>This module provides the WS-Security and WS-SecureConversation
    functionalities for Axis2, based on Apache WSS4J, Apache XML-Security
    and Apache Rahas implementations.

        <handler name="PolicyBasedSecurityInHandler" class="org.apache.rampart.handler.RampartReceiver">
            <order phase="Security" phaseFirst="true"/>
        <handler name="SecurityInHandler" class="org.apache.rampart.handler.WSDoAllReceiver">
            <order phase="Security"/>
        <handler name="PostDispatchVerificationHandler" class="org.apache.rampart.handler.PostDispatchVerificationHandler">
            <order phase="Dispatch" phaseLast="true"/>


        <handler name="SecurityOutHandler" class="org.apache.rampart.handler.WSDoAllSender">
            <order phase="Security"/>
        <handler name="PolicyBasedSecurityOutHandler" class="org.apache.rampart.handler.RampartSender">
            <order phase="Security" phaseLast="true"/>

        <handler name="PolicyBasedSecurityOutHandler" class="org.apache.rampart.handler.RampartSender">
            <order phase="Security" phaseLast="true"/>

        <handler name="PolicyBasedSecurityInHandler" class="org.apache.rampart.handler.RampartReceiver">
            <order phase="Security" phaseFirst="true"/>

    <supported-policy-namespaces namespaces=""/>
        <rampart:RampartConfig xmlns:rampart="" />

Martin Gainty
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.

Date: Mon, 13 Aug 2012 12:47:33 -0400
Subject: RE: ConfigurationContextFactory.createConfigurationContextFromFileSystem yields IllegalArgumentException
I thought that the error I was getting was due to the second parameter being null, so I created
an axis2.xml  and passes it as the second parameter. To my surprise, I'm still getting the
same error. And if I use null for both parameters, I get the "Unable to engage module: rampart"
when I try to load it. My client follows the article
Any suggestions, please?

INFO: Deploying module: soapmonitor-1.6.2 - file:/C:/Documents and Settings/astroma/My Documents/AxisClient/axis2-1.6.2/repository/modules/soapmonitor-1.6.2.mar
Exception in thread "main" java.lang.IllegalArgumentException: InputStream cannot be null
        at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
        at org.opensaml.xml.parse.BasicParserPool$DocumentBuilderProxy.parse(
        at org.opensaml.xml.parse.BasicParserPool.parse(
        at org.opensaml.xml.XMLConfigurator.load(
        at org.opensaml.DefaultBootstrap.initializeXMLTooling(
        at org.apache.rahas.RampartSAMLBootstrap.bootstrap(
        at org.apache.rahas.Rahas.init(
        at org.apache.axis2.context.ConfigurationContextFactory.initModules(
        at org.apache.axis2.context.ConfigurationContextFactory.init(
        at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(
        at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(

From: Stromas, Aaron []
Sent: Monday, 13 August, 2012 11:05
Subject: ConfigurationContextFactory.createConfigurationContextFromFileSystem yields IllegalArgumentException


I'm using Axis2 1.6.2 with Rampart 1.6.2. My client attempts to create the ConfigurationContext
by calling

File repoPath = new File("axis2-1.6.1/repository")

And I'm getting the IllegalArgumentException: Input cannot be null

Why is that? According to what I read, "AxisConfiguration will be created using default axis2.xml
and services and modules will be created and loaded from the repository". BTW, modules are
in ./ axis2-1.6.1/repository/modules.



View raw message