You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ruchith Fernando <ru...@gmail.com> on 2006/01/31 15:43:46 UTC

Re: [axis2]module.xml not found for the module

Hi,

This is because addressing.mar cannot be found and this is a known
issue with the 0.94 release.
Solution From:  http://ws.apache.org/axis2/download.cgi
----------------------------------------------------------------------------------
    * Remove .axis2 directory from your home directory, if present.
    * Create a directory named .axis2 inside your home directory.
          o If you are using MS Windows, please use the command prompt
and type md .axis2
    * Create a directory named modules in the .axis2 directory you just created.
    * Copy addressing.mar from the modules/ directory of the standard
distribution into the .axis2/modules directory in your home directory.
----------------------------------------------------------------------------------

Thanks,
Ruchith

On 1/31/06, Yves Langisch <li...@langisch.ch> wrote:
> I have exactly the same problem. Disabling the addressing module in the
> axis2.xml and removing it from modules directory didn't help.
>
> Thanks
> Yves
>
> On Sun, 2006-01-29 at 22:15 -0800, thilina madu wrote:
> >
> > Hi all,
> > I tried to access service bellow mention way.
> > There give error why ?
> >
> >
> > public class Test {
> >            public static void main(String args[]) throws AxisFault,
> > XMLStreamException {
> >            EndpointReference targetechoint = new
> > EndpointReference("http://127.0.0.1:8080/axis2/services/InteropTest/echoInteger");
> >
> >             System.out.println();
> >             System.out.println("9.Echoing the Integer");
> >             System.out.println( "Enter the Integer");
> >             BufferedReader intbuf=new BufferedReader(new
> > InputStreamReader(System.in));
> >             String intstr="";
> >             try{
> >             intstr=intbuf.readLine();
> >             } catch(IOException excep){
> >                 excep.getStackTrace();
> >             }
> >             OMFactory intfactory=OMAbstractFactory.getOMFactory();
> >             OMNamespace
> > omintnames=intfactory.createOMNamespace("http://example1.org/example1","examint");
> >             OMElement
> > omintelement=intfactory.createOMElement("echointelemen",omintnames);
> >             omintelement.setText(intstr);
> >
> >             Options options = new Options();
> >             options.setTo(targetechoint);
> >             options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> >             options.setUseSeparateListener(false);
> >             ServiceClient servi ceClient = new ServiceClient();
> >             serviceClient.setOptions(options);
> >             OMElement result =
> > serviceClient.sendReceive(omintelement);
> >             System.out.println();
> >             System.out.println("Check the get values from the
> > Omelemany");
> >             StringWriter writer = new StringWriter();
> >             result.serialize(XMLOutputFactory.newInstance()
> >                     .createXMLStreamWriter(writer));
> >             writer.flush();
> >             System.out.println(writer.toString());
> >     }
> >
> >
> >
> >
> >
> > ERRRO given is :
> >
> > 9.Echoing the Integer
> > Enter the Integer
> > 4
> > org.apache.axis2.deployment.DeploymentException: module.xml not found
> > for the module :   addressing; nested exception is:
> >  org.apache.axis2.deployment.DeploymentException: module.xml not found
> > for the module :   addressing; nested exception is:
> >  org.apache.axis2.deployment.DeploymentException: module.xml not found
> > for the module :   addressing; nested exception is:
> >  org.apache.axis2.deployment.DeploymentException: module.xml not found
> > for the module :   addressing
> >  at
> > org.apache.axis2.deployment.DeploymentEngine.load(DeploymentEngine.java:542)
> > &n bsp;at
> > org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:56)
> >  at
> > org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:39)
> >  at
> > org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:53)
> >  at
> > org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:86)
> >  at
> > org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:148)
> >  at Test.main(Test.java:62)
> >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >  at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >  at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >  at java.lang.reflect.Method.invoke(Method.java:324)
> >  at
> > com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
> > Caused by: org.apache.axis2.deployment.DeploymentException: module.xml
> > not found  for the module :   addressing; nested exception is:
> >  org.apache.axis2.deployment.DeploymentException: module.xml not found
> > for the module :   addressing
> >  at
> > org.apache.axis2.deployment.repository.util.ArchiveReader.creatModuleArchivefromResource(ArchiveReader.java:193)
> >  at
> > org.apache.axis2.engine.AxisConfiguration.loadModulefromResources(AxisConfiguration.java:385)
> >  at
> > org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration.java:328)
> >  at
> > org.apache.axis2.deployment.DeploymentEngine.engageModules(DeploymentEngine.java:502)
> >  at
> > org.apache.axis2.deployment.DeploymentEngine.load(DeploymentEngine.java:537)
> >  ... 11 more
> > Caused by: org.apache.axis2.deployment.DeploymentException: module.xml
> > not found  for the module :   addressing
> >  at
> > org.apache.axis2.deployment.repository.util.ArchiveReader.creatModuleArchivefromResource(ArchiveReader.java:158)
> >  ... 15 more
> > Exception in thread "main"
> > Process finished with exit code 1
> >
> > Any kind of help is higly appreciate
> >
> > madushan thilina
> >
> > ______________________________________________________________________
> > Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more
> > on new and used cars.
>
>

Re: [axis2]module.xml not found for the module

Posted by Aaron Evans <aa...@yahoo.ca>.
Aaron Evans <aaronmevans <at> yahoo.ca> writes:

> 
> I had solved this problem when running stand-alone (client stub) by re-naming 
> addressing.mar to axis-addressing-module.jar and putting in my classpath.
> 
> It works great until I deploy my WS client code as part of a servlet app in 
> tomcat and all of a sudden it doesn't work and i get the error above.
> 
> I looked at some of the code in the DeploymentEngine and it seems as though
> the class loaders are getting mucked around with and perhaps that is the 
> problem.
> 
> I am really at a loss here because it wouldn't be my home directory but 
> rather tomcat's.  I am running tomcat 5.5 on windows, so who knows where
> the "home directory" will be...
> 
>

Ok, so I bit the bullet and created a configurable "axis home" in my web app.

You can then use any location on your file system as axis home.  For example,
create a directory called axis-home in /tmp.  Then your axis home path is
/tmp/axis-home.

Put the modules directory in there and addressing.mar in the modules directory.

Then, make a constructor like this for your client:

public WSClientStub(String targetEndpoint, String axisHome) throws 
java.lang.Exception
{
   this(new 
org.apache.axis2.context.ConfigurationContextFactory().
createConfigurationContextFromFileSystem(axisHome),
 targetEndpoint);
}

And pass in your ws endpoint and axis home to construct an instance of the
client.

I hope this helps someone else.  But I think it is somewhat rediculous
to have to have external file resources etc for simply using the client API!

BTW, windows STILL won't let me delete the .axis2 directory in my home 
directory.  I get "Access Denied" not matter what.  I have tried everything.
At some point, I will create a boot cd to boot my laptop into dos and delete
it that way I guess...

aaron







Re: [axis2]module.xml not found for the module

Posted by Aaron Evans <aa...@yahoo.ca>.
Ruchith Fernando <ruchith.fernando <at> gmail.com> writes:

> 
> Hi,
> 
> This is because addressing.mar cannot be found and this is a known
> issue with the 0.94 release.
> Solution From:  http://ws.apache.org/axis2/download.cgi


I had solved this problem when running stand-alone (client stub) by re-naming 
addressing.mar to axis-addressing-module.jar and putting in my classpath.

It works great until I deploy my WS client code as part of a servlet app in 
tomcat and all of a sudden it doesn't work and i get the error above.

I looked at some of the code in the DeploymentEngine and it seems as though
the class loaders are getting mucked around with and perhaps that is the 
problem.

I am really at a loss here because it wouldn't be my home directory but 
rather tomcat's.  I am running tomcat 5.5 on windows, so who knows where
the "home directory" will be...