You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Alex Bolgarov <al...@bolgarov.org> on 2008/07/16 20:33:31 UTC

Loading mod_axis2.so module into Apache

Hi,

How do you load a mod_axis2.so module into the Apache when you copy
the Axis2/C libraries to some directory - for example, when you are
using the binary Axis2/C distribution, or just build Axis2/C from
source on one machine (and installed itto some directory) and then
copy Axis2/C module and libraries to some directory on some othar
machine with Apache server?

Well, here is a longer description of the problem:

Say I'm using a source distribution. I download the .tar.gz source
tarball, untar, configure it with some install directory (--prefix)
and build/install it, now I have this install directory with the build
by me Axis2/C.

I have Apache server running in this machine, so I copy mod_axis2.so
into the Apache installation, I update the Apache config to load the
module, I define the Axis2/C repository, I develop a web service and
run tests against it. All is fine up to this point.

Now I want to use the Axis2/C with the Apache server that is running
on another machine.

I copy everything from the install directory from the build machine
into some directory on this other machine with Apache (let's call this
directory "/home/alex/axis2c-dist").

I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the
Apache's modules directory.

Now I change the Apache config file so that it contains the line

    LoadModule axis2_module modules/mod_axis2.so

I try to start Apache:

    $ apachectl start

and see following error:

Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
libaxis2_engine.so.0: cannot open shared object file: No such file or
directory

Now, I happen to know about the LoadFile Apache directive :)

I add the LoadFile directive for the libaxis2_engine.so so that Apache
loads it from the /home/alex/axis2c-dist directory, now the Apache
config looks like this:

    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
    LoadModule axis2_module modules/mod_axis2.so

I try to start Apache again:

    $ apachectl start

and now see:

Cannot load /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
server: libneethi.so.0: cannot open shared object file: No such file
or directory

OK, I add LoadFile directives for the libneethi.so, and so on, when I
finally arrive to the following config:

    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
    LoadFile /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0

    LoadModule axis2_module modules/mod_axis2.so

But now, after I try to start Apache, I see new error:

Cannot load /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
into server: /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
undefined symbol: axis2_handler_invoke

Which means that the libaxis2_engine.so depends on the
libaxis2_http_common.so, and requires it to be loaded by Apache first,
but the libaxis2_http_common.so contains a reference to undefined
symbol "axis2_handler_invoke", that is defined by the
libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
axis2_handler_invoke" to check that this symbol is indeed defined in
this library.)

Circular dependency?

How do I break it?

(note that the same thing happens if I download the binary
distribution, untar it into some directory and copy the mod_axis2 into
the Apache moddules directory. Up to the same point I can use LoadFile
to load Axis2/C libraries, but then again I see this circular
dependency)


Thank you,

    alex.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Loading mod_axis2.so module into Apache

Posted by Rajika Kumarasiri <ra...@gmail.com>.
On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov <al...@bolgarov.org> wrote:

> Hi,
>
> How do you load a mod_axis2.so module into the Apache when you copy
> the Axis2/C libraries to some directory

Apache load mod_axis2 using the path in  Axis2/c Loadmodule directives.(

LoadModule axis2_module MOD_AXIS2_SO_PATH)

 - for example, when you are
> using the binary Axis2/C distribution, or just build Axis2/C from
> source on one machine (and installed itto some directory) and then
> copy Axis2/C module and libraries to some directory on some othar
> machine with Apache server?

So in the second machine, in which  where you runs Apache you need to
configure the
It's you compile the source in a once machine, and then execute the binary
in once machine. Some times some issues can be occurred if the two
architectures are different from each other.

>
>
> Well, here is a longer description of the problem:
>
> Say I'm using a source distribution. I download the .tar.gz source
> tarball, untar, configure it with some install directory (--prefix)
> and build/install it, now I have this install directory with the build
> by me Axis2/C.
>
> I have Apache server running in this machine, so I copy mod_axis2.so
> into the Apache installation, I update the Apache config to load the
> module, I define the Axis2/C repository, I develop a web service and
> run tests against it. All is fine up to this point.
>
> Now I want to use the Axis2/C with the Apache server that is running
> on another machine.
>
> I copy everything from the install directory from the build machine
> into some directory on this other machine with Apache (let's call this
> directory "/home/alex/axis2c-dist").

Add
LoadModule axis2_module path_of_mod_axis2
Axis2RepoPath /home/alex/axis2c-dist


>
>
> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the
> Apache's modules directory.
>
> Now I change the Apache config file so that it contains the line
>
>    LoadModule axis2_module modules/mod_axis2.so
>
> I try to start Apache:
>
>    $ apachectl start
>
> and see following error:
>
> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
> libaxis2_engine.so.0: cannot open shared object file: No such file or
> directory
>
> Now, I happen to know about the LoadFile Apache directive :)
>
> I add the LoadFile directive for the libaxis2_engine.so so that Apache
> loads it from the /home/alex/axis2c-dist directory, now the Apache
> config looks like this:

You need to add the Axis2Repo path in httpd.conf.
Did you have a look at here ?
http://ws.apache.org/axis2/c/docs/axis2c_manual.html#mod_axis2


-Rajika

>
>
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>    LoadModule axis2_module modules/mod_axis2.so
>
> I try to start Apache again:
>
>    $ apachectl start
>
> and now see:
>
> Cannot load /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
> server: libneethi.so.0: cannot open shared object file: No such file
> or directory
>
> OK, I add LoadFile directives for the libneethi.so, and so on, when I
> finally arrive to the following config:
>
>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>
>    LoadModule axis2_module modules/mod_axis2.so
>
> But now, after I try to start Apache, I see new error:
>
> Cannot load /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
> into server: /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
> undefined symbol: axis2_handler_invoke
>
> Which means that the libaxis2_engine.so depends on the
> libaxis2_http_common.so, and requires it to be loaded by Apache first,
> but the libaxis2_http_common.so contains a reference to undefined
> symbol "axis2_handler_invoke", that is defined by the
> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
> axis2_handler_invoke" to check that this symbol is indeed defined in
> this library.)
>
> Circular dependency?
>
> How do I break it?
>
> (note that the same thing happens if I download the binary
> distribution, untar it into some directory and copy the mod_axis2 into
> the Apache moddules directory. Up to the same point I can use LoadFile
> to load Axis2/C libraries, but then again I see this circular
> dependency)
>
>
> Thank you,
>
>    alex.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
comp.lang.c - http://groups.google.com/group/comp.lang.c/topics

Re: Loading mod_axis2.so module into Apache

Posted by Samisa Abeysinghe <sa...@wso2.com>.
1. Compile Axis2/C on a machine with identical settings to that of the 
server machine.
2. Install that on server machine, following the guidelines given in 
binary install

That should work.

Samisa...

Alex Bolgarov wrote:
> Well, our server machine is not supposed to have development tools at
> all. So I can't compile the Axis2/C on it.
>
> Then, how it is supposed to work if I use the Axis2C binary distribution?
>
> And it should have nothing to do with environment variables settings
> (other then possible LD_LIBRARY_PATH) because Apache can't load the
> module at all, because the ldopen() can't find the shared libraries
> that this module refers to, and I can't load those shared libraries
> manually using LoadFile directive because of the circular reference
> problem as I described. So at the moment of failure no Axis2/C code
> has executed yet that could have a chance to fix something (like, to
> find and load libraries from the location pointed by the AXIS2C_HOME
> or by any parameter in the Apache config file. Or am I wrong here?
>
> What I don't understand is why (and how) it works if I run the Apache
> server on the machine where I compile the Axis2C. Does the linker,
> when it builds the libmod_axis2.so, embeds into this library the
> pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so
> into the Apache modules directory on the same machine, it finds them
> using those embedded pathes?
>
>
> Thank you,
>
>     alex.
>
> On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake <gl...@gmail.com> wrote:
>   
>> Hi Alex,
>>
>> I think you have to set AXIS2C_HOME environment variable on your server
>> machine. And why are you copying libraries from one machine to another why
>> don't you compile Axis2C on you server machine.AFAIK if your first machine
>> and the second machine are different,different in the sense first machine is
>> dual core and the server machine is core 2 duo or something else you have to
>> recompile Axis2C on your server machine and create libmod_axis2.so otherwise
>> previously compiled library won't work on the server machine.
>>
>> Regards
>> Lahiru
>>
>> On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov <al...@bolgarov.org> wrote:
>>     
>>> Hi,
>>>
>>> How do you load a mod_axis2.so module into the Apache when you copy
>>> the Axis2/C libraries to some directory - for example, when you are
>>> using the binary Axis2/C distribution, or just build Axis2/C from
>>> source on one machine (and installed itto some directory) and then
>>> copy Axis2/C module and libraries to some directory on some othar
>>> machine with Apache server?
>>>
>>> Well, here is a longer description of the problem:
>>>
>>> Say I'm using a source distribution. I download the .tar.gz source
>>> tarball, untar, configure it with some install directory (--prefix)
>>> and build/install it, now I have this install directory with the build
>>> by me Axis2/C.
>>>
>>> I have Apache server running in this machine, so I copy mod_axis2.so
>>> into the Apache installation, I update the Apache config to load the
>>> module, I define the Axis2/C repository, I develop a web service and
>>> run tests against it. All is fine up to this point.
>>>
>>> Now I want to use the Axis2/C with the Apache server that is running
>>> on another machine.
>>>
>>> I copy everything from the install directory from the build machine
>>> into some directory on this other machine with Apache (let's call this
>>> directory "/home/alex/axis2c-dist").
>>>
>>> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the
>>> Apache's modules directory.
>>>
>>> Now I change the Apache config file so that it contains the line
>>>
>>>    LoadModule axis2_module modules/mod_axis2.so
>>>
>>> I try to start Apache:
>>>
>>>    $ apachectl start
>>>
>>> and see following error:
>>>
>>> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
>>> libaxis2_engine.so.0: cannot open shared object file: No such file or
>>> directory
>>>
>>> Now, I happen to know about the LoadFile Apache directive :)
>>>
>>> I add the LoadFile directive for the libaxis2_engine.so so that Apache
>>> loads it from the /home/alex/axis2c-dist directory, now the Apache
>>> config looks like this:
>>>
>>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>>    LoadModule axis2_module modules/mod_axis2.so
>>>
>>> I try to start Apache again:
>>>
>>>    $ apachectl start
>>>
>>> and now see:
>>>
>>> Cannot load /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
>>> server: libneethi.so.0: cannot open shared object file: No such file
>>> or directory
>>>
>>> OK, I add LoadFile directives for the libneethi.so, and so on, when I
>>> finally arrive to the following config:
>>>
>>>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>>>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>>>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>>
>>>    LoadModule axis2_module modules/mod_axis2.so
>>>
>>> But now, after I try to start Apache, I see new error:
>>>
>>> Cannot load /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>>> into server: /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
>>> undefined symbol: axis2_handler_invoke
>>>
>>> Which means that the libaxis2_engine.so depends on the
>>> libaxis2_http_common.so, and requires it to be loaded by Apache first,
>>> but the libaxis2_http_common.so contains a reference to undefined
>>> symbol "axis2_handler_invoke", that is defined by the
>>> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
>>> axis2_handler_invoke" to check that this symbol is indeed defined in
>>> this library.)
>>>
>>> Circular dependency?
>>>
>>> How do I break it?
>>>
>>> (note that the same thing happens if I download the binary
>>> distribution, untar it into some directory and copy the mod_axis2 into
>>> the Apache moddules directory. Up to the same point I can use LoadFile
>>> to load Axis2/C libraries, but then again I see this circular
>>> dependency)
>>>
>>>
>>> Thank you,
>>>
>>>    alex.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>>
>>>       
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.138 / Virus Database: 270.5.0/1555 - Release Date: 7/16/2008 6:43 AM
>
>
>
>   


-- 
Samisa Abeysinghe 
Director, Engineering; WSO2 Inc.

http://www.wso2.com/ - "The Open Source SOA Company"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Loading mod_axis2.so module into Apache

Posted by Alex Bolgarov <al...@bolgarov.org>.
Hi,

Thank you to all who replied.

We managed to make it work either by setting LD_LIBRARY_PATH value to
the lib directory in the axis repository before starting Apache or by
adding path to the lib directory of the repository into the
/etc/ld.so.conf file and running ldconfig.

Using envvars file also probably would work.

Thank you,

    alex.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Loading mod_axis2.so module into Apache

Posted by John Mocho <u0...@yahoo.com>.
Around here we put the LD_LIBRARY_PATH in the envvars file in the apache httpd 
bin directory.  That way it is loaded by the apachectl script - and is more 
or less immune to the environment getting messed with (usually by someone 
messing with shell configuration files).

This is rather well documented in the apache httpd documentation as well.

It works quite nicely.

> Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent of
> this (ldconfig)."

Opinion:  Thank you to all of you who contribute to this project, it is simply 
wonderfull.  I am glad to finally break the chain of java servlet engines 
using so much ....  Sorry, I'll stop there.  
[Axis2C] is an amazing product and I hope that it carries on for many years.

-John.  First post to list.

On Thursday 17 July 2008 00:58, Supun Kamburugamuva wrote:
> Hi Samisa,
>
> I think some of the instructions like setting the LD_LIBRARY_PATH is
> missing. Also I think we should add a faq saying what are the things that
> can go wrong when we deploy in Apache and possible solutions to that.
>
> Supun..
>
> On Thu, Jul 17, 2008 at 11:57 AM, Samisa Abeysinghe <sa...@wso2.com> wrote:
> > Supun,
> >   Arn't these steps on the manual?
> > Samisa...
> >
> > Supun Kamburugamuva wrote:
> >> Hi Alex,
> >>
> >> Nice description of the problem. Couldn't think of a better way to do
> >> it.
> >>
> >> This is what you need to do.
> >>
> >> You have the axis2/c distribution in /home/alex/axis2c-dist right? You
> >> should have the lib, modules and services directories under that
> >> directory. Also you need to have the axis2.xml file in that directory.
> >>
> >> Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent
> >> of this (ldconfig).
> >>  Please remove all your  LoadFile directives from your Apache
> >> configuration.
> >>
> >> Make sure your Axis2/C configuration in httpd.conf is correct. The
> >> required entries are:
> >>
> >> LoadModule axis2_module MOD_AXIS2_SO_PATH
> >> Axis2RepoPath AXIS2C_INSTALL_DIR
> >> Axis2LogFile  PATH_TO_LOG_FILE
> >> Axis2LogLevel LOG_LEVEL
> >> <Location /axis2>
> >>    SetHandler axis2_module
> >> </Location>
> >>
> >>
> >> Also make sure that Apache has read access to the /home/alex/axis2c-dist
> >> directory. Start Apache and everything should work fine.
> >>
> >> Supun..
> >>
> >> On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri
> >> <rajikacc@gmail.com<mailto: rajikacc@gmail.com>> wrote:
> >>
> >>
> >>
> >>    On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov <alex@bolgarov.org
> >>    <ma...@bolgarov.org>> wrote:
> >>
> >>        Well, our server machine is not supposed to have development
> >>        tools at
> >>        all. So I can't compile the Axis2/C on it.
> >>
> >>        Then, how it is supposed to work if I use the Axis2C binary
> >>        distribution?
> >>
> >>    1. Unzip the binary to a location,
> >>    2. Copy the mod_axis2.so to the Apache module directory.
> >>    3. Set the LoadModule and the Axis2RepoPath in httpd.conf
> >>    Restart the Apache server.
> >>
> >>    -Rajika
> >>
> >>
> >>
> >>        And it should have nothing to do with environment variables
> >>        settings
> >>        (other then possible LD_LIBRARY_PATH) because Apache can't
> >>        load the
> >>        module at all, because the ldopen() can't find the shared
> >>        libraries
> >>        that this module refers to, and I can't load those shared
> >>        libraries
> >>        manually using LoadFile directive because of the circular
> >>        reference
> >>        problem as I described. So at the moment of failure no Axis2/C
> >>        code
> >>        has executed yet that could have a chance to fix something
> >>        (like, to
> >>        find and load libraries from the location pointed by the
> >>        AXIS2C_HOME
> >>        or by any parameter in the Apache config file. Or am I wrong
> >> here?
> >>
> >>        What I don't understand is why (and how) it works if I run the
> >>        Apache
> >>        server on the machine where I compile the Axis2C. Does the
> >> linker, when it builds the libmod_axis2.so, embeds into this library the
> >> pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so
> >>        into the Apache modules directory on the same machine, it
> >>        finds them
> >>        using those embedded pathes?
> >>
> >>
> >>        Thank you,
> >>
> >>           alex.
> >>
> >>        On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake
> >>
> >>        <glahiru@gmail.com <ma...@gmail.com>> wrote:
> >>        > Hi Alex,
> >>        >
> >>        > I think you have to set AXIS2C_HOME environment variable on
> >>
> >>        your server
> >>
> >>        > machine. And why are you copying libraries from one machine
> >>
> >>        to another why
> >>
> >>        > don't you compile Axis2C on you server machine.AFAIK if your
> >>
> >>        first machine
> >>
> >>        > and the second machine are different,different in the sense
> >>
> >>        first machine is
> >>
> >>        > dual core and the server machine is core 2 duo or something
> >>
> >>        else you have to
> >>
> >>        > recompile Axis2C on your server machine and create
> >>
> >>        libmod_axis2.so otherwise
> >>
> >>        > previously compiled library won't work on the server machine.
> >>        >
> >>        > Regards
> >>        > Lahiru
> >>        >
> >>        > On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov
> >>
> >>        <alex@bolgarov.org <ma...@bolgarov.org>> wrote:
> >>        >> Hi,
> >>        >>
> >>        >> How do you load a mod_axis2.so module into the Apache when
> >>
> >>        you copy
> >>
> >>        >> the Axis2/C libraries to some directory - for example, when
> >>
> >>        you are
> >>
> >>        >> using the binary Axis2/C distribution, or just build
> >>
> >>        Axis2/C from
> >>
> >>        >> source on one machine (and installed itto some directory)
> >>
> >>        and then
> >>
> >>        >> copy Axis2/C module and libraries to some directory on some
> >>
> >>        othar
> >>
> >>        >> machine with Apache server?
> >>        >>
> >>        >> Well, here is a longer description of the problem:
> >>        >>
> >>        >> Say I'm using a source distribution. I download the .tar.gz
> >>
> >>        source
> >>
> >>        >> tarball, untar, configure it with some install directory
> >>
> >>        (--prefix)
> >>
> >>        >> and build/install it, now I have this install directory
> >>
> >>        with the build
> >>
> >>        >> by me Axis2/C.
> >>        >>
> >>        >> I have Apache server running in this machine, so I copy
> >>
> >>        mod_axis2.so
> >>
> >>        >> into the Apache installation, I update the Apache config to
> >>
> >>        load the
> >>
> >>        >> module, I define the Axis2/C repository, I develop a web
> >>
> >>        service and
> >>
> >>        >> run tests against it. All is fine up to this point.
> >>        >>
> >>        >> Now I want to use the Axis2/C with the Apache server that
> >>
> >>        is running
> >>
> >>        >> on another machine.
> >>        >>
> >>        >> I copy everything from the install directory from the build
> >>
> >>        machine
> >>
> >>        >> into some directory on this other machine with Apache
> >>
> >>        (let's call this
> >>
> >>        >> directory "/home/alex/axis2c-dist").
> >>        >>
> >>        >> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it
> >>
> >>        into the
> >>
> >>        >> Apache's modules directory.
> >>        >>
> >>        >> Now I change the Apache config file so that it contains the
> >>
> >>        line
> >>
> >>        >>    LoadModule axis2_module modules/mod_axis2.so
> >>        >>
> >>        >> I try to start Apache:
> >>        >>
> >>        >>    $ apachectl start
> >>        >>
> >>        >> and see following error:
> >>        >>
> >>        >> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
> >>        >> libaxis2_engine.so.0: cannot open shared object file: No
> >>
> >>        such file or
> >>
> >>        >> directory
> >>        >>
> >>        >> Now, I happen to know about the LoadFile Apache directive :)
> >>        >>
> >>        >> I add the LoadFile directive for the libaxis2_engine.so so
> >>
> >>        that Apache
> >>
> >>        >> loads it from the /home/alex/axis2c-dist directory, now the
> >>
> >>        Apache
> >>
> >>        >> config looks like this:
> >>        >>
> >>        >>    LoadFile
> >>        >> /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 LoadModule
> >>        >> axis2_module modules/mod_axis2.so
> >>        >>
> >>        >> I try to start Apache again:
> >>        >>
> >>        >>    $ apachectl start
> >>        >>
> >>        >> and now see:
> >>        >>
> >>        >> Cannot load
> >>
> >>        /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
> >>
> >>        >> server: libneethi.so.0: cannot open shared object file: No
> >>
> >>        such file
> >>
> >>        >> or directory
> >>        >>
> >>        >> OK, I add LoadFile directives for the libneethi.so, and so
> >>
> >>        on, when I
> >>
> >>        >> finally arrive to the following config:
> >>        >>
> >>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
> >>        >>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
> >>        >>    LoadFile
> >>        >> /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0 LoadFile
> >>        >> /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0 LoadFile
> >>        >> /home/alex/axis2c-dist/lib/libneethi.so.0.4.0 LoadFile
> >>
> >>        /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
> >>
> >>        >>    LoadFile
> >>        >> /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
> >>        >>
> >>        >>    LoadModule axis2_module modules/mod_axis2.so
> >>        >>
> >>        >> But now, after I try to start Apache, I see new error:
> >>        >>
> >>        >> Cannot load
> >>
> >>        /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
> >>
> >>        >> into server:
> >>
> >>        /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
> >>        >> undefined symbol: axis2_handler_invoke
> >>        >>
> >>        >> Which means that the libaxis2_engine.so depends on the
> >>        >> libaxis2_http_common.so, and requires it to be loaded by
> >>
> >>        Apache first,
> >>
> >>        >> but the libaxis2_http_common.so contains a reference to
> >>
> >>        undefined
> >>
> >>        >> symbol "axis2_handler_invoke", that is defined by the
> >>        >> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
> >>        >> axis2_handler_invoke" to check that this symbol is indeed
> >>
> >>        defined in
> >>
> >>        >> this library.)
> >>        >>
> >>        >> Circular dependency?
> >>        >>
> >>        >> How do I break it?
> >>        >>
> >>        >> (note that the same thing happens if I download the binary
> >>        >> distribution, untar it into some directory and copy the
> >>
> >>        mod_axis2 into
> >>
> >>        >> the Apache moddules directory. Up to the same point I can
> >>
> >>        use LoadFile
> >>
> >>        >> to load Axis2/C libraries, but then again I see this circular
> >>        >> dependency)
> >>        >>
> >>        >>
> >>        >> Thank you,
> >>        >>
> >>        >>    alex.
> >>
> >>  ---------------------------------------------------------------------
> >>
> >>        >> To unsubscribe, e-mail:
> >>
> >>        axis-c-user-unsubscribe@ws.apache.org
> >>        <ma...@ws.apache.org>
> >>
> >>        >> For additional commands, e-mail:
> >>
> >>        axis-c-user-help@ws.apache.org
> >>        <ma...@ws.apache.org>
> >>
> >>
> >>
> >>
> >>
> >>  ---------------------------------------------------------------------
> >>        To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> >>        <ma...@ws.apache.org>
> >>        For additional commands, e-mail:
> >>        axis-c-user-help@ws.apache.org
> >>        <ma...@ws.apache.org>
> >>
> >>
> >>
> >>
> >>    --    comp.lang.c - http://groups.google.com/group/comp.lang.c/topics
> >>
> >>
> >> No virus found in this incoming message.
> >> Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database:
> >> 270.5.0/1556 - Release Date: 7/16/2008 4:56 PM
> >
> > --
> > Samisa Abeysinghe Director, Engineering; WSO2 Inc.
> >
> > http://www.wso2.com/ - "The Open Source SOA Company"
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Loading mod_axis2.so module into Apache

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Supun Kamburugamuva wrote:
> Hi Samisa,
>
> I think some of the instructions like setting the LD_LIBRARY_PATH is 
> missing.

Then we need to fix it. Please raise a Jira on this.

Samisa...


> Also I think we should add a faq saying what are the things that can 
> go wrong when we deploy in Apache and possible solutions to that.
>
> Supun..
>
> On Thu, Jul 17, 2008 at 11:57 AM, Samisa Abeysinghe <samisa@wso2.com 
> <ma...@wso2.com>> wrote:
>
>     Supun,
>       Arn't these steps on the manual?
>     Samisa...
>
>     Supun Kamburugamuva wrote:
>
>         Hi Alex,
>
>         Nice description of the problem. Couldn't think of a better
>         way to do it.
>
>         This is what you need to do.
>
>         You have the axis2/c distribution in /home/alex/axis2c-dist
>         right? You should have the lib, modules and services
>         directories under that directory. Also you need to have the
>         axis2.xml file in that directory.
>
>         Please add the lib directory to your LD_LIBRARY_PATH or do an
>         equivalent of this (ldconfig).
>          Please remove all your  LoadFile directives from your Apache
>         configuration.
>
>         Make sure your Axis2/C configuration in httpd.conf is correct.
>         The required entries are:
>
>         LoadModule axis2_module MOD_AXIS2_SO_PATH
>         Axis2RepoPath AXIS2C_INSTALL_DIR
>         Axis2LogFile  PATH_TO_LOG_FILE
>         Axis2LogLevel LOG_LEVEL
>         <Location /axis2>
>            SetHandler axis2_module
>         </Location>
>
>          
>         Also make sure that Apache has read access to the
>         /home/alex/axis2c-dist directory. Start Apache and everything
>         should work fine.
>
>         Supun..
>
>         On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri
>         <rajikacc@gmail.com <ma...@gmail.com>
>         <mailto:rajikacc@gmail.com <ma...@gmail.com>>> wrote:
>
>
>
>            On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov
>         <alex@bolgarov.org <ma...@bolgarov.org>
>            <mailto:alex@bolgarov.org <ma...@bolgarov.org>>> wrote:
>
>                Well, our server machine is not supposed to have
>         development
>                tools at
>                all. So I can't compile the Axis2/C on it.
>
>                Then, how it is supposed to work if I use the Axis2C binary
>                distribution?
>
>            1. Unzip the binary to a location,
>            2. Copy the mod_axis2.so to the Apache module directory.
>            3. Set the LoadModule and the Axis2RepoPath in httpd.conf
>            Restart the Apache server.
>
>            -Rajika
>
>
>
>                And it should have nothing to do with environment variables
>                settings
>                (other then possible LD_LIBRARY_PATH) because Apache can't
>                load the
>                module at all, because the ldopen() can't find the shared
>                libraries
>                that this module refers to, and I can't load those shared
>                libraries
>                manually using LoadFile directive because of the circular
>                reference
>                problem as I described. So at the moment of failure no
>         Axis2/C
>                code
>                has executed yet that could have a chance to fix something
>                (like, to
>                find and load libraries from the location pointed by the
>                AXIS2C_HOME
>                or by any parameter in the Apache config file. Or am I
>         wrong here?
>
>                What I don't understand is why (and how) it works if I
>         run the
>                Apache
>                server on the machine where I compile the Axis2C. Does
>         the linker,
>                when it builds the libmod_axis2.so, embeds into this
>         library the
>                pathes to the other Axis2/C libraries so, when I copy the
>                mod_axis2.so
>                into the Apache modules directory on the same machine, it
>                finds them
>                using those embedded pathes?
>
>
>                Thank you,
>
>                   alex.
>
>                On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake
>                <glahiru@gmail.com <ma...@gmail.com>
>         <mailto:glahiru@gmail.com <ma...@gmail.com>>> wrote:
>                > Hi Alex,
>                >
>                > I think you have to set AXIS2C_HOME environment
>         variable on
>                your server
>                > machine. And why are you copying libraries from one
>         machine
>                to another why
>                > don't you compile Axis2C on you server machine.AFAIK
>         if your
>                first machine
>                > and the second machine are different,different in the
>         sense
>                first machine is
>                > dual core and the server machine is core 2 duo or
>         something
>                else you have to
>                > recompile Axis2C on your server machine and create
>                libmod_axis2.so otherwise
>                > previously compiled library won't work on the server
>         machine.
>                >
>                > Regards
>                > Lahiru
>                >
>                > On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov
>                <alex@bolgarov.org <ma...@bolgarov.org>
>         <mailto:alex@bolgarov.org <ma...@bolgarov.org>>> wrote:
>                >>
>                >> Hi,
>                >>
>                >> How do you load a mod_axis2.so module into the
>         Apache when
>                you copy
>                >> the Axis2/C libraries to some directory - for
>         example, when
>                you are
>                >> using the binary Axis2/C distribution, or just build
>                Axis2/C from
>                >> source on one machine (and installed itto some
>         directory)
>                and then
>                >> copy Axis2/C module and libraries to some directory
>         on some
>                othar
>                >> machine with Apache server?
>                >>
>                >> Well, here is a longer description of the problem:
>                >>
>                >> Say I'm using a source distribution. I download the
>         .tar.gz
>                source
>                >> tarball, untar, configure it with some install directory
>                (--prefix)
>                >> and build/install it, now I have this install directory
>                with the build
>                >> by me Axis2/C.
>                >>
>                >> I have Apache server running in this machine, so I copy
>                mod_axis2.so
>                >> into the Apache installation, I update the Apache
>         config to
>                load the
>                >> module, I define the Axis2/C repository, I develop a web
>                service and
>                >> run tests against it. All is fine up to this point.
>                >>
>                >> Now I want to use the Axis2/C with the Apache server
>         that
>                is running
>                >> on another machine.
>                >>
>                >> I copy everything from the install directory from
>         the build
>                machine
>                >> into some directory on this other machine with Apache
>                (let's call this
>                >> directory "/home/alex/axis2c-dist").
>                >>
>                >> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and
>         copy it
>                into the
>                >> Apache's modules directory.
>                >>
>                >> Now I change the Apache config file so that it
>         contains the
>                line
>                >>
>                >>    LoadModule axis2_module modules/mod_axis2.so
>                >>
>                >> I try to start Apache:
>                >>
>                >>    $ apachectl start
>                >>
>                >> and see following error:
>                >>
>                >> Cannot load /home/alex/httpd/modules/mod_axis2.so
>         into server:
>                >> libaxis2_engine.so.0: cannot open shared object file: No
>                such file or
>                >> directory
>                >>
>                >> Now, I happen to know about the LoadFile Apache
>         directive :)
>                >>
>                >> I add the LoadFile directive for the
>         libaxis2_engine.so so
>                that Apache
>                >> loads it from the /home/alex/axis2c-dist directory,
>         now the
>                Apache
>                >> config looks like this:
>                >>
>                >>    LoadFile
>         /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>                >>    LoadModule axis2_module modules/mod_axis2.so
>                >>
>                >> I try to start Apache again:
>                >>
>                >>    $ apachectl start
>                >>
>                >> and now see:
>                >>
>                >> Cannot load
>                /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
>                >> server: libneethi.so.0: cannot open shared object
>         file: No
>                such file
>                >> or directory
>                >>
>                >> OK, I add LoadFile directives for the libneethi.so,
>         and so
>                on, when I
>                >> finally arrive to the following config:
>                >>
>                >>    LoadFile
>         /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>                >>    LoadFile
>         /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>                >>    LoadFile
>         /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>                >>    LoadFile
>         /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>                >>    LoadFile
>         /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>                >>    LoadFile
>                /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>                >>    LoadFile
>         /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>                >>
>                >>    LoadModule axis2_module modules/mod_axis2.so
>                >>
>                >> But now, after I try to start Apache, I see new error:
>                >>
>                >> Cannot load
>                /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>                >> into server:
>                /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
>                >> undefined symbol: axis2_handler_invoke
>                >>
>                >> Which means that the libaxis2_engine.so depends on the
>                >> libaxis2_http_common.so, and requires it to be loaded by
>                Apache first,
>                >> but the libaxis2_http_common.so contains a reference to
>                undefined
>                >> symbol "axis2_handler_invoke", that is defined by the
>                >> libaxis2_engine.so. (Yes, I used 'nm
>         libaxis2_engine.so | grep
>                >> axis2_handler_invoke" to check that this symbol is
>         indeed
>                defined in
>                >> this library.)
>                >>
>                >> Circular dependency?
>                >>
>                >> How do I break it?
>                >>
>                >> (note that the same thing happens if I download the
>         binary
>                >> distribution, untar it into some directory and copy the
>                mod_axis2 into
>                >> the Apache moddules directory. Up to the same point
>         I can
>                use LoadFile
>                >> to load Axis2/C libraries, but then again I see this
>         circular
>                >> dependency)
>                >>
>                >>
>                >> Thank you,
>                >>
>                >>    alex.
>                >>
>                >>
>              
>          ---------------------------------------------------------------------
>                >> To unsubscribe, e-mail:
>                axis-c-user-unsubscribe@ws.apache.org
>         <ma...@ws.apache.org>
>                <mailto:axis-c-user-unsubscribe@ws.apache.org
>         <ma...@ws.apache.org>>
>
>                >> For additional commands, e-mail:
>                axis-c-user-help@ws.apache.org
>         <ma...@ws.apache.org>
>                <mailto:axis-c-user-help@ws.apache.org
>         <ma...@ws.apache.org>>
>
>                >>
>                >
>                >
>
>              
>          ---------------------------------------------------------------------
>                To unsubscribe, e-mail:
>         axis-c-user-unsubscribe@ws.apache.org
>         <ma...@ws.apache.org>
>                <mailto:axis-c-user-unsubscribe@ws.apache.org
>         <ma...@ws.apache.org>>
>
>                For additional commands, e-mail:
>                axis-c-user-help@ws.apache.org
>         <ma...@ws.apache.org>
>                <mailto:axis-c-user-help@ws.apache.org
>         <ma...@ws.apache.org>>
>
>
>
>
>
>            --    comp.lang.c -
>         http://groups.google.com/group/comp.lang.c/topics
>
>
>         No virus found in this incoming message.
>         Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus
>         Database: 270.5.0/1556 - Release Date: 7/16/2008 4:56 PM
>          
>
>
>
>     -- 
>     Samisa Abeysinghe Director, Engineering; WSO2 Inc.
>
>     http://www.wso2.com/ - "The Open Source SOA Company"
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-c-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.138 / Virus Database: 270.5.0/1556 - Release Date: 7/16/2008 4:56 PM
>   


-- 
Samisa Abeysinghe 
Director, Engineering; WSO2 Inc.

http://www.wso2.com/ - "The Open Source SOA Company"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Loading mod_axis2.so module into Apache

Posted by Supun Kamburugamuva <su...@gmail.com>.
Hi Samisa,

I think some of the instructions like setting the LD_LIBRARY_PATH is
missing. Also I think we should add a faq saying what are the things that
can go wrong when we deploy in Apache and possible solutions to that.

Supun..

On Thu, Jul 17, 2008 at 11:57 AM, Samisa Abeysinghe <sa...@wso2.com> wrote:

> Supun,
>   Arn't these steps on the manual?
> Samisa...
>
> Supun Kamburugamuva wrote:
>
>> Hi Alex,
>>
>> Nice description of the problem. Couldn't think of a better way to do it.
>>
>> This is what you need to do.
>>
>> You have the axis2/c distribution in /home/alex/axis2c-dist right? You
>> should have the lib, modules and services directories under that directory.
>> Also you need to have the axis2.xml file in that directory.
>>
>> Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent
>> of this (ldconfig).
>>  Please remove all your  LoadFile directives from your Apache
>> configuration.
>>
>> Make sure your Axis2/C configuration in httpd.conf is correct. The
>> required entries are:
>>
>> LoadModule axis2_module MOD_AXIS2_SO_PATH
>> Axis2RepoPath AXIS2C_INSTALL_DIR
>> Axis2LogFile  PATH_TO_LOG_FILE
>> Axis2LogLevel LOG_LEVEL
>> <Location /axis2>
>>    SetHandler axis2_module
>> </Location>
>>
>>
>> Also make sure that Apache has read access to the /home/alex/axis2c-dist
>> directory. Start Apache and everything should work fine.
>>
>> Supun..
>>
>> On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri <rajikacc@gmail.com<mailto:
>> rajikacc@gmail.com>> wrote:
>>
>>
>>
>>    On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov <alex@bolgarov.org
>>    <ma...@bolgarov.org>> wrote:
>>
>>        Well, our server machine is not supposed to have development
>>        tools at
>>        all. So I can't compile the Axis2/C on it.
>>
>>        Then, how it is supposed to work if I use the Axis2C binary
>>        distribution?
>>
>>    1. Unzip the binary to a location,
>>    2. Copy the mod_axis2.so to the Apache module directory.
>>    3. Set the LoadModule and the Axis2RepoPath in httpd.conf
>>    Restart the Apache server.
>>
>>    -Rajika
>>
>>
>>
>>        And it should have nothing to do with environment variables
>>        settings
>>        (other then possible LD_LIBRARY_PATH) because Apache can't
>>        load the
>>        module at all, because the ldopen() can't find the shared
>>        libraries
>>        that this module refers to, and I can't load those shared
>>        libraries
>>        manually using LoadFile directive because of the circular
>>        reference
>>        problem as I described. So at the moment of failure no Axis2/C
>>        code
>>        has executed yet that could have a chance to fix something
>>        (like, to
>>        find and load libraries from the location pointed by the
>>        AXIS2C_HOME
>>        or by any parameter in the Apache config file. Or am I wrong here?
>>
>>        What I don't understand is why (and how) it works if I run the
>>        Apache
>>        server on the machine where I compile the Axis2C. Does the linker,
>>        when it builds the libmod_axis2.so, embeds into this library the
>>        pathes to the other Axis2/C libraries so, when I copy the
>>        mod_axis2.so
>>        into the Apache modules directory on the same machine, it
>>        finds them
>>        using those embedded pathes?
>>
>>
>>        Thank you,
>>
>>           alex.
>>
>>        On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake
>>        <glahiru@gmail.com <ma...@gmail.com>> wrote:
>>        > Hi Alex,
>>        >
>>        > I think you have to set AXIS2C_HOME environment variable on
>>        your server
>>        > machine. And why are you copying libraries from one machine
>>        to another why
>>        > don't you compile Axis2C on you server machine.AFAIK if your
>>        first machine
>>        > and the second machine are different,different in the sense
>>        first machine is
>>        > dual core and the server machine is core 2 duo or something
>>        else you have to
>>        > recompile Axis2C on your server machine and create
>>        libmod_axis2.so otherwise
>>        > previously compiled library won't work on the server machine.
>>        >
>>        > Regards
>>        > Lahiru
>>        >
>>        > On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov
>>        <alex@bolgarov.org <ma...@bolgarov.org>> wrote:
>>        >>
>>        >> Hi,
>>        >>
>>        >> How do you load a mod_axis2.so module into the Apache when
>>        you copy
>>        >> the Axis2/C libraries to some directory - for example, when
>>        you are
>>        >> using the binary Axis2/C distribution, or just build
>>        Axis2/C from
>>        >> source on one machine (and installed itto some directory)
>>        and then
>>        >> copy Axis2/C module and libraries to some directory on some
>>        othar
>>        >> machine with Apache server?
>>        >>
>>        >> Well, here is a longer description of the problem:
>>        >>
>>        >> Say I'm using a source distribution. I download the .tar.gz
>>        source
>>        >> tarball, untar, configure it with some install directory
>>        (--prefix)
>>        >> and build/install it, now I have this install directory
>>        with the build
>>        >> by me Axis2/C.
>>        >>
>>        >> I have Apache server running in this machine, so I copy
>>        mod_axis2.so
>>        >> into the Apache installation, I update the Apache config to
>>        load the
>>        >> module, I define the Axis2/C repository, I develop a web
>>        service and
>>        >> run tests against it. All is fine up to this point.
>>        >>
>>        >> Now I want to use the Axis2/C with the Apache server that
>>        is running
>>        >> on another machine.
>>        >>
>>        >> I copy everything from the install directory from the build
>>        machine
>>        >> into some directory on this other machine with Apache
>>        (let's call this
>>        >> directory "/home/alex/axis2c-dist").
>>        >>
>>        >> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it
>>        into the
>>        >> Apache's modules directory.
>>        >>
>>        >> Now I change the Apache config file so that it contains the
>>        line
>>        >>
>>        >>    LoadModule axis2_module modules/mod_axis2.so
>>        >>
>>        >> I try to start Apache:
>>        >>
>>        >>    $ apachectl start
>>        >>
>>        >> and see following error:
>>        >>
>>        >> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
>>        >> libaxis2_engine.so.0: cannot open shared object file: No
>>        such file or
>>        >> directory
>>        >>
>>        >> Now, I happen to know about the LoadFile Apache directive :)
>>        >>
>>        >> I add the LoadFile directive for the libaxis2_engine.so so
>>        that Apache
>>        >> loads it from the /home/alex/axis2c-dist directory, now the
>>        Apache
>>        >> config looks like this:
>>        >>
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>        >>    LoadModule axis2_module modules/mod_axis2.so
>>        >>
>>        >> I try to start Apache again:
>>        >>
>>        >>    $ apachectl start
>>        >>
>>        >> and now see:
>>        >>
>>        >> Cannot load
>>        /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
>>        >> server: libneethi.so.0: cannot open shared object file: No
>>        such file
>>        >> or directory
>>        >>
>>        >> OK, I add LoadFile directives for the libneethi.so, and so
>>        on, when I
>>        >> finally arrive to the following config:
>>        >>
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>>        >>    LoadFile
>>        /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>        >>
>>        >>    LoadModule axis2_module modules/mod_axis2.so
>>        >>
>>        >> But now, after I try to start Apache, I see new error:
>>        >>
>>        >> Cannot load
>>        /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>>        >> into server:
>>        /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
>>        >> undefined symbol: axis2_handler_invoke
>>        >>
>>        >> Which means that the libaxis2_engine.so depends on the
>>        >> libaxis2_http_common.so, and requires it to be loaded by
>>        Apache first,
>>        >> but the libaxis2_http_common.so contains a reference to
>>        undefined
>>        >> symbol "axis2_handler_invoke", that is defined by the
>>        >> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
>>        >> axis2_handler_invoke" to check that this symbol is indeed
>>        defined in
>>        >> this library.)
>>        >>
>>        >> Circular dependency?
>>        >>
>>        >> How do I break it?
>>        >>
>>        >> (note that the same thing happens if I download the binary
>>        >> distribution, untar it into some directory and copy the
>>        mod_axis2 into
>>        >> the Apache moddules directory. Up to the same point I can
>>        use LoadFile
>>        >> to load Axis2/C libraries, but then again I see this circular
>>        >> dependency)
>>        >>
>>        >>
>>        >> Thank you,
>>        >>
>>        >>    alex.
>>        >>
>>        >>
>>
>>  ---------------------------------------------------------------------
>>        >> To unsubscribe, e-mail:
>>        axis-c-user-unsubscribe@ws.apache.org
>>        <ma...@ws.apache.org>
>>        >> For additional commands, e-mail:
>>        axis-c-user-help@ws.apache.org
>>        <ma...@ws.apache.org>
>>        >>
>>        >
>>        >
>>
>>
>>  ---------------------------------------------------------------------
>>        To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>>        <ma...@ws.apache.org>
>>        For additional commands, e-mail:
>>        axis-c-user-help@ws.apache.org
>>        <ma...@ws.apache.org>
>>
>>
>>
>>
>>    --    comp.lang.c - http://groups.google.com/group/comp.lang.c/topics
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database:
>> 270.5.0/1556 - Release Date: 7/16/2008 4:56 PM
>>
>>
>
>
> --
> Samisa Abeysinghe Director, Engineering; WSO2 Inc.
>
> http://www.wso2.com/ - "The Open Source SOA Company"
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

Re: Loading mod_axis2.so module into Apache

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Supun,
    Arn't these steps on the manual?
Samisa...

Supun Kamburugamuva wrote:
> Hi Alex,
>
> Nice description of the problem. Couldn't think of a better way to do it.
>
> This is what you need to do.
>
> You have the axis2/c distribution in /home/alex/axis2c-dist right? You 
> should have the lib, modules and services directories under that 
> directory. Also you need to have the axis2.xml file in that directory.
>
> Please add the lib directory to your LD_LIBRARY_PATH or do an 
> equivalent of this (ldconfig).
>  
> Please remove all your  LoadFile directives from your Apache 
> configuration.
>
> Make sure your Axis2/C configuration in httpd.conf is correct. The 
> required entries are:
>
> LoadModule axis2_module MOD_AXIS2_SO_PATH
> Axis2RepoPath AXIS2C_INSTALL_DIR
> Axis2LogFile  PATH_TO_LOG_FILE
> Axis2LogLevel LOG_LEVEL
> <Location /axis2>
>     SetHandler axis2_module
> </Location>
>
>   
>
> Also make sure that Apache has read access to the 
> /home/alex/axis2c-dist directory. 
> Start Apache and everything should work fine.
>
> Supun..
>
> On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri <rajikacc@gmail.com 
> <ma...@gmail.com>> wrote:
>
>
>
>     On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov <alex@bolgarov.org
>     <ma...@bolgarov.org>> wrote:
>
>         Well, our server machine is not supposed to have development
>         tools at
>         all. So I can't compile the Axis2/C on it.
>
>         Then, how it is supposed to work if I use the Axis2C binary
>         distribution?
>
>     1. Unzip the binary to a location,
>     2. Copy the mod_axis2.so to the Apache module directory.
>     3. Set the LoadModule and the Axis2RepoPath in httpd.conf
>     Restart the Apache server.
>
>     -Rajika
>
>
>
>         And it should have nothing to do with environment variables
>         settings
>         (other then possible LD_LIBRARY_PATH) because Apache can't
>         load the
>         module at all, because the ldopen() can't find the shared
>         libraries
>         that this module refers to, and I can't load those shared
>         libraries
>         manually using LoadFile directive because of the circular
>         reference
>         problem as I described. So at the moment of failure no Axis2/C
>         code
>         has executed yet that could have a chance to fix something
>         (like, to
>         find and load libraries from the location pointed by the
>         AXIS2C_HOME
>         or by any parameter in the Apache config file. Or am I wrong here?
>
>         What I don't understand is why (and how) it works if I run the
>         Apache
>         server on the machine where I compile the Axis2C. Does the linker,
>         when it builds the libmod_axis2.so, embeds into this library the
>         pathes to the other Axis2/C libraries so, when I copy the
>         mod_axis2.so
>         into the Apache modules directory on the same machine, it
>         finds them
>         using those embedded pathes?
>
>
>         Thank you,
>
>            alex.
>
>         On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake
>         <glahiru@gmail.com <ma...@gmail.com>> wrote:
>         > Hi Alex,
>         >
>         > I think you have to set AXIS2C_HOME environment variable on
>         your server
>         > machine. And why are you copying libraries from one machine
>         to another why
>         > don't you compile Axis2C on you server machine.AFAIK if your
>         first machine
>         > and the second machine are different,different in the sense
>         first machine is
>         > dual core and the server machine is core 2 duo or something
>         else you have to
>         > recompile Axis2C on your server machine and create
>         libmod_axis2.so otherwise
>         > previously compiled library won't work on the server machine.
>         >
>         > Regards
>         > Lahiru
>         >
>         > On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov
>         <alex@bolgarov.org <ma...@bolgarov.org>> wrote:
>         >>
>         >> Hi,
>         >>
>         >> How do you load a mod_axis2.so module into the Apache when
>         you copy
>         >> the Axis2/C libraries to some directory - for example, when
>         you are
>         >> using the binary Axis2/C distribution, or just build
>         Axis2/C from
>         >> source on one machine (and installed itto some directory)
>         and then
>         >> copy Axis2/C module and libraries to some directory on some
>         othar
>         >> machine with Apache server?
>         >>
>         >> Well, here is a longer description of the problem:
>         >>
>         >> Say I'm using a source distribution. I download the .tar.gz
>         source
>         >> tarball, untar, configure it with some install directory
>         (--prefix)
>         >> and build/install it, now I have this install directory
>         with the build
>         >> by me Axis2/C.
>         >>
>         >> I have Apache server running in this machine, so I copy
>         mod_axis2.so
>         >> into the Apache installation, I update the Apache config to
>         load the
>         >> module, I define the Axis2/C repository, I develop a web
>         service and
>         >> run tests against it. All is fine up to this point.
>         >>
>         >> Now I want to use the Axis2/C with the Apache server that
>         is running
>         >> on another machine.
>         >>
>         >> I copy everything from the install directory from the build
>         machine
>         >> into some directory on this other machine with Apache
>         (let's call this
>         >> directory "/home/alex/axis2c-dist").
>         >>
>         >> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it
>         into the
>         >> Apache's modules directory.
>         >>
>         >> Now I change the Apache config file so that it contains the
>         line
>         >>
>         >>    LoadModule axis2_module modules/mod_axis2.so
>         >>
>         >> I try to start Apache:
>         >>
>         >>    $ apachectl start
>         >>
>         >> and see following error:
>         >>
>         >> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
>         >> libaxis2_engine.so.0: cannot open shared object file: No
>         such file or
>         >> directory
>         >>
>         >> Now, I happen to know about the LoadFile Apache directive :)
>         >>
>         >> I add the LoadFile directive for the libaxis2_engine.so so
>         that Apache
>         >> loads it from the /home/alex/axis2c-dist directory, now the
>         Apache
>         >> config looks like this:
>         >>
>         >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>         >>    LoadModule axis2_module modules/mod_axis2.so
>         >>
>         >> I try to start Apache again:
>         >>
>         >>    $ apachectl start
>         >>
>         >> and now see:
>         >>
>         >> Cannot load
>         /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
>         >> server: libneethi.so.0: cannot open shared object file: No
>         such file
>         >> or directory
>         >>
>         >> OK, I add LoadFile directives for the libneethi.so, and so
>         on, when I
>         >> finally arrive to the following config:
>         >>
>         >>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>         >>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>         >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>         >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>         >>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>         >>    LoadFile
>         /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>         >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>         >>
>         >>    LoadModule axis2_module modules/mod_axis2.so
>         >>
>         >> But now, after I try to start Apache, I see new error:
>         >>
>         >> Cannot load
>         /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>         >> into server:
>         /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
>         >> undefined symbol: axis2_handler_invoke
>         >>
>         >> Which means that the libaxis2_engine.so depends on the
>         >> libaxis2_http_common.so, and requires it to be loaded by
>         Apache first,
>         >> but the libaxis2_http_common.so contains a reference to
>         undefined
>         >> symbol "axis2_handler_invoke", that is defined by the
>         >> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
>         >> axis2_handler_invoke" to check that this symbol is indeed
>         defined in
>         >> this library.)
>         >>
>         >> Circular dependency?
>         >>
>         >> How do I break it?
>         >>
>         >> (note that the same thing happens if I download the binary
>         >> distribution, untar it into some directory and copy the
>         mod_axis2 into
>         >> the Apache moddules directory. Up to the same point I can
>         use LoadFile
>         >> to load Axis2/C libraries, but then again I see this circular
>         >> dependency)
>         >>
>         >>
>         >> Thank you,
>         >>
>         >>    alex.
>         >>
>         >>
>         ---------------------------------------------------------------------
>         >> To unsubscribe, e-mail:
>         axis-c-user-unsubscribe@ws.apache.org
>         <ma...@ws.apache.org>
>         >> For additional commands, e-mail:
>         axis-c-user-help@ws.apache.org
>         <ma...@ws.apache.org>
>         >>
>         >
>         >
>
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>         <ma...@ws.apache.org>
>         For additional commands, e-mail:
>         axis-c-user-help@ws.apache.org
>         <ma...@ws.apache.org>
>
>
>
>
>     -- 
>     comp.lang.c - http://groups.google.com/group/comp.lang.c/topics
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.138 / Virus Database: 270.5.0/1556 - Release Date: 7/16/2008 4:56 PM
>   


-- 
Samisa Abeysinghe 
Director, Engineering; WSO2 Inc.

http://www.wso2.com/ - "The Open Source SOA Company"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Loading mod_axis2.so module into Apache

Posted by Supun Kamburugamuva <su...@gmail.com>.
Hi Alex,

Nice description of the problem. Couldn't think of a better way to do it.

This is what you need to do.

You have the axis2/c distribution in /home/alex/axis2c-dist right? You
should have the lib, modules and services directories under that directory.
Also you need to have the axis2.xml file in that directory.

Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent of
this (ldconfig).

Please remove all your  LoadFile directives from your Apache configuration.

Make sure your Axis2/C configuration in httpd.conf is correct. The required
entries are:

LoadModule axis2_module MOD_AXIS2_SO_PATH
Axis2RepoPath AXIS2C_INSTALL_DIR
Axis2LogFile  PATH_TO_LOG_FILE
Axis2LogLevel LOG_LEVEL
<Location /axis2>
    SetHandler axis2_module
</Location>


Also make sure that Apache has read access to the /home/alex/axis2c-dist
directory.
Start Apache and everything should work fine.

Supun..

On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri <ra...@gmail.com>
wrote:

>
>
> On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov <al...@bolgarov.org> wrote:
>
>> Well, our server machine is not supposed to have development tools at
>> all. So I can't compile the Axis2/C on it.
>>
>> Then, how it is supposed to work if I use the Axis2C binary distribution?
>
> 1. Unzip the binary to a location,
> 2. Copy the mod_axis2.so to the Apache module directory.
> 3. Set the LoadModule and the Axis2RepoPath in httpd.conf
> Restart the Apache server.
>
> -Rajika
>
>>
>>
>> And it should have nothing to do with environment variables settings
>> (other then possible LD_LIBRARY_PATH) because Apache can't load the
>> module at all, because the ldopen() can't find the shared libraries
>> that this module refers to, and I can't load those shared libraries
>> manually using LoadFile directive because of the circular reference
>> problem as I described. So at the moment of failure no Axis2/C code
>> has executed yet that could have a chance to fix something (like, to
>> find and load libraries from the location pointed by the AXIS2C_HOME
>> or by any parameter in the Apache config file. Or am I wrong here?
>>
>> What I don't understand is why (and how) it works if I run the Apache
>> server on the machine where I compile the Axis2C. Does the linker,
>> when it builds the libmod_axis2.so, embeds into this library the
>> pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so
>> into the Apache modules directory on the same machine, it finds them
>> using those embedded pathes?
>>
>>
>> Thank you,
>>
>>    alex.
>>
>> On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake <gl...@gmail.com>
>> wrote:
>> > Hi Alex,
>> >
>> > I think you have to set AXIS2C_HOME environment variable on your server
>> > machine. And why are you copying libraries from one machine to another
>> why
>> > don't you compile Axis2C on you server machine.AFAIK if your first
>> machine
>> > and the second machine are different,different in the sense first
>> machine is
>> > dual core and the server machine is core 2 duo or something else you
>> have to
>> > recompile Axis2C on your server machine and create libmod_axis2.so
>> otherwise
>> > previously compiled library won't work on the server machine.
>> >
>> > Regards
>> > Lahiru
>> >
>> > On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov <al...@bolgarov.org>
>> wrote:
>> >>
>> >> Hi,
>> >>
>> >> How do you load a mod_axis2.so module into the Apache when you copy
>> >> the Axis2/C libraries to some directory - for example, when you are
>> >> using the binary Axis2/C distribution, or just build Axis2/C from
>> >> source on one machine (and installed itto some directory) and then
>> >> copy Axis2/C module and libraries to some directory on some othar
>> >> machine with Apache server?
>> >>
>> >> Well, here is a longer description of the problem:
>> >>
>> >> Say I'm using a source distribution. I download the .tar.gz source
>> >> tarball, untar, configure it with some install directory (--prefix)
>> >> and build/install it, now I have this install directory with the build
>> >> by me Axis2/C.
>> >>
>> >> I have Apache server running in this machine, so I copy mod_axis2.so
>> >> into the Apache installation, I update the Apache config to load the
>> >> module, I define the Axis2/C repository, I develop a web service and
>> >> run tests against it. All is fine up to this point.
>> >>
>> >> Now I want to use the Axis2/C with the Apache server that is running
>> >> on another machine.
>> >>
>> >> I copy everything from the install directory from the build machine
>> >> into some directory on this other machine with Apache (let's call this
>> >> directory "/home/alex/axis2c-dist").
>> >>
>> >> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the
>> >> Apache's modules directory.
>> >>
>> >> Now I change the Apache config file so that it contains the line
>> >>
>> >>    LoadModule axis2_module modules/mod_axis2.so
>> >>
>> >> I try to start Apache:
>> >>
>> >>    $ apachectl start
>> >>
>> >> and see following error:
>> >>
>> >> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
>> >> libaxis2_engine.so.0: cannot open shared object file: No such file or
>> >> directory
>> >>
>> >> Now, I happen to know about the LoadFile Apache directive :)
>> >>
>> >> I add the LoadFile directive for the libaxis2_engine.so so that Apache
>> >> loads it from the /home/alex/axis2c-dist directory, now the Apache
>> >> config looks like this:
>> >>
>> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>> >>    LoadModule axis2_module modules/mod_axis2.so
>> >>
>> >> I try to start Apache again:
>> >>
>> >>    $ apachectl start
>> >>
>> >> and now see:
>> >>
>> >> Cannot load /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
>> >> server: libneethi.so.0: cannot open shared object file: No such file
>> >> or directory
>> >>
>> >> OK, I add LoadFile directives for the libneethi.so, and so on, when I
>> >> finally arrive to the following config:
>> >>
>> >>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>> >>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>> >>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>> >>
>> >>    LoadModule axis2_module modules/mod_axis2.so
>> >>
>> >> But now, after I try to start Apache, I see new error:
>> >>
>> >> Cannot load /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>> >> into server: /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
>> >> undefined symbol: axis2_handler_invoke
>> >>
>> >> Which means that the libaxis2_engine.so depends on the
>> >> libaxis2_http_common.so, and requires it to be loaded by Apache first,
>> >> but the libaxis2_http_common.so contains a reference to undefined
>> >> symbol "axis2_handler_invoke", that is defined by the
>> >> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
>> >> axis2_handler_invoke" to check that this symbol is indeed defined in
>> >> this library.)
>> >>
>> >> Circular dependency?
>> >>
>> >> How do I break it?
>> >>
>> >> (note that the same thing happens if I download the binary
>> >> distribution, untar it into some directory and copy the mod_axis2 into
>> >> the Apache moddules directory. Up to the same point I can use LoadFile
>> >> to load Axis2/C libraries, but then again I see this circular
>> >> dependency)
>> >>
>> >>
>> >> Thank you,
>> >>
>> >>    alex.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>> >>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
>
>
> --
> comp.lang.c - http://groups.google.com/group/comp.lang.c/topics
>

Re: Loading mod_axis2.so module into Apache

Posted by Rajika Kumarasiri <ra...@gmail.com>.
On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov <al...@bolgarov.org> wrote:

> Well, our server machine is not supposed to have development tools at
> all. So I can't compile the Axis2/C on it.
>
> Then, how it is supposed to work if I use the Axis2C binary distribution?

1. Unzip the binary to a location,
2. Copy the mod_axis2.so to the Apache module directory.
3. Set the LoadModule and the Axis2RepoPath in httpd.conf
Restart the Apache server.

-Rajika

>
>
> And it should have nothing to do with environment variables settings
> (other then possible LD_LIBRARY_PATH) because Apache can't load the
> module at all, because the ldopen() can't find the shared libraries
> that this module refers to, and I can't load those shared libraries
> manually using LoadFile directive because of the circular reference
> problem as I described. So at the moment of failure no Axis2/C code
> has executed yet that could have a chance to fix something (like, to
> find and load libraries from the location pointed by the AXIS2C_HOME
> or by any parameter in the Apache config file. Or am I wrong here?
>
> What I don't understand is why (and how) it works if I run the Apache
> server on the machine where I compile the Axis2C. Does the linker,
> when it builds the libmod_axis2.so, embeds into this library the
> pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so
> into the Apache modules directory on the same machine, it finds them
> using those embedded pathes?
>
>
> Thank you,
>
>    alex.
>
> On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake <gl...@gmail.com>
> wrote:
> > Hi Alex,
> >
> > I think you have to set AXIS2C_HOME environment variable on your server
> > machine. And why are you copying libraries from one machine to another
> why
> > don't you compile Axis2C on you server machine.AFAIK if your first
> machine
> > and the second machine are different,different in the sense first machine
> is
> > dual core and the server machine is core 2 duo or something else you have
> to
> > recompile Axis2C on your server machine and create libmod_axis2.so
> otherwise
> > previously compiled library won't work on the server machine.
> >
> > Regards
> > Lahiru
> >
> > On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov <al...@bolgarov.org>
> wrote:
> >>
> >> Hi,
> >>
> >> How do you load a mod_axis2.so module into the Apache when you copy
> >> the Axis2/C libraries to some directory - for example, when you are
> >> using the binary Axis2/C distribution, or just build Axis2/C from
> >> source on one machine (and installed itto some directory) and then
> >> copy Axis2/C module and libraries to some directory on some othar
> >> machine with Apache server?
> >>
> >> Well, here is a longer description of the problem:
> >>
> >> Say I'm using a source distribution. I download the .tar.gz source
> >> tarball, untar, configure it with some install directory (--prefix)
> >> and build/install it, now I have this install directory with the build
> >> by me Axis2/C.
> >>
> >> I have Apache server running in this machine, so I copy mod_axis2.so
> >> into the Apache installation, I update the Apache config to load the
> >> module, I define the Axis2/C repository, I develop a web service and
> >> run tests against it. All is fine up to this point.
> >>
> >> Now I want to use the Axis2/C with the Apache server that is running
> >> on another machine.
> >>
> >> I copy everything from the install directory from the build machine
> >> into some directory on this other machine with Apache (let's call this
> >> directory "/home/alex/axis2c-dist").
> >>
> >> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the
> >> Apache's modules directory.
> >>
> >> Now I change the Apache config file so that it contains the line
> >>
> >>    LoadModule axis2_module modules/mod_axis2.so
> >>
> >> I try to start Apache:
> >>
> >>    $ apachectl start
> >>
> >> and see following error:
> >>
> >> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
> >> libaxis2_engine.so.0: cannot open shared object file: No such file or
> >> directory
> >>
> >> Now, I happen to know about the LoadFile Apache directive :)
> >>
> >> I add the LoadFile directive for the libaxis2_engine.so so that Apache
> >> loads it from the /home/alex/axis2c-dist directory, now the Apache
> >> config looks like this:
> >>
> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
> >>    LoadModule axis2_module modules/mod_axis2.so
> >>
> >> I try to start Apache again:
> >>
> >>    $ apachectl start
> >>
> >> and now see:
> >>
> >> Cannot load /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
> >> server: libneethi.so.0: cannot open shared object file: No such file
> >> or directory
> >>
> >> OK, I add LoadFile directives for the libneethi.so, and so on, when I
> >> finally arrive to the following config:
> >>
> >>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
> >>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
> >>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
> >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
> >>
> >>    LoadModule axis2_module modules/mod_axis2.so
> >>
> >> But now, after I try to start Apache, I see new error:
> >>
> >> Cannot load /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
> >> into server: /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
> >> undefined symbol: axis2_handler_invoke
> >>
> >> Which means that the libaxis2_engine.so depends on the
> >> libaxis2_http_common.so, and requires it to be loaded by Apache first,
> >> but the libaxis2_http_common.so contains a reference to undefined
> >> symbol "axis2_handler_invoke", that is defined by the
> >> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
> >> axis2_handler_invoke" to check that this symbol is indeed defined in
> >> this library.)
> >>
> >> Circular dependency?
> >>
> >> How do I break it?
> >>
> >> (note that the same thing happens if I download the binary
> >> distribution, untar it into some directory and copy the mod_axis2 into
> >> the Apache moddules directory. Up to the same point I can use LoadFile
> >> to load Axis2/C libraries, but then again I see this circular
> >> dependency)
> >>
> >>
> >> Thank you,
> >>
> >>    alex.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
comp.lang.c - http://groups.google.com/group/comp.lang.c/topics

Re: Loading mod_axis2.so module into Apache

Posted by Alex Bolgarov <al...@bolgarov.org>.
Well, our server machine is not supposed to have development tools at
all. So I can't compile the Axis2/C on it.

Then, how it is supposed to work if I use the Axis2C binary distribution?

And it should have nothing to do with environment variables settings
(other then possible LD_LIBRARY_PATH) because Apache can't load the
module at all, because the ldopen() can't find the shared libraries
that this module refers to, and I can't load those shared libraries
manually using LoadFile directive because of the circular reference
problem as I described. So at the moment of failure no Axis2/C code
has executed yet that could have a chance to fix something (like, to
find and load libraries from the location pointed by the AXIS2C_HOME
or by any parameter in the Apache config file. Or am I wrong here?

What I don't understand is why (and how) it works if I run the Apache
server on the machine where I compile the Axis2C. Does the linker,
when it builds the libmod_axis2.so, embeds into this library the
pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so
into the Apache modules directory on the same machine, it finds them
using those embedded pathes?


Thank you,

    alex.

On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake <gl...@gmail.com> wrote:
> Hi Alex,
>
> I think you have to set AXIS2C_HOME environment variable on your server
> machine. And why are you copying libraries from one machine to another why
> don't you compile Axis2C on you server machine.AFAIK if your first machine
> and the second machine are different,different in the sense first machine is
> dual core and the server machine is core 2 duo or something else you have to
> recompile Axis2C on your server machine and create libmod_axis2.so otherwise
> previously compiled library won't work on the server machine.
>
> Regards
> Lahiru
>
> On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov <al...@bolgarov.org> wrote:
>>
>> Hi,
>>
>> How do you load a mod_axis2.so module into the Apache when you copy
>> the Axis2/C libraries to some directory - for example, when you are
>> using the binary Axis2/C distribution, or just build Axis2/C from
>> source on one machine (and installed itto some directory) and then
>> copy Axis2/C module and libraries to some directory on some othar
>> machine with Apache server?
>>
>> Well, here is a longer description of the problem:
>>
>> Say I'm using a source distribution. I download the .tar.gz source
>> tarball, untar, configure it with some install directory (--prefix)
>> and build/install it, now I have this install directory with the build
>> by me Axis2/C.
>>
>> I have Apache server running in this machine, so I copy mod_axis2.so
>> into the Apache installation, I update the Apache config to load the
>> module, I define the Axis2/C repository, I develop a web service and
>> run tests against it. All is fine up to this point.
>>
>> Now I want to use the Axis2/C with the Apache server that is running
>> on another machine.
>>
>> I copy everything from the install directory from the build machine
>> into some directory on this other machine with Apache (let's call this
>> directory "/home/alex/axis2c-dist").
>>
>> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the
>> Apache's modules directory.
>>
>> Now I change the Apache config file so that it contains the line
>>
>>    LoadModule axis2_module modules/mod_axis2.so
>>
>> I try to start Apache:
>>
>>    $ apachectl start
>>
>> and see following error:
>>
>> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
>> libaxis2_engine.so.0: cannot open shared object file: No such file or
>> directory
>>
>> Now, I happen to know about the LoadFile Apache directive :)
>>
>> I add the LoadFile directive for the libaxis2_engine.so so that Apache
>> loads it from the /home/alex/axis2c-dist directory, now the Apache
>> config looks like this:
>>
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>    LoadModule axis2_module modules/mod_axis2.so
>>
>> I try to start Apache again:
>>
>>    $ apachectl start
>>
>> and now see:
>>
>> Cannot load /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
>> server: libneethi.so.0: cannot open shared object file: No such file
>> or directory
>>
>> OK, I add LoadFile directives for the libneethi.so, and so on, when I
>> finally arrive to the following config:
>>
>>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>
>>    LoadModule axis2_module modules/mod_axis2.so
>>
>> But now, after I try to start Apache, I see new error:
>>
>> Cannot load /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>> into server: /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
>> undefined symbol: axis2_handler_invoke
>>
>> Which means that the libaxis2_engine.so depends on the
>> libaxis2_http_common.so, and requires it to be loaded by Apache first,
>> but the libaxis2_http_common.so contains a reference to undefined
>> symbol "axis2_handler_invoke", that is defined by the
>> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
>> axis2_handler_invoke" to check that this symbol is indeed defined in
>> this library.)
>>
>> Circular dependency?
>>
>> How do I break it?
>>
>> (note that the same thing happens if I download the binary
>> distribution, untar it into some directory and copy the mod_axis2 into
>> the Apache moddules directory. Up to the same point I can use LoadFile
>> to load Axis2/C libraries, but then again I see this circular
>> dependency)
>>
>>
>> Thank you,
>>
>>    alex.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Loading mod_axis2.so module into Apache

Posted by lahiru gunathilake <gl...@gmail.com>.
On Thu, Jul 17, 2008 at 12:58 AM, lahiru gunathilake <gl...@gmail.com>
wrote:

> Hi Alex,
>
> I think you have to set AXIS2C_HOME environment variable on your server
> machine.
>
You don't need to set the environment variable but you are suppose to change
the Axis2RepoPath in the Apache config file.

> And why are you copying libraries from one machine to another why don't you
> compile Axis2C on you server machine.AFAIK if your first machine and the
> second machine are different,different in the sense first machine is dual
> core and the server machine is core 2 duo or something else you have to
> recompile Axis2C on your server machine and create libmod_axis2.so otherwise
> previously compiled library won't work on the server machine.
>
> Regards
> Lahiru
>
>
> On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov <al...@bolgarov.org> wrote:
>
>> Hi,
>>
>> How do you load a mod_axis2.so module into the Apache when you copy
>> the Axis2/C libraries to some directory - for example, when you are
>> using the binary Axis2/C distribution, or just build Axis2/C from
>> source on one machine (and installed itto some directory) and then
>> copy Axis2/C module and libraries to some directory on some othar
>> machine with Apache server?
>>
>> Well, here is a longer description of the problem:
>>
>> Say I'm using a source distribution. I download the .tar.gz source
>> tarball, untar, configure it with some install directory (--prefix)
>> and build/install it, now I have this install directory with the build
>> by me Axis2/C.
>>
>> I have Apache server running in this machine, so I copy mod_axis2.so
>> into the Apache installation, I update the Apache config to load the
>> module, I define the Axis2/C repository, I develop a web service and
>> run tests against it. All is fine up to this point.
>>
>> Now I want to use the Axis2/C with the Apache server that is running
>> on another machine.
>>
>> I copy everything from the install directory from the build machine
>> into some directory on this other machine with Apache (let's call this
>> directory "/home/alex/axis2c-dist").
>>
>> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the
>> Apache's modules directory.
>>
>> Now I change the Apache config file so that it contains the line
>>
>>    LoadModule axis2_module modules/mod_axis2.so
>>
>> I try to start Apache:
>>
>>    $ apachectl start
>>
>> and see following error:
>>
>> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
>> libaxis2_engine.so.0: cannot open shared object file: No such file or
>> directory
>>
>> Now, I happen to know about the LoadFile Apache directive :)
>>
>> I add the LoadFile directive for the libaxis2_engine.so so that Apache
>
> Normally you don't need to add a LoadFile directive.

Lahiru

>
>> loads it from the /home/alex/axis2c-dist directory, now the Apache
>> config looks like this:
>>
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>    LoadModule axis2_module modules/mod_axis2.so
>>
>> I try to start Apache again:
>>
>>    $ apachectl start
>>
>> and now see:
>>
>> Cannot load /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
>> server: libneethi.so.0: cannot open shared object file: No such file
>> or directory
>>
>> OK, I add LoadFile directives for the libneethi.so, and so on, when I
>> finally arrive to the following config:
>>
>>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>
>>    LoadModule axis2_module modules/mod_axis2.so
>>
>> But now, after I try to start Apache, I see new error:
>>
>> Cannot load /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>> into server: /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
>> undefined symbol: axis2_handler_invoke
>>
>> Which means that the libaxis2_engine.so depends on the
>> libaxis2_http_common.so, and requires it to be loaded by Apache first,
>> but the libaxis2_http_common.so contains a reference to undefined
>> symbol "axis2_handler_invoke", that is defined by the
>> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
>> axis2_handler_invoke" to check that this symbol is indeed defined in
>> this library.)
>>
>> Circular dependency?
>>
>> How do I break it?
>>
>> (note that the same thing happens if I download the binary
>> distribution, untar it into some directory and copy the mod_axis2 into
>> the Apache moddules directory. Up to the same point I can use LoadFile
>> to load Axis2/C libraries, but then again I see this circular
>> dependency)
>>
>>
>> Thank you,
>>
>>    alex.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
>

Re: Loading mod_axis2.so module into Apache

Posted by lahiru gunathilake <gl...@gmail.com>.
Hi Alex,

I think you have to set AXIS2C_HOME environment variable on your server
machine. And why are you copying libraries from one machine to another why
don't you compile Axis2C on you server machine.AFAIK if your first machine
and the second machine are different,different in the sense first machine is
dual core and the server machine is core 2 duo or something else you have to
recompile Axis2C on your server machine and create libmod_axis2.so otherwise
previously compiled library won't work on the server machine.

Regards
Lahiru

On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov <al...@bolgarov.org> wrote:

> Hi,
>
> How do you load a mod_axis2.so module into the Apache when you copy
> the Axis2/C libraries to some directory - for example, when you are
> using the binary Axis2/C distribution, or just build Axis2/C from
> source on one machine (and installed itto some directory) and then
> copy Axis2/C module and libraries to some directory on some othar
> machine with Apache server?
>
> Well, here is a longer description of the problem:
>
> Say I'm using a source distribution. I download the .tar.gz source
> tarball, untar, configure it with some install directory (--prefix)
> and build/install it, now I have this install directory with the build
> by me Axis2/C.
>
> I have Apache server running in this machine, so I copy mod_axis2.so
> into the Apache installation, I update the Apache config to load the
> module, I define the Axis2/C repository, I develop a web service and
> run tests against it. All is fine up to this point.
>
> Now I want to use the Axis2/C with the Apache server that is running
> on another machine.
>
> I copy everything from the install directory from the build machine
> into some directory on this other machine with Apache (let's call this
> directory "/home/alex/axis2c-dist").
>
> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the
> Apache's modules directory.
>
> Now I change the Apache config file so that it contains the line
>
>    LoadModule axis2_module modules/mod_axis2.so
>
> I try to start Apache:
>
>    $ apachectl start
>
> and see following error:
>
> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
> libaxis2_engine.so.0: cannot open shared object file: No such file or
> directory
>
> Now, I happen to know about the LoadFile Apache directive :)
>
> I add the LoadFile directive for the libaxis2_engine.so so that Apache
> loads it from the /home/alex/axis2c-dist directory, now the Apache
> config looks like this:
>
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>    LoadModule axis2_module modules/mod_axis2.so
>
> I try to start Apache again:
>
>    $ apachectl start
>
> and now see:
>
> Cannot load /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
> server: libneethi.so.0: cannot open shared object file: No such file
> or directory
>
> OK, I add LoadFile directives for the libneethi.so, and so on, when I
> finally arrive to the following config:
>
>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>
>    LoadModule axis2_module modules/mod_axis2.so
>
> But now, after I try to start Apache, I see new error:
>
> Cannot load /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
> into server: /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
> undefined symbol: axis2_handler_invoke
>
> Which means that the libaxis2_engine.so depends on the
> libaxis2_http_common.so, and requires it to be loaded by Apache first,
> but the libaxis2_http_common.so contains a reference to undefined
> symbol "axis2_handler_invoke", that is defined by the
> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
> axis2_handler_invoke" to check that this symbol is indeed defined in
> this library.)
>
> Circular dependency?
>
> How do I break it?
>
> (note that the same thing happens if I download the binary
> distribution, untar it into some directory and copy the mod_axis2 into
> the Apache moddules directory. Up to the same point I can use LoadFile
> to load Axis2/C libraries, but then again I see this circular
> dependency)
>
>
> Thank you,
>
>    alex.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>