Sitemap

Amicuk Programming Answers

ORA-06521:PL/SQL:Error mapping function :ORA-06522:undefined :ODCIAggregate

2015-10-11   Views:8

Advertisement

Hi, I am getting the following error : SQL> select MinDistance(TT) from egg1; select MinDistance(TT) from egg1 ERROR at line 1: ORA-06521: PL/SQL: Error mapping function ORA-06522: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/custagg.so: u

Hi,
I am getting the following error :
SQL> select MinDistance(TT) from egg1;
select MinDistance(TT) from egg1
ERROR at line 1:
ORA-06521: PL/SQL: Error mapping function
ORA-06522: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/custagg.so:
undefined symbol: ODCIAggregateInitialize
I am compiling my C program with OCI using the following command :
g++ -Wall -c custagg.c -o custagg.o -I$ORACLE_HOME/rdbms/public -I/usr/lib
I am linking to get a shared library custagg.so file with following command :
ld -shared -o custagg.so custagg.o $ORACLE_HOME/lib/l*.so ../../usr/lib/libstdc++.s*
I am not getting any errors during these two phases.
And when i am calling the extproc custagg(Mindistance) which i implemented using ODCI(oracle data catridge interface) ...I am getting the error undefined symbol : ODCIAggregateInitialize
So can any one please let me know what shared libraries are required to access the ODCI services and also am I compiling and linking it the right way or am I missing any libraries.
I have the oci.h & odci.h and several other header files in my :
$ORACLE_HOME/rdbms/public
And while linking i am using : $ORACLE_HOME/lib/*.so files.
So I don't know whether my directory is missing some shared files related to ODCI : can any one please let me know which files or shared libraries I am missing :
Below are list of files in my : $ORACLE_HOME/lib :
custagg123.o libclntsh.so libdbcfg10.so libjox10.so libocci.so.10.1 liborasdkbase.so libskgxpd.so libunwind.so.5
custagg.so libclntsh.so.10.1 libemmas10.so libldapjclnt10.so libocijdbc10.so liborasdkbase.so.10.2 libskgxpu.so libxdb.so
facility.lis libclsra10.so libhasgen10.so libnjni10.so libocr10.so liborasdk.so libsqlplus.so shell.so
hsdb_odbc.so libcorejava.so libheteroxa10.so libnjssl10.so libocrb10.so liborasdk.so.10.2 libsqora.so.10.1 sysliblist
hsdb_ora.so libcoresh10.so libhsbase.so libnnz10.so libocrutl10.so libqsmashr.so libsrvm10.so
lclasses12.zip libcprts.so.5 libhsnav.so libnque10.so libodm10.so libskgxn2.so libsrvmhas10.so
libagtsh.so libcxa.so.3 libimf.so libntcpaio10.so libodmd10.so libskgxns.so libsrvmocr10.so
libagtsh.so.1.0 libcxa.so.5 libirc.a libocci.so libons.so libskgxp10.so libuini10.so
Please reply to my queries.
Please let me know if you want to have a look at the symbols of my object file
Thanks & Regards,
-NN

The replay answer
Advertisement
It's only a quick guess but have you checked your tnsnames.ora file to ensure you've opened the environment to find the libraries? If you set the EXTPROC_DLLS=ANY, you open the database to security issues but it should tell you if this cause because you can't access the library that contains the symbol.
SID_LIST_CALLOUT_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = <oracle_home_directory>)
(PROGRAM = extproc)
(ENV = "EXTPROC_DLLS=ONLY:
<oracle_home_directory>/customlib/writestr1.so
,LD_LIBRARY_PATH=<oracle_home_directory>/lib")
)

Go to See the other 2 answers

ORA-06521: PL/SQL: Error mapping function

Category:DefaultRelease time:2015-10-11Views:130

Hi folks, I am trying to run gather_table_stats for a particular table but am getting the below error. Any ideas? SQL> execute DBMS_STATS.gather_table_stats( ownname=>'DBO',tabname=>'CD_JOURNAL_CHANGE_REG',method_opt=>'FOR ALL INDEXED COLUMNS'[More]

ORA-06521: PL/SQL: Error mapping function with 10.1.0 external procedure

Category:DefaultRelease time:2015-10-11Views:130

We have an external procedure running fine on 8.1.7 on VMS. After compiling and linking succesfully under 10.1.0, I get ORA-06521 PL/SQL: Error mapping function and ORA-06522: ERROR - vms_dlsym for file x, where x in the filename of the linked execut[More]

ORA-06521: PL/SQL: Error mapping function :ORA-06522:undefined :ODCIAggre

Category:DefaultRelease time:2015-10-11Views:130

Hi, I am getting the following error : SQL> select MinDistance(TT) from egg1; select MinDistance(TT) from egg1 ERROR at line 1: ORA-06521: PL/SQL: Error mapping function ORA-06522: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/custagg.so: u[More]

ORA-06521:PL/SQL:Error mapping function :ORA-06522:undefined :ODCIAggregate

Category:DefaultRelease time:2015-10-11Views:130

Hi, I am getting the following error : SQL> select MinDistance(TT) from egg1; select MinDistance(TT) from egg1 ERROR at line 1: ORA-06521: PL/SQL: Error mapping function ORA-06522: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/custagg.so: u[More]

ORA-06521: PL/SQL: Error mapping function while writting into a text file

Category:DefaultRelease time:2015-10-11Views:130

Hi, I'm getting an errror ORA-06521: PL/SQL: Error mapping function while trying to write data into a text file. I'm using the following code: --To create a new directory create or replace directory temp as 'C:/temp'; declare                 l_str va[More]

Call to ldap server fails ORA-06521: PL/SQL: Error mapping function

Category:DefaultRelease time:2015-10-11Views:130

I am getting this error(s) ORA-06521: PL/SQL: Error mapping function ORA-06512: at "SYS.DBMS_LDAP_API_FFI", line 0 ORA-06512: at "SYS.DBMS_LDAP", line 1338 ORA-06512: at "SYS.DBMS_LDAP", line 1273 ORA-06512: at "SYS.DBMS[More]

Ldap problem, ORA-06521: PL/SQL: Error mapping function

Category:DefaultRelease time:2015-10-11Views:130

I am getting this error(s) ORA-06521: PL/SQL: Error mapping function ORA-06512: at "SYS.DBMS_LDAP_API_FFI", line 0 ORA-06512: at "SYS.DBMS_LDAP", line 1338 ORA-06512: at "SYS.DBMS_LDAP", line 1273 ORA-06512: at "SYS.DBMS[More]

Hot
How do i make a text input element have a variable ?.....I don't mean instance name ....i mean variable!I'd say you just don't do it that way, but to give more advice I'd need more info on what and why ... There should be a lot of solutions to your p [More]
So my new iPhone 5s wasn't functioning and I needed to get a replacement. I forgot that I hadn't synced the phone to my computer since my old 4S, as  I had collected much more music since then. Whenever I try to sync it, it says it is going through t [More]
I am using CR2008 against an Oracle 11 db and have a report with dynamic parameters. One of the report sources is a custom view that selects all of the possible 'pay ending dates' where one of the fields from this view is used as the source for the d [More]
Hello experts we have 2 clients in PRD 100,200 In 100 if i execute the tcode FAGLL03 it is showing the line items within 100 sec. where as in 200 if i execute FAGLL03 it is showing runtime error. if this executed in background it takes 1300 sec and f [More]
Hi I am trying to learn JHeadstart. I have a small country table and I am creating maintenance screens for the same. I used JHeadstart to generate the default pages for me, but when I try deleting a row/record, I get JBO-27101 error. How do I resolve [More]
I just got my ipod nano today. I downloaded the iTunes 7 off the internet and it works fine. But every time i click the sync button the message "Songs on the ipod cannot be updated because all of the playlists selected for syncing no longer exist&quo [More]
My Kt6 Delta LSR no longer boots. The fans are whirring, the D-Bracket leds are frozen on 4 red lights indicating CPU damaged or installed improperly. I built the box and, after a few initial problems it ran fine for several days. Then one morning I [More]
I work for a private art school with a strong Graphic Arts program. WE recently purchased a Multi-function Finisher for our HP Color LaserJet 9500 hdn which has duplexing capabilities. Weve run into a road block trying to output booklets from InDesig [More]
I'm seeing some odd behaviour here. I'm not sure if this is a bug or a feature Create a new document. Select the Ellipse tool (or any closed shape) Set the options bar to: 'shape' and set a solid colour fill and different coloured stroke. Drag out th [More]
The bottom rubber case of my macbook 13" late 2009 has expanded and has detached from the main body..As i'm not presently under warranty i wanted to know will the repair be free of charge for me. I had once got it replaced for free but in warranty. A [More]