Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Oracle External Procedures : how to say to Oracle that my .so needs an other .so
Hello,
My goal is to write a VisiBroker 3.3 C++ client that will be called by PL/SQL (8.1.6, Solaris platform)
I managed to write a .so (with a very simple function) and to call it from PL/SQL.
Now I'm trying to do the same with a VisiBroker for C++ Client. But THE CLIENT NEEDS A .so SHIPPED WITH VISIBROKER (i.e. liborb_r.so). I didn't managed to correctly express this to Oracle (I've even tried with putenv to set VisiBroker variables). When I call my .so from PL/SQL I meet the following error message :
ORA-06522: ld.so.1: extprocPLSExtProc: fatal: liborb_r.so: open failed: No such file or directory
Does anybody may help me ?
Thanks a lot !
source code :
#include "generationMessages_c.hh"
extern "C" {
int genereMessages(int personnePk, int groupePk);
}
int genereMessages(int personnePk, int groupePk) {
putenv("VBROKER_ADM=/n/p/oracle/v8.1.6/VisiBroker3.3forC++/adm"); putenv("OSAGENT_PORT=14000"); putenv("LD_LIBRARY_PATH=/n/p/oracle/v8.1.6/VisiBroker3.3forC++/lib"); putenv("PATH=/n/p/oracle/v8.1.6/VisiBroker3.3forC++/bin");
try {
CORBA::ORB_ptr orb = CORBA::ORB_init();
ModuleGenerationMessages::GenerationMessages_var generationMessages
=
ModuleGenerationMessages::GenerationMessages::_bind("GenerationMessagesImpl#1");
generationMessages->genereMessages(personnePk, groupePk);
}
catch(const CORBA::Exception& e) {
return(1);
}
return (0);
}
Source compilation (see at the end, I've tried 2 ways)
Oracle .so declaration :
Create Or Replace Library TONYLIBVB Is
'/n/p/oracle/v8.1.6/Tony/ClientC/messages.so';
/
C function declaration inside a Package :
Create Or Replace Package TONY_PACKAGE_INTP Is
Function genereMessages(personnePk In Binary_Integer, groupePk In
Binary_Integer) Return Binary_Integer;
End TONY_PACKAGE_INTP;
/
Create Or Replace Package Body TONY_PACKAGE_INTP Is
Function genereMessages(personnePk In Binary_Integer, groupePk In
Binary_Integer) Return Binary_Integer
Is External
Name "genereMessages"
Library TONYLIBVB
Parameters (personnePk, groupePk);
End TONY_PACKAGE_INTP;
/
The call :
Set ServerOutput On;
Declare
x Binary_Integer;
Begin
Select TONY_PACKAGE_INTP.genereMessages(27,33) Into x From dual; Dbms_Output.Put_Line('Valeur retournée : ' || x);End ;
I tried 2 compilations ways :
A)
CC -mt -DSOLARIS -I. -I/n/p/oracle/v8.1.6/VisiBroker3.3forC++/include -I/n/p/oracle/v8.1.6/VisiBroker3.3forC++/include/dispatch -g -xs -G -o messages.so messages.C
ERREUR à la ligne 1 :
ORA-06520: PL/SQL: Error loading external library
ORA-06522: ld.so.1: extprocPLSExtProc: fatal: relocation error: file
/n/p/oracle/v8.1.6/Tony/ClientC/messages.so: symbol
__0dPCORBA_ExceptionG__vtbl: referenced symbol not found
ORA-06512: at "KRIZMANIC.TONY_PACKAGE_INTP", line 0 ORA-06512: at line 1 ORA-06512: at line 4
B)
CC -mt -DSOLARIS -I. -I/n/p/oracle/v8.1.6/VisiBroker3.3forC++/include -I/n/p/oracle/v8.1.6/VisiBroker3.3forC++/include/dispatch -g -xs -G -o messages.so messages.C -L/n/p/oracle/v8.1.6/VisiBroker3.3forC++/lib -lorb_r -lsocket -lnsl -ldl -lposix4
ERREUR à la ligne 1 :
ORA-06520: PL/SQL: Error loading external library
ORA-06522: ld.so.1: extprocPLSExtProc: fatal: liborb_r.so: open failed:
No such file or directory
ORA-06512: at "KRIZMANIC.TONY_PACKAGE_INTP", line 0 ORA-06512: at line 1 ORA-06512: at line 4
I've also tried to copy liborb_r.so in the same directory as my .so.
-- Anthony KRIZMANIC - Chef de Projet ASSOCIATION MBDS VIRTUEL - Siret : 42398224800019 - APE : 804C Les Espaces de Sophia - BP 37 - 06901 Sophia Antipolis cedex tél. : 04 93 95 44 70 - fax : 04 93 95 45 17Received on Fri Nov 17 2000 - 06:31:08 CST
![]() |
![]() |