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 Subra A Narayanan <as...@gmail.com> on 2007/09/18 03:14:44 UTC

Unable to locate/load library

Hello folks,

My webservice calls a c library but is unable to load it as it can't locate
it. I put some debugging code in the framework code and this is what I see
in the axis2 log.

[Mon Sep 17 16:53:41 2007] [error] raw_xml_in_out_msg_recv.c(110) Impl
object for service 'object' not set in message receiver. 100 :: Failed in
creating DLL
[Mon Sep 17 16:53:41 2007] [debug] raw_xml_in_out_msg_recv.c(115)
create_funct failed 'libtestws.so: cannot open shared object file: No such
file or directory' :
[Mon Sep 17 16:53:41 2007] [debug] engine.c(296) Axis2 engine receive
completed!


I have set the LD_LIBRARY_PATH and the file is in the path. Is there
something else that I am missing?

Is there an apache start up script file or something where I can specify
where to look for library files? My web service builds perfectly fine with
the correct LD_FLAGS options. The error happens when I try to invoke the
service.

Thanks,
Subra

Re: Unable to locate/load library

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi Subra,
"Subra A Narayanan" <as...@gmail.com> writes:
> I have set the LD_LIBRARY_PATH and the file is in the path. Is there something
> else that I am missing?
>
> Is there an apache start up script file or something where I can specify where
> to look for library files? My web service builds perfectly fine with the
> correct LD_FLAGS options. The error happens when I try to invoke the
> service.
Are you using Axis2/C as an Apache module (mod_axis2.so), If so you
need to edit httpd.conf accordingly. [1]

thanks,
Dinesh

1.http://ws.apache.org/axis2/c/docs/axis2c_manual.html#mod_axis2
-- 
Dinesh Premalal
http://xydinesh.wordpress.com/
GPG ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

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


Re: Unable to locate/load library

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Subra A Narayanan wrote:
> Samisa/Dinesh,
>
> I think I wasn't clear about my question.
>
> My web service library name is libuserdata.so. I have placed this file 
> in axis2-deploy-directory/services/userdata folder. libuserdata.so 
> uses another library called libtestws.so. This is file that is not 
> being loaded. I placed this file in the same directory as 
> libuserdata.so but even that didn't help.
>
> But when I placed the file in /usr/lib folder, apache found it and 
> loaded it successfully.
>
> But is there any way to tell apache to look in some other folder for 
> the file. I dont want to add all my library files to /usr/lib file but 
> want apache to look in /my/library/files/folder. Can this be done?
Edit /etc/ld.so.conf and add your path with the libs, then run ldconfig.
Note that you need super user rights to do that.

Samisa...
>
> Thanks,
> Subra
>
>
>
> On 9/18/07, *Samisa Abeysinghe* <samisa@wso2.com 
> <ma...@wso2.com>> wrote:
>
>     Subra A Narayanan wrote:
>     > Hello folks,
>     >
>     > My webservice calls a c library but is unable to load it as it can't
>     > locate it. I put some debugging code in the framework code and
>     this is
>     > what I see in the axis2 log.
>     >
>     > [Mon Sep 17 16:53:41 2007] [error]
>     raw_xml_in_out_msg_recv.c(110) Impl
>     > object for service 'object' not set in message receiver. 100 ::
>     Failed
>     > in creating DLL
>     > [Mon Sep 17 16:53:41 2007] [debug] raw_xml_in_out_msg_recv.c(115)
>     > create_funct failed 'libtestws.so: cannot open shared object
>     file: No
>     > such file or directory' :
>     > [Mon Sep 17 16:53:41 2007] [debug] engine.c(296) Axis2 engine
>     receive
>     > completed!
>     >
>     >
>     > I have set the LD_LIBRARY_PATH and the file is in the path. Is there
>     > something else that I am missing?
>     What is the "ServiceClass" setting in your services.xml file? It looks
>     to me that you have:
>     <parameter name="ServiceClass" locked="xsd:false">testws</parameter>
>
>     In this case, make sure you have a folder named testws in your
>     repository and also make sure that you have the libtestws.so in there.
>
>     If you have both the service class setting and the service folder with
>     the correct lib in place, then you may check how you liked it. You
>     have
>     to have
>     -lpthread -ldl when linking the service lib.
>
>     Thanks,
>     Samisa...
>
>     >
>     > Is there an apache start up script file or something where I can
>     > specify where to look for library files? My web service builds
>     > perfectly fine with the correct LD_FLAGS options. The error happens
>     > when I try to invoke the service.
>     >
>     > Thanks,
>     > Subra
>
>
>     --
>     Samisa Abeysinghe : WSO2 WSF/PHP
>     "
>     http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP
>     <http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP>"
>
>
>     ---------------------------------------------------------------------
>     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>
>
>


-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


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


Re: Unable to locate/load library

Posted by Subra A Narayanan <as...@gmail.com>.
Samisa/Dinesh,

I think I wasn't clear about my question.

My web service library name is libuserdata.so. I have placed this file in
axis2-deploy-directory/services/userdata folder. libuserdata.so uses another
library called libtestws.so. This is file that is not being loaded. I placed
this file in the same directory as libuserdata.so but even that didn't help.

But when I placed the file in /usr/lib folder, apache found it and loaded it
successfully.

But is there any way to tell apache to look in some other folder for the
file. I dont want to add all my library files to /usr/lib file but want
apache to look in /my/library/files/folder. Can this be done?

Thanks,
Subra



On 9/18/07, Samisa Abeysinghe <sa...@wso2.com> wrote:
>
> Subra A Narayanan wrote:
> > Hello folks,
> >
> > My webservice calls a c library but is unable to load it as it can't
> > locate it. I put some debugging code in the framework code and this is
> > what I see in the axis2 log.
> >
> > [Mon Sep 17 16:53:41 2007] [error] raw_xml_in_out_msg_recv.c(110) Impl
> > object for service 'object' not set in message receiver. 100 :: Failed
> > in creating DLL
> > [Mon Sep 17 16:53:41 2007] [debug] raw_xml_in_out_msg_recv.c(115)
> > create_funct failed 'libtestws.so: cannot open shared object file: No
> > such file or directory' :
> > [Mon Sep 17 16:53:41 2007] [debug] engine.c(296) Axis2 engine receive
> > completed!
> >
> >
> > I have set the LD_LIBRARY_PATH and the file is in the path. Is there
> > something else that I am missing?
> What is the "ServiceClass" setting in your services.xml file? It looks
> to me that you have:
> <parameter name="ServiceClass" locked="xsd:false">testws</parameter>
>
> In this case, make sure you have a folder named testws in your
> repository and also make sure that you have the libtestws.so in there.
>
> If you have both the service class setting and the service folder with
> the correct lib in place, then you may check how you liked it. You have
> to have
> -lpthread -ldl when linking the service lib.
>
> Thanks,
> Samisa...
>
> >
> > Is there an apache start up script file or something where I can
> > specify where to look for library files? My web service builds
> > perfectly fine with the correct LD_FLAGS options. The error happens
> > when I try to invoke the service.
> >
> > Thanks,
> > Subra
>
>
> --
> Samisa Abeysinghe : WSO2 WSF/PHP
> "
> http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP
> "
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

Re: Unable to locate/load library

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Subra A Narayanan wrote:
> Hello folks,
>
> My webservice calls a c library but is unable to load it as it can't 
> locate it. I put some debugging code in the framework code and this is 
> what I see in the axis2 log.
>
> [Mon Sep 17 16:53:41 2007] [error] raw_xml_in_out_msg_recv.c(110) Impl 
> object for service 'object' not set in message receiver. 100 :: Failed 
> in creating DLL
> [Mon Sep 17 16:53:41 2007] [debug] raw_xml_in_out_msg_recv.c(115) 
> create_funct failed 'libtestws.so: cannot open shared object file: No 
> such file or directory' :
> [Mon Sep 17 16:53:41 2007] [debug] engine.c(296) Axis2 engine receive 
> completed!
>
>
> I have set the LD_LIBRARY_PATH and the file is in the path. Is there 
> something else that I am missing?
What is the "ServiceClass" setting in your services.xml file? It looks 
to me that you have:
<parameter name="ServiceClass" locked="xsd:false">testws</parameter>

In this case, make sure you have a folder named testws in your 
repository and also make sure that you have the libtestws.so in there.

If you have both the service class setting and the service folder with 
the correct lib in place, then you may check how you liked it. You have 
to have
-lpthread -ldl when linking the service lib.

Thanks,
Samisa...

>
> Is there an apache start up script file or something where I can 
> specify where to look for library files? My web service builds 
> perfectly fine with the correct LD_FLAGS options. The error happens 
> when I try to invoke the service.
>
> Thanks,
> Subra


-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


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