Error in Function - Function is invalid
Hi
I created a function
CREATE OR REPLACE FUNCTION REGSUB(Value1 in varchar2, Value2 in varchar2)
RETURN varchar
IS
var_Value1 varchar2 := NVL(Value1,'0');
var_Value2 varchar2 := NVL(Value2,'0');
var_Result varchar2(20) := '0';
BEGIN
var_Result := regexp_replace(REGEXP_SUBSTR (var_Value1, '<Initiative>[^<]+', 1, var_Value2),'<Initiative>') ;
RETURN var_Result;
END REGSUBSTR;
but when i try to complie it i get REGSUB is invalid.
Where am i going wrong?
Sorry That was by mistake
CREATE OR REPLACE FUNCTION REGSUBSTR(Value1 in varchar2, Value2 in varchar2)
RETURN varchar
IS
var_Value1 varchar2 := NVL(Value1,'0');
var_Value2 varchar2 := NVL(Value2,'0');
var_Result varchar2(20) := '0';
BEGIN
var_Result := regexp_replace(REGEXP_SUBSTR (var_Value1, '<Initiative>[^<]+', 1, var_Value2),'<Initiative>') ;
RETURN var_Result;
END REGSUBSTR;
I donot get any other error apart from REGSUBSTR is invalid.
How can i look for the exact error?
I am using PL/SQL Developer.
Similar Messages
-
"There was an error processing a page. Invalid Function resource."
I've got a PDF file that I'm trying to split up its pages. The resulting page gives the error: "There was an error processing a page. Invalid Function resource." I've looked at each object, and other than the object #'s are different all the necessary objects exist. I'm not sure what I'm missing or what I've got wrong. I'll attach the original file and the resulting file that I create.
Any help would be appreciated.
FubecaIt won't let me post my files...so I've put them here:
http://xmission.com/~handleys/temp/1.pdf
http://xmission.com/~handleys/temp/Original.pdf
Thanks. -
Error: Fatal error in function BldAlter on call to function GetOldRecDefn.
At step "Generating the Updated PeopleTools Script" to generate "PPLTLS84CURTables.sql", more than 2270 errors occured:
Example Error 1:
System Error : File: E:\pt85403d-retail\peopletools\src\psbld\bldalter.cppSQL error. Stmt #: 4550 Error Position: 0 Return: 601 - [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'SYSCOLUMNS'.
Failed SQL stmt: select c.name,c.colid,t.name,c.length,c.prec,c.scale,c.isnullable from SYSCOLUMNS c, SYSOBJECTS o, SYSTYPES t where c.id = o.id and c.usertype = t.usertype and o.type = 'U' and o.name = :1 order by c.colid
After changing table/view names from upper case to lower case. the query works.
Example Error 2:
Error: Fatal error in function BldAlter on call to function GetOldRecDefn. Return code = 1. (76,6)
Error: MENU_LANG_TMP - SQL Error. Error Position: 0 Return: 601 - [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'SYSOBJECTS'.
SELECT NAME FROM SYSOBJECTS WHERE TYPE = 'TR' AND NAME = :1
Error: PSMSFTMPCOM - SQL Error. Error Position: 0 Return: 601 - [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'SYSOBJECTS'.
SQL Build process ended on 11/7/2014 at 10:39:42 AM.
2698 records processed, 2274 errors, 0 warnings.
SQL Build script for all processes written to file E:/temp/CAOutput/softwareupdatePeopleTools_Only_Upgrade{HR90UPG}/PPLTLS84CURTables.sql.
SQL Build log file written to E:/temp/CAOutput/softwareupdatePeopleTools_Only_Upgrade{HR90UPG}/BuildPPLTLS84CURTables.log.
Thanks for any suggestions!
DongmeiPassed the above error by changing object owner from ACCESSID to dbo. Now on the same task "Generating the Updated PeopleTools Scripts", there are 516 errors, sample error messages:
Error: PS_APP_DES_OBJ_CST - Alter failed due to an unknown column type (NVARCHAR) found for field PSOWNER. (76,22)
Error: Fatal error in function BldAlter on call to function GetOldRecDefn. Return code = 1. (76,6)
Error: PS_APP_DES_OBJ_LNG - Alter failed due to an unknown column type (NVARCHAR) found for field PSOWNER. (76,22)
Error: Fatal error in function BldAlter on call to function GetOldRecDefn. Return code = 1. (76,6)
Error: PS_APP_DES_OBJECTS - Alter failed due to an unknown column type (NVARCHAR) found for field PSOWNER. (76,22)
Error: Fatal error in function BldAlter on call to function GetOldRecDefn. Return code = 1. (76,6)
Warning: MCF_IM_DEMO_REC.MCF_IMUSERID - Default record.field MCF_IM_DEMO_REC.USER_OPRID has no rows, field type default used. (76,66)
Error: PS_PRCSDEFN - Alter failed due to an unknown column type (NVARCHAR) found for field PRCSTYPE. (76,22)
Appreciate any help!!
Dongmei -
Procedure or function in Invalid state
I got the following error
Oracle/PLSQL: ORA-06575 Error : function CURRENCYBASE is in an invalid state
i have recompile the function again
SQL> ALTER FUNCTION CURRENCYBASE COMPILE;
Warning: Function altered with compilation errors.
Errors for FUNCTION CURRENCYBASE:
LINE/COL ERROR
0/0 PL/SQL: Compilation unit analysis terminated
5/2 PLS-00311: the declaration of
"org.compiere.sqlj.Currency.base(java.math.BigDecimal,int,java.sq
l.Timestamp,int,int) return java.math.BigDecimal" is incomplete
or malformed
How can i rectify this?
Harinder KaurHi1
I have got the same error
1 CREATE OR REPLACE FUNCTION currencyRound (Amt NUMBER, C_CurrencyTo_ID NUMBE
R, IsCosting VARCHAR2)
2 RETURN NUMBER
3 AS LANGUAGE JAVA
4* NAME 'org.compiere.sqlj.Currency.round(java.math.BigDecimal,int,java.lan
g.String) return java.math.BigDecimal';
SQL> /
Warning: Function created with compilation errors.
SQL> show error
Errors for FUNCTION CURRENCYROUND:
LINE/COL ERROR
0/0 PL/SQL: Compilation unit analysis terminated
4/2 PLS-00311: the declaration of
"org.compiere.sqlj.Currency.round(java.math.BigDecimal,int,java.l
ang.String) return java.math.BigDecimal" is incomplete or
malformed -
Error in function PTCard.Store (): -2147467259
hello,
<p>
I am trying to add a card to the knowledge directory using API. I call <strong>IPTCard.Store()</strong> method to store the card. below is my code.
public void createCard(int folderParent, String cardName){
IPTCatalog catalog = session.GetCatalog();
IPTCard card = catalog.CreateCard();
card.SetName(cardName);
int[] parentIds = {folderParent};
card.SetCardSettings(PT_CARD_SETTINGS.PT_CARD_PARENTFOLDERIDS, parentIds);
card.SetDescription("test description.");
card.Store();
But when i call "IPTCard.Store()" method, it returns the following error;
</p>
<strong> com.plumtree.openfoundation.util.XPException: Error in function PTCard.Store (): -2147467259 - Failed to store card: storing cards in DB failed
</strong>does anybody have an idea, why this error appears ??
thank you for ur openion in adv.
<p>
</p>I can't tell from the error, but I suspect you will need to associate the card with a data source (content upload or similar) before it can be stored in the database (PTCard.Store).
Since I don't remember exactly how I did this at one point, I have provided some code below that I hacked from the API and changed around. It sets some extra stuff related to the file upload data source, but you can probably use some of it to piece together data source info. Here are some relevant lines that you'll probably need to fudge with:
IPTDataSource ptDS = (IPTDataSource)
session.GetDataSources().Open(nDataSourceID, false);
string strCardPropBagXML = pbagCardProp.SaveToXML(0);
ptDS.ImportDocument(strCardPropBagXML, nDocTypeID, ptCard, true, null);
And here's the rest of the code it was ripped from...
// Functions in this region were somewhat ripped from the UI source (KD submission space)
// they have been slightly cleaned and commented for clarity (actual card submission happens here)
public static IPTCard SubmitCard(int dataSourceId, int parentFolderId, string name, string description, string path, string type, string docId, string duServer, string duId, SortedList propertyList, IPTSession session, AActivitySpace space) {
IXPPropertyBag pbag = CreateCardSubmitUploadPropertyBag(path, type, docId);
return SubmitCardWithPropertyBag(parentFolderId, dataSourceId, name, description, duServer, duId, false, propertyList, pbag, session, space);
public static IPTCard SubmitCardWithPropertyBag(int parentFolderId, int nDataSourceID, string strCardName, string strCardDescription, string duServer, string duId, bool approved, SortedList propertyList, IXPPropertyBag pbagCardProp, IPTSession session, AActivitySpace space) {
// Set Parent Folder
int[] arFolderIDs = new int[] {parentFolderId};
// set language to be that of the default locale
// Retrieve the SearchLocaleVarPack to verify the language
IApplication application = ApplicationManager.GetInstance()
.GetApplication(AppConstants.MAIN_APPLICATION_NAME.ToString());
PTSearchLocaleVarPack vpPTSearchLocales = (PTSearchLocaleVarPack) application.GetVarPackManager()
.GetVariablePackage(PTSearchLocaleVarPack.VARPACK_ID);
// Retrieve the user's default language:
string strCardLanguageCode = (string) PTPersonalSettingsHelper.GetPersonalSettingValue(PersonalSettingNames.LANGUAGE,
space);
// default to english if invalid language
if (false == vpPTSearchLocales.IsValidLanguage(strCardLanguageCode)) {
strCardLanguageCode = DirModel.ENGLISH_LOCALE_CODE;
return SubmitCardWithPropertyBag(arFolderIDs, strCardLanguageCode, 0,
nDataSourceID, pbagCardProp, strCardName, strCardDescription, duServer, duId, approved, propertyList, session, space);
public static IPTCard SubmitCardWithPropertyBag(int[] arFolderIDs,
string strLanguage, int nDocTypeID, int nDataSourceID,
IXPPropertyBag pbagCardProp, string strCardName,
string strCardDescription, string duId, string duServer, bool approved,
SortedList propertyList, IPTSession session, AActivitySpace space) {
// create the card
IPTCard ptCard = session.GetCatalog().CreateCard();
ptCard.SetContentLanguage(strLanguage);
// Parent IDs can be a single value or an array of values
ptCard.SetCardSettings(PT_CARD_SETTINGS.PT_CARD_PARENTFOLDERIDS,
arFolderIDs);
// if the index server isn't up, don't try to index, create the card
// and inform the user later
IXPPropertyBag statusBag = session.GetCatalog().GetSearchServerStatus();
SearchServerStatusInfo statusInfo = new SearchServerStatusInfo(statusBag, "INDEXSTATUS");
if (XPStringUtility.EqualsIgnoreCase(statusInfo.connectStatus,"OK")) {
ptCard.SetCardSettings(PT_CARD_SETTINGS.PT_CARD_INDEXONSTORE, 1);
} else {
ptCard.SetCardSettings(PT_CARD_SETTINGS.PT_CARD_INDEXONSTORE, 0);
// if the card is approved, we set this flag
if (approved) {
ptCard.SetCardSettings(PT_CARD_SETTINGS.PT_CARD_INSERTAPPROVED, 1);
/* inherit parent folder ACLs */
ptCard.SetCardSettings(PT_CARD_SETTINGS.PT_CARD_INHERITPARENTFOLDERPERMISSIONS, 1);
// Set the crawler tag to be "Manual"
ptCard.SetCrawlerTag(space.GetString(1635, "ptmsgs_portalbrowsingmsgs"));
if ((null != strCardName) && (strCardName.Length > 0)) {
ptCard.SetCardSettings(PT_CARD_SETTINGS.PT_CARD_OVERWRITENAME, 0);
ptCard.SetName(strCardName);
if ((null != strCardDescription) && (strCardDescription.Length > 0)) {
ptCard.SetCardSettings(PT_CARD_SETTINGS.PT_CARD_OVERWRITEDESCRIPTION, 0);
ptCard.SetDescription(strCardDescription);
ptCard.SetDocumentLocation(pbagCardProp);
ptCard.SetDataSourceID(nDataSourceID);
// Get the DocumentTypeMap
if (0 == nDocTypeID) {
// Determine Default
IPTDocumentTypeMap ptMap;
ptMap = (IPTDocumentTypeMap) session.OpenGlobalObject(PT_GLOBALOBJECTS.PT_GLOBAL_DOCUMENTTYPEMAP,
false);
ptMap.Initialize(session);
nDocTypeID = ptMap.LookupByPropBag(pbagCardProp);
// If no default DocType was found,
// determine what default DocType should be used based on the server config setting
if (0 == nDocTypeID) {
IApplication application = ApplicationManager.GetInstance()
.GetApplication(AppConstants.MAIN_APPLICATION_NAME.ToString());
PTDirPrefsVarPack vpPTDirPrefs = (PTDirPrefsVarPack) application.GetVarPackManager()
.GetVariablePackage(PTDirPrefsVarPack.VARPACK_ID);
nDocTypeID = vpPTDirPrefs.GetDefaultDocType();
IPTDataSource ptDS = (IPTDataSource) session.GetDataSources().Open(nDataSourceID, false);
string strCardPropBagXML = pbagCardProp.SaveToXML(0);
ptDS.ImportDocument(strCardPropBagXML, nDocTypeID, ptCard, true, null);
// set file upload properties
/* get the card and it's property values */
IPTCardPropertyValues ptPropValues = ptCard.GetPropertyValues();
/* Document Upload ID */
IPTCardPropertyValue ptValue = ptPropValues.Add(PT_INTRINSICS.PT_PROPERTY_UPLOAD_DUID);
ptValue.SetOverrideValue(duId); /* make this an override value so it is not lost on a re-index */
/* Document Upload Server */
ptValue = ptPropValues.Add(PT_INTRINSICS.PT_PROPERTY_UPLOAD_DUSERVER);
ptValue.SetOverrideValue(duServer); /* make this an override value so it is not lost on a re-index */
/* Custom Property Settings */
if (propertyList.Count > 0) {
foreach (DictionaryEntry de in propertyList) {
try {
int propId = (int) de.Key;
ptValue = ptPropValues.GetItem(propId);
if (null == ptValue) { ptValue = ptPropValues.Add(propId); }
ptValue.SetOverrideValue(de.Value);
} catch (Exception) {
// ignore exceptions, maybe the wrong property or card
//store the card
ptCard.Store();
ptCard.UnlockObject();
// approve or unapprove the card
/* 2 for approve, 1 for unapprove */
//session.GetCatalog().SetApprovalStateByCard(ptCard.GetObjectID(), (approved ? 2 : 1), arFolderIDs );
return ptCard;
public static IXPPropertyBag CreateCardSubmitUploadPropertyBag(string path, string type, string _docID) {
IXPPropertyBag pbagCardProp;
pbagCardProp = PortalObjectsFactory.CreatePropertyBag();
pbagCardProp.Write("PTC_PBAGFORMAT", 2000);
pbagCardProp.Write("PTC_DTM_SECT", XPConvert.ToInteger(_type));
pbagCardProp.Write("PTC_UNIQUE", _path);
pbagCardProp.Write("PTC_DOC_ID", _docID);
return pbagCardProp;
} -
How to display "Non-Fatal Run-Time Error In Function Panel" dialog?
I'm learning how to develop an IVI-C specific driver using LabWindows/CVI. When I run my function from its function panel and it returns an error, I would like to display a dialog with both the error code and error message (as opposed to simply returning an error code on the function panel). This would save the user from having to call Prefix_error_message() to translate the error code to its error message. NI-DCPower driver is a good example of this behavior (see attached error dialog). How do I show the "Non-Fatal Run-Time Error In Function Panel" dialog? Any help is greatly appreciated. Thanks!
Attachments:
ErrorDialog.png 8 KBHi Shawn,
Thank you for replying to my post. The checkErr is just an error handling macro defined in ivi.h to goto Error: tag when the function returns a non-zero value. I have been using the checkErr macro (as well as viCheckErr and other macros) in my driver.
Using the same hp34401a specific driver as an example, please allow me to explain my question in more details:
Let's take the hp34401a_close function as an example. It is a simple function with only a few lines of code:
When the hp34401a_close function is run from its front panel using an invalid session handle (e.g. "8" in this screen capture):
You will get three "Non-Fatal Run-Time Error" popup dialogs, one from each of the IVI library functions that it calls: Ivi_LockSession, Ivi_UnlockSession, and Ivi_Dispose. However, there is no "Non-Fatal Run-Time Error" popup dialog from the hp34401a_close itself.
My IVI-C specific driver is behaving identical to the hp34401a specific driver.
In comparison, if run niDCPower_close function from its front panel using an invalid session handle (using the same "8" in this screen capture):
You will only get one "Non-Fatal Run-Time Error In Function Panel" from the niDCPower_close function itself:
I think the behavior of niDCPower driver is much better than the hp34401a driver. It replaces the three "Non-Fatal Run-Time Error" popup dialogs from the IVI library with a single "Non-Fatal Run-Time Error In Function Panel" popup dialog from the driver function itself. I would like to do the same thing with my driver but have not figured out how to display a "Non-Fatal Run-Time Error In Function Panel" dialog. Thanks in advance for your help! -
Utility library error string function?
I've been working on an Error Handler library, culled mostly from these wonderful fora (Roberto!). I can't seem to find an error code string generator for the functions in the Utiltiy Library though (in particular, functions like RenameFile, CopyFile, GetDir, SetDir, MakeDir, all the file i/o functions).
Most of those make mention to negative error types with some plain text explanations. But there's no mention of a nice code-to-string converter function, as there is in other libraries. For instance, for the RS232 library, there is GetRS232ErrorString. For the Formatting & I/O library, there is GetFmtIOErrorString.
Am I not seeing it somewhere? Inside the Utility library, there is a multithreading error code function called CmtGetErrorMessage.
Solved!
Go to Solution.You're right: the Urility Library does not incorporate a function that translates error codes to a meaningful text. I suppose this is due to the fact that error codes partly overlap, so a unique function could not be used.
Just as an example, error -1 means File not found in almost all file I/O library functions, but it translates to No files found matching the search criteria in GetFirstFile () , to No more files in GetNextFiles () and Invalid Parameters in MakePathname ().
Another example: error -2 means GetFirstFile must be called before if returned by GetNextFile (), and Resulting pathname too long if returned by MakePathname ().
And this considering only File I/O section of the library!
While developing my own toolbox of utilities, I have created the following function, which I know is far from perfect and covers only file I/O functions:
char * CVIFUNC GetULibFileIOErrMsg (int error)
// Messages associated to error codes returned by functions in File Utilities class in Utility Library
switch (error) {
case 0: return "Success";
case -1: return "One of the path component not found";
case -2: return "Resulting pathname longer than 260 chars";
case -3: return "General I/O error occurred";
case -4: return "Insufficient memory to complete operation";
case -5: return "Invalid path";
case -6: return "Access denied";
case -7: return "Specified path is a directory, not a file";
case -8: return "Disk is full";
case -9: return "New file already exists";
default: return "Unknown error";
return NULL;
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Why APEX 4.1 Error handling function does not trap the error of missing table?
Say, I create simple application with single IR report page and I also assign standard simple error handling function.
Function works perfectly, except but this case:
If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
and error handling function is not invoked at all.
Is this a feature or a bug?Hi,
Check the corrections given in the note 990764:
Reason and Prerequisites
Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
ORA-00942: table or view does not exist
Fehler in CL_SQL_RESULT_SET Include NEXT_PACKAGE
RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
Solution
SAP NetWeaver 2004s BI
Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
In urgent cases you can implement the correction instructions.
The correction instructions contain the tightened inspection for characteristics.
Regards,
Anil Kumar Sharma .P -
ORA-06521: PL/SQL: Error mapping function
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',cascade=>TRUE);
BEGIN DBMS_STATS.gather_table_stats( ownname=>'DBO',tabname=>'CD_JOURNAL_CHANGE_REG',method_opt=>'FOR ALL INDEXED COLUMNS',cascade=>TRUE); END;
ERROR at line 1:
ORA-06521: PL/SQL: Error mapping function
ORA-06512: at "SYS.DBMS_STATS", line 10301
ORA-06512: at "SYS.DBMS_STATS", line 10315
ORA-06512: at line 1
I have runt utlrp.sql as sys but with no avail.
Kindest Regards,
WillYou did not mention if the applicable table contains an ADT columns, nested tables and so on.
You can also do a basic test to determine if the problem is potentially with the table, or with dbms_stats itself. Create a plain table, e.g.
create table foo( id number, foo_char varchar2(100), constraint pk_foo primary key( id ) using index );
Using the exact same dbms_stats parameters, do this table. If it works, it points to a potential problem with the other table - some data structure/data type issue maybe. If it does not, then you have a problem with dbms_stats itself.
You can also drop the indexes on the DBO table and try dbms_stats with different parameters. I.e. change the conditions to see if the error still occur in order to isolate the problem.
You also could log an iTar/SR for this with Oracle Support. -
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 executable. Another external procedure that does not connect to the 10.1.0 database runs fine. What could be causing this error in Server 10.1.0 on VMS?
Thanks,
DaveHere is the code to create the function:
CREATE OR REPLACE FUNCTION f1
(h_file_name IN VARCHAR2)
RETURN BINARY_INTEGER
IS EXTERNAL
LIBRARY l1
NAME "f1"
LANGUAGE C
WITH CONTEXT
PARAMETERS
(CONTEST,
h_file_name string);
Here is the beginning of the Pro*C:
int f1(epctx, h_file_name)
OCIExtProcContext *epctx;
char h_file_name[70];
char h_line_txt [251];
int lineno;
FILE *fptr;
/* register the connection context ... */
EXEC SQL REGISTER CONNECT USING :epctx;
The function loads a flat file into the database. It is probably not related but are unable to SQLPLUS/ or SQLLDR/ into the database from an OS autheniticated account (get ORA-12547: TNS:lost contact.) Thanks for taking the time to look at this. There aren't many people trying this on VMS, I'd bet. -
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,
-NNYour issue may relate to XE and it may relate to OCI but it does not relate to SQL and PL/SQL. Consider posting your question in a forum where it will be on topic.
When you do include full version information (3 decimal places) and the code that is generating the exception. -
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,
-NNIt'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")
) -
ORA-06521: PL/SQL: Error mapping function while writting into a text file
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 varchar2(1000);
output_file utl_file.file_type;
cursor test_write_cur is
select EMPNO,ENAME,JOB,SAL,HIREDATE
from EMP
where DEPTNO=30;
begin
output_file := utl_file.fopen('TEMP','TESTFILE.txt','w');
for test_write_rec IN test_write_cur
loop
l_str := test_write_rec.EMPNO||'^'||test_write_rec.ENAME||'^'||test_write_rec.JOB||'^'||
test_write_rec.HIREDATE||'^'||test_write_rec.SAL||chr(10);
utl_file.put_line(output_file,l_str);
end loop;
utl_file.fclose(output_file);
end;Please suggest me if i'm wrong.
Thanks & Regards,
Sanket MishraDear Sanket,
I think you are need use TO_CHAR() function
to_char(test_write_rec.EMPNO) ,
to_char(test_write_rec.HIREDATE,'DD.MM.YYYY')
to_char(test_write_rec.SAL) -
Call to ldap server fails ORA-06521: PL/SQL: Error mapping function
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_LDAP", line 529
ORA-06512: at line 127
after binding and searching an ldap directory.
Line 127 is:
my_dn := DBMS_LDAP.get_dn(my_session, my_entry);
Both of the 'my_xx' parameters have been successfully set earlier in the script I believe as they produce no errors and DBMS_LDAP.count_entries(my_session, my_message) returns = 1.
I am following the example at:
http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96577/smplcode.htm#636994
In fact any of the functions used in the 'while loop' in the above example give a similar error.
Apparently SYS.DBMS_LDAP_API_FFI is a call to an external C program, but this would be a standard Oracle one, not one I have written.
I am connecting to a non-Oracle ldap server, and have tried several (OpenLDAP 2.X, & Windows 2000 AD), with same results.
Any suggestions gratefully received.
Cheers
KIMFixed by running the catldap.sql script (ORACLE_HOME/rdbms/admin/catldap.sql) as SYS user and recreated the dbms_ldap packages. I am not sure why some of the functions worked OK and others did not.
KIM -
Ldap problem, ORA-06521: PL/SQL: Error mapping function
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_LDAP", line 529
ORA-06512: at line 127
after binding and searching an ldap directory.
Line 127 is:
my_dn := DBMS_LDAP.get_dn(my_session, my_entry);
Both of the 'my_xx' parameters have been successfully set earlier in the script I believe as they produce no errors and DBMS_LDAP.count_entries(my_session, my_message) returns = 1.
I am following the example at:
http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96577/smplcode.htm#636994
In fact any of the functions used in the 'while loop' in the above example give a similar error.
Apparently SYS.DBMS_LDAP_API_FFI is a call to an external C program, but this would be a standard Oracle one, not one I have written.
I am connecting to a non-Oracle ldap server, and have tried several (OpenLDAP 2.X, & Windows 2000 AD), with same results.
Any suggestions gratefully received.
Cheers
KIMScott,
Thanks for your concern. I should have explained. I am working in HTMLdb, successfully using ldap to authenticate, but now need to get the logged-in user's name and other details. All my attemps to use the wwv_flow_ldap functions have failed, and I am no resorting to DBMS_LDAP to get what I want. I am hoping thatsome helpful person can shed some light on this problem
Cheers
KIM
Maybe you are looking for
-
Flash player not working after recent software update
I have a MAC OSX 10.5.8, after the recent software update my flash player no longer works. I have read that there is a problem with security for the version of flash that I was using and this is the reason it was disabled. However, I have tried to do
-
Transactional Replication: Alter view changes are not reflect on Subscription database
Hi All, we are configured transactional replication in our environment on sql server 2008 R2 , Yesterday I made a view alter on publisher database the view also present in replicated articles but unfortunately the changes not reflect in subscription,
-
Dataguard Problem(logical standby database)
Hi, I have successfully created logical standby database, and everything is working fine, all of the SQL is applying and archiving is also shipping. Until I create a new tablespace for e.g. pay in the primary database, and suddenly SQL applying is st
-
Portal Eventing in WebDynpro Java Pros and Cons
Does anyone have a link to an article that discusses th epros and cons of using portal eventing between dynpro development components between iViews rather than using one larger web dynpro application. I am clear that reuse can be an issue if you do
-
Hi All, I have a pdf which is pretty much a guide. I created InDesign file with layers and exported as pdf. I'm trying to do the following: When i hit one of the navigation links, a layer associated with that link shows up. In layer that showed up, i