NiCreateHandle: no free handle

Hi all,
We have an issue at the moment where we user wireless HHT's  connecting to an intermediate server running a third party software which has configuration to use logon load balancing into our ECC 6.0 system
The issue in question is  they are having sporadic connection issues. In the dev_rfc.trc file on the 3rd party software server we are getting the below errors.....
I am struggling to tie down the "no free handle issue"  Has anybody seen these type of errors or could explain the no free  handle in this scenario.....
Any infomation would be appreciated as to put me down the right track.
Many Thanks Mark....
ERROR file opened at 20090826 064352 GMT Daylight Ti, SAP-REL 640,0,183 RFC-VER 3 907262 MT-SL
T:4996 Error in program 'java': ======> Connect to message server failed
Connect_PM  MSHOST=xxxxxxxx, R3NAME=SID, GROUP=SKY_LB
ERROR       internal error
            (this retcode should be handled by caller of NI-layer)
TIME        Wed Aug 26 06:43:52 2009
RELEASE     640
COMPONENT   NI (network interface)
VERSION     37
RC          -8
MODULE      nixxi_r.cpp
LINE        4050
DETAIL      NiCreateHandle: no free handle
COUNTER     1

Hi thanks for your reply,
The network is fine as is all other connectivity. They are connecting fine 8 times out of 10 but it's the odd connection problem that is frustrating the users, there are about 70 users circling a sorter system so when the operation is in full flight time is an issue to them so any interruptions is a pain....
Have you come accross the error message before ?
Mark

Similar Messages

  • WARNING = NiICreateHandle: no more free handles (2048) [nixxi.cpp 369]

    Hello,
    From a couple of days we are having a lot of warnings in the file stderr4 (error trace). We have been looking for the cause through sap marketplace but we have not find any valid solution.
    The warnings are like this:
    WARNING => NiICreateHandle: no more free handles (2048) nixxi.cpp 369
    And appear every 2 minutes or less.
    Could anybody help us with this issue?
    Thanks in advance,
    Néstor.

    Hi all,
    SAP has responded to us and we have managed...
    the message "NiCreateHandle: no free handle" means that the RFC lib on
    the local machine is not able to open further RFC connection any more.
    Note #316877 describe this issue, it's a note for ITS, but the item 2
    applies for BC as well.
    See also note #314530.
    # 316877 - Maximum number of conversation exceeded
    # 314530 - Number of RFC/CPIC connections for external clients
    Thank you very much for your help and collaboration.
    Néstor.

  • Fatal Alert memorymgr.c, line:3751,free handle after hotsync

    I have just reloaded my palm software and now I keep getting fatal alert memorymgr.c, line:3751,free handle after I hotsync.  which is causing me to soft reset after hotsyncing.
    I deleted add-it and reloaded, did the same with documents to go and yet I'm still having the error - Any ideas????!!!
    Thanks....
    Post relates to: Tungsten E2

     - try to do a hard reset on the hh..
     - look for your BACKUP folder and rename it to lets say, BACKUP1...backup folder is located at C: <program files <palm < USERNAME <backup....
     - hotsync again..
    hope it will solve your problem...

  • MemoryMgr.c, Line:3651, Free handle

    I have a Tungsten T3.
    I added some photes to an SD drive and when I tried to launch the 'Photos' application that came with the PDA, I got a MemoryMgr.c, Line:3651, Free handle error. I took the drive out and still can't launch the application. Avaliable memory on the T3 is 91%. I can access other applicaitons/files that are on the drive.
    Is there a fix available for this problem? Do I have to reinstall the original operating system?
    Any help would be greatly appreciated.
    Post relates to: Tungsten T3
    This question was solved.
    View Solution.

    Your device may need to be hard reset to resolve your issue. Click on the following link for the hard reset procedure article on kb.palm.com.
    http://www.palm.com/cgi-bin/cso_kbURL.cgi?ID=887
    The hard reset will erase all data on the handheld.
    For reference purposes, click on the following link for the support page for your device on the kb.palm.com webpage.
    http://www.palm.com/us/support/tungstent3/
    There are links on the page to the user guide, troubleshooting, how to's, downloads, etc.
    Post relates to: Palm i705

  • Connect to message server failed

    If there is a huge traffic to the webapplication server, we are getting the follwoing error
    Connect to message server failed_ Connect_PM  MSHOST=..., R3NAME=..., GROUP=CRM_ _ LOCATION    CPIC (TCP/IP) on local host_ ERROR       internal error_             (this retcode should be handled by caller of NI-layer)_ _ TIME        Thu Jan 11 19:40:21 2007_ RELEASE     640_ COMPONENT   NI (network interface)_ VERSION     37_ RC          -8_ MODULE      nixxi_r.cpp_ LINE        3977_ DETAIL      NiCreateHandle: no free handle_ COUNTER     212_ ]]>
    <source>SAP.Connector</source>
    <stacktrace>   at SAP.Connector.Connection.Open()_ _    at SAP.Connector.Connection.BeforeCall(SAPClient sapclient)_ _    at SAP.Connector.SAPClient.BeforeCall()_ _    at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)_ _    at RFC call
    We have enabled connecion pooling.
    Any help would be appreciated.
    Thanks,
    Sandy

    Hi,
    pls check the IP address and better do not login in the LOOPBACKADAPTER
    make one more new lan connection and give the folowing IP adress
    192.168.100.10 or some 100.200
    this will help you
    Regards,
    srikanth

  • CS5 - When Capable for nanoFlash Sound with Premiere CS5

    Well Folks, here we go again.  I made the mistake of ordering and paying
    for and going through the grief of installing CS5 - I should have my head
    examined (as my Dad used to say to me frequently!), after 13 years of
    purchasing the latest Adobe updates.  But excuse me, to the subject:
    I have an EX1 with nanoFlash producing stunning pictures at 1920x1080 30p
    100 Mbps Long GOP MXF Files, and Premiere CS5 handles the video beautifully,
    but the audio right out of the box for me and all the other nano people is
    gutter garbage, with stereo, one audio channel lagging the other (which can
    only be laboriously fixed with each individual clip - argggghhh)!
    And Adobe, in its infinite marketing hype and wisdom has decided that users
    such as I are not important enough to fix this issue, even with the update!
    Does anyone at Adobe or out there anyplace have any notion as to when this
    will be FIXED?
    In the meantime, after a total rewrite of my hard drive OS and all the other
    apps for a clean install, I am back to CS4, using Premiere CS4 with the Main
    Concept plug in enabling the appropriate handling of my nano files.  But good
    greif!  The time it takes to get out of the timeline, and particularly so compared
    to the otherwise superb performance of Premeire CS5.
    Convergent Designs - the company which developed and makes the nanoFlash
    and related products announces that Adobe has two nanos in hand!
    I know, I know, I should have my head examined.  But if anyone out there has
    any comments avoiding that, I's appreciate the latest info or even gossip!!!!

    AndyUrtu:
    In response to your query above re output on my nano, with which I am having difficulty in PPCS5:
    Video: 1920x1080, pixel depth 32, frame rate 29.97, pixel aspect ratio 1.0,
    MPEG 2 - 4:2:2 - progressive - CBR 100,000 Mbit/sec - Long GOP N 15 M 3
    Audio: PCM AES-3 - 48,000 Hz 24 Bit - 2 Channel
    Soooo, I think that pretty well covers it!  Now for some commentary, and to me, the
    interesting query about trying other settings!  Frankly, I hadn't even thought of that.
    First, according to all the users I admire and respect, and according to the principals
    of CG (Convergent Designs), the 100 Mbits/sec settings seem best and ideal in
    terms of securing the best picture quality at the "lowest" data rate (if you can call
    that a "low" data rate!).  So I'm really not willing to change the video set up.  But
    I find the idea of doing something different with the audio interesting, and may
    try some different settings, since my (and others') issue is with the audio.
    From the outset, the principals at CG reported that there were problems with the
    audio in nano files with PPCS5, and they implied that Adobe would likely provide
    a fix.  So I went ahead and purchased the nano and the Production Pemium Suite CS5
    with the expectation that a solution would shortly be forthcoming.
    You and I are not alone in experiencing this problem, notwithstanding comments to the
    contrary!
    And I took Harm's (another one of my Heros!) to heart, and just posted my issue
    Adobe's Bug site.
    I may be mistaken, but I believe that CG has just produced the thousandth nano,
    and while this is miniscule compared to other devices providing files for Adobe,
    for those of us who own a nano, the issue is monumental - personally and professionally,
    the combo of the Ex1 and the nano produces such stunning fidelity for anything
    under 20 or 30 thousand, that I am not willing to settle for anything less.
    I hope that the Adobe person will supply some hard data here about the nano
    settings which provide error free handling of nano files!  It would be MUCH
    appreciated.
    Respectfully submitted,
    William Urschel
    Bee Cave Digital Video, Inc.
    Austin, Texas

  • Error message while synchroniz​ing Tungsten E2

    While attempting to synch, the following error message ocurrs:
    "Fatal alert while synchronizing data_5b"
    "Memorymgr C, Line:3751, free handle"
    I'm looking for a solution.
    Thanks
    Post relates to: Tungsten E2

    To fix this what we need to do is hard reset your device. The instructions to do that is here http://kb.palm.com/wps/portal/kb/common/article/88​7_en.html this tells you how to do all types of resets. Also, what we need to do is rename your backup folder. What this folder is, it hold all your programs from the last time you synced your PC. On your computer go here
    Palm Desktop 4.2 and below
    My Computer--> C drive --> Program files --> Palm/PalmOne--> your hotsync username
    Palm Desktop 6.2.2
    My Documents/Documents --> Palm OS Desktop --> your hotsync username
    Right click on your backup folder and rename it to "backupOld". Resync your device to the same user name and you will get all your contacts, calendar, tasks, and memos.
    You can install the programs again but make sure they are compatible with the device. Also try one program again and wait 24 hours to see if the same thing happens again. This way you know what program is causing the issue.

  • A question about piecewise insert(OCI), only data in the first piece ..

    When i do a piecewise insert operation, only data in the first piece was inserted into the column, There is no error occured. a OCI_SUCCESS returned when the last piece operation completed.
    I am really puzzled now:(.
    Who can get me out of this?
    The data to be insert are stored in many structs:
    typedef struct test_st{
         char * buffer;
         struct test_st * next;
    } TEST_ST;
    I use malloc(size) to allocate the buffer of each struct, and I use strcpy() to copy some strings to these buffers.
    table mc_test is like this:
    id number;
    message varchar(64);
    The full source_code goes there:
    #include <stdio.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <oci.h>
    static OCIEnv *p_env;
    static OCIError *p_err;
    static OCISvcCtx *p_svc;
    static OCIStmt *p_sql;
    static OCIDefine p_dfn    = (OCIDefine ) 0;
    static OCIBind p_bnd    = (OCIBind ) 0;
    const char * orausername="out_user";
    const char * orapassword="user_out";
    const char * oraserver="bigfish";
    int oraOK=0;
    int rc;
    char errbuf[100];
    int errcode;
    int checkerr(OCIError *errhp, sword status);
    int db_init(void);
    int db_open(void);
    int db_close(void);
    typedef struct test_st{
         char * buffer;
         struct test_st * next;
    } TEST_ST;
    int db_save_to_test(){
         char               sql_str[512];
         ub4                    typep;
         ub4                    piec_status;
         ub1                    in_outp;
         ub4                    rownum;
         ub4                    arr;
         sb2                    indp;
         ub2                    r_code;
         int                    t_buff_len;
         int                    total_len=15;
         int                    buffer_pos=0;
         TEST_ST * content, * t;
         content=(TEST_ST *) malloc(sizeof(TEST_ST));
         content->buffer= (char *) malloc(5);
         strcpy(content->buffer,"1234");
         content->next=(TEST_ST *) malloc(sizeof(TEST_ST));
         content->next->buffer= (char *) malloc(5);
         strcpy(content->next->buffer,"5678");
         content->next->next=(TEST_ST *) malloc(sizeof(TEST_ST));
         content->next->next->buffer= (char *) malloc(5);
         strcpy(content->next->next->buffer,"9012");
         content->next->next->next=NULL;
         if(!_ora_OK){
              return 0;
         printf("-------------------------\n");
         printf("[db]save to mc_test..\n");
         printf("total: %d bytes\n",total_len);
         /* create sql */
         sprintf(sql_str,"insert into mc_test(id,message)values(1,:x)");
         //printf("%s\n",sql_str);
         rc = OCIStmtPrepare(p_sql, p_err, sql_str,
              (ub4) strlen(sql_str), (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT);
         checkerr(p_err,rc);
         rc = OCIBindByPos(p_sql, &p_bnd, p_err, (ub4) 1,
                   (dvoid *) content->buffer, total_len, SQLT_CHR, (dvoid *) 0,
                   (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DATA_AT_EXEC);
         checkerr(p_err,rc);
         rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0,
              (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);
         checkerr(p_err,rc);
         if(rc == OCI_NEED_DATA){
              printf("[pw] start........\n");
              // insert next pieces
              t=content;
              printf("%d bytes total.\n",total_len);
              while(t!=NULL){
                   if(t==content){
                        piec_status=OCI_FIRST_PIECE;
                        t_buff_len=strlen(t->buffer);
                        buffer_pos=t_buff_len+1;
                        printf("ready for first piece: %d bytes\n",t_buff_len+1);
                        printf("__________________\n%s\n__________________\n",t->buffer);
                   }else if(t->next==NULL){
                        piec_status=OCI_LAST_PIECE;
                        t_buff_len=strlen(t->buffer);
                        buffer_pos+=t_buff_len+1;
                        printf("ready for last piece: %d bytes\n",t_buff_len+1);
                        printf("__________________\n%s\n__________________\n",t->buffer);
                   }else{
                        piec_status=OCI_NEXT_PIECE;
                        t_buff_len=strlen(t->buffer);
                        buffer_pos+=t_buff_len+1;
                        printf("ready for next piece: %d bytes\n",t_buff_len+1);
                        printf("__________________\n%s\n__________________\n",t->buffer);
                   t_buff_len++;
                   rc = OCIStmtSetPieceInfo((dvoid *)p_bnd,
    (ub4)OCI_HTYPE_BIND, p_err, (dvoid *)t->buffer,
    & t_buff_len, piec_status, (dvoid *) 0, &r_code);
                   checkerr(p_err,rc);
                   rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0,
                        (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);
                   checkerr(p_err,rc);
                   t=t->next;
              if(rc==OCI_SUCCESS){
                   printf("All insert OK\n");
              printf("-------------------------\n");
              return 0;
         }else if(rc==OCI_SUCCESS){
              printf("Simple inserted.\n");
              printf("-------------------------\n");
              return 1;
         }else{
              checkerr(p_err,rc);
              printf("-------------------------\n");
              return 0;
    int main(){
         db_init();
         db_open();
         db_save_to_test();
         db_close();
    int db_close(){
         rc = OCILogoff(p_svc, p_err); /* Disconnect */
         rc = OCIHandleFree((dvoid *) p_sql, OCI_HTYPE_STMT); /* Free handles */
         rc = OCIHandleFree((dvoid *) p_svc, OCI_HTYPE_SVCCTX);
         rc = OCIHandleFree((dvoid *) p_err, OCI_HTYPE_ERROR);
         oraOK=0;
         return rc;
    int db_open(){
         /* Connect to database server */
         rc = OCILogon(p_env, p_err, &p_svc, orausername, strlen(_ora_username), orapassword, strlen(_ora_password), oraserver, strlen(_ora_server));
         if (rc != 0) {
         OCIErrorGet((dvoid *)p_err, (ub4) 1, (text *) NULL, &errcode, errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
         printf("Error - %.*s\n", 512, errbuf);
         return(8);
         /* Allocate SQL */
         rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_sql,
              OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0);
         checkerr(p_err,rc);
         oraOK=1;
         return rc;
    int db_init(){
         rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0, /* Initialize OCI */
              (dvoid * (*)(dvoid *, size_t)) 0,
              (dvoid * (*)(dvoid *, dvoid *, size_t))0,
              (void (*)(dvoid *, dvoid *)) 0 );
         /* Initialize evironment */
         rc = OCIEnvInit( (OCIEnv **) &p_env, OCI_DEFAULT, (size_t) 0, (dvoid **) 0 );
         /* Initialize handles */
         rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,
              (size_t) 0, (dvoid **) 0);
         rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_svc, OCI_HTYPE_SVCCTX,
              (size_t) 0, (dvoid **) 0);
         checkerr(p_err,rc);
         return rc;
    int checkerr(OCIError *errhp, sword status){
         text errbuf[512];
         sb4 errcode = 0;
         switch(status){
              case     OCI_SUCCESS:
                        return 0; break;
              case     OCI_SUCCESS_WITH_INFO:
                        (void) printf("Error - OCI_SUCCESS_WITH_INFO\n");
                        break;
              case     OCI_NEED_DATA:
                        (void) printf("Error - OCI_NEED_DATA\n");
                        break;
              case     OCI_NO_DATA:
                        (void) printf("Error - OCI_NODATA\n");
                        break;
              case     OCI_ERROR:
                        (void) OCIErrorGet((dvoid *)errhp, (ub4) 1, (text *) NULL, &errcode,
                                       errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
                        (void) printf("Error - %.*s\n", 512, errbuf);
                        break;
              case     OCI_INVALID_HANDLE:
                        (void) printf("Error - OCI_INVALID_HANDLE\n");
                        break;
              case     OCI_STILL_EXECUTING:
                        (void) printf("Error - OCI_STILL_EXECUTE\n");
                        break;
              case     OCI_CONTINUE:
                        (void) printf("Error - OCI_CONTINUE\n");
                        break;
              default:
                        break;
         return 1;
    ref: http://www.oracle.com.cn/onlinedoc/appdev.920/a96584/oci05bnd.htm#427755

    On Windows, the Flash player plugin DLL is under C:\Windows. When everything is working correctly, Firefox finds the Flash player by checking entries under a registry key. I don't know whether this check takes place every time Firefox restarts, or at other intervals.
    Other plugins may install differently, e.g., copying a DLL into a folder under c:\Program Files (x86). It's rare for a plugin to be profile-specific.
    If your plugin list is not updating, the pluginreg.dat file that stores plugin information might be corrupted. This article has a section on how to delete that file so Firefox will regenerate it: [https://support.mozilla.org/en-US/kb/troubleshoot-issues-with-plugins-fix-problems#w_re-initializing-the-plugins-database]. Does that help?

  • OCI - Sample program works on Windows but gives error in Solaris ??

    Hi,
    I am new to OCI. I was trying the following sample program:
    #include<iostream>
    #include<conio.h>
    #include<firstheader.h>
    //#include<stdafx.h>
    #include<string.h>
    using namespace std;
    class OCIClass
    public:
         OCIClass()
    int p_bvi;
    char p_sli[20];
    int rc;
    char errbuf[100];
    int errcode;
    const char *s;
    printf("Hello\n");
    string sql;
    string sql2="select substr(ename,1,3) from emp where job='ANALYST'";
    cout<<sql2;
    //char sql[512];
    int flag=0;
    sql += "SELECT * from emp where job='";
    if (flag==0)
    sql += "MANAGER";
    else
    sql += "ANALYST";
    sql += "'";
    cout<<sql + "\n";
    s=sql.c_str();
    char* cstr = new char[sql.size()+1];
    strcpy (cstr, sql.c_str());
    char* cstr2 = new char[sql2.size()+1];
    strcpy (cstr2, sql2.c_str());
    sql=" ";
    /* Initialize evironment */
    rc=OCIEnvCreate((OCIEnv **)&p_env,(ub4)OCI_DEFAULT ,(void *)0, (void * (*)(void *, size_t))0,
    (void * (*)(void *, void *, size_t))0,(void (*)(void *, void *))0,(size_t)0, (void **)0);
    /* Initialize handles */
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,
    (size_t) 0, (dvoid **) 0);
    printf("Error handle allocated\n");
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_svc, OCI_HTYPE_SVCCTX,
    (size_t) 0, (dvoid **) 0);
    printf("service handle allocated\n");
    printf("Value of RC before Logon\n %d", rc);
    /* Connect to database server */
    rc = OCILogon(p_env, p_err, &p_svc, (OraText *)"scott", 5,(OraText *) "welcome", 7,(OraText *) "", 0);
    printf("Value of RC after Logon\n %d", rc);
    if (rc != 0) {
    OCIErrorGet((dvoid *)p_err, (ub4) 1, (text *) NULL, &errcode, (OraText *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
    printf("Error - %s\n",errbuf);
         printf("error");
    //exit(8);
         getch();
    printf("Connect successful\n");
    /* Allocate and prepare SQL statement */
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_sql,
    OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0);
    rc = OCIStmtPrepare(p_sql, p_err, (OraText*) cstr,
    (ub4) 37, (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT);
    /* Bind the values for the bind variables
    p_bvi = 10; /* Use DEPTNO=10
    rc = OCIBindByName(p_sql, &p_bnd, p_err, (text *) ":x",
    -1, (dvoid *) &p_bvi, sizeof(int), SQLT_INT, (dvoid *) 0,
    (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);*/
    /* Define the select list items */
    rc = OCIDefineByPos(p_sql, &p_dfn, p_err, 1, (dvoid *) &p_sli,
    (sword) 20, SQLT_STR, (dvoid *) 0, (ub2 *)0,
    (ub2 *)0, OCI_DEFAULT);
    /* Execute the SQL statment */
    rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0,
    (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);
    while (rc != OCI_NO_DATA) {             /* Fetch the remaining data */
    printf("%s\n",p_sli);
    rc = OCIStmtFetch(p_sql, p_err, 1, 0, 0);
    printf("After fetch\n");
    rc = OCILogoff(p_svc, p_err); /* Disconnect */
    rc = OCIHandleFree((dvoid *) p_sql, OCI_HTYPE_STMT); /* Free handles */
    rc = OCIHandleFree((dvoid *) p_svc, OCI_HTYPE_SVCCTX);
    rc = OCIHandleFree((dvoid *) p_err, OCI_HTYPE_ERROR);
    void main()
    OCIClass c1;
    getch();
    The above program works on my Windows desktop. If I try this in Solaris, OCILogon fails and gives an error. If I check the value of rc, I find that it is -2. I can connect to the database using SQLPlus, but not through the program. Not sure how to debug this...
    Any pointers ?
    Thanks in advance,
    mrk

    Did you make the required port entry in the /etc/services file? You will need to add the gateway service port there. Then try to run your program.
    T00th

  • OCIObjectSetAttr() and UTF16 environnement

    Hi,
    I'm currently implementing Oracle Named Types support (SQL_NTY) in OCILIB library and i'm facing a weird problem !
    To manipulate objects attributes, i'm using OCIObjectSetAttr() and OCIObjectGetAttr().
    Everything's fine when the environnement handle is created in normal ANSI mode.
    But when it's created with OCI_UTF16 flags to setup an unicode environnement, troubles start !
    In an UTF16 env, calls to OCIObjectSetAttr() and OCIObjectGetAttr() do not return any error but any call to OCIObjectSetAttr() will smash up all other handles retreived before with OCIObjectGetAttr().
    By example, for an object that has 2 fields (let's say int and timestamp), if i retreive the timestamp handle and set the int value :
    * in ansi, no problem
    * in unicode, the timestamp handle is scrambled and any use of it with function that get an timstamp handle then crash !
    If the object is created without having his attributes modified, it's well inserted throught a SQL statement.
    THe problem seems to be OCIObjectSetAttr (). All handles retrieved before the OCIObjectSetAttr() are ok and when OCIObjectSetAttr() returns for other fields, theses handles are scrambled !
    I checked client 9, 10, 11 and i got the same : ok in ansi and handle smash up in unicode !
    Any ideas ? Posting some code is quit difficult because it's using internal library calls . But if anybody wants to review it, i'll send it straight away !
    I checks all strings involded in the specified portions of code but everyting looks regular...
    There hardly no resources on OCIObjectSetAttr() and i couldn't find anything about its use in an UT16 env.
    Thanks in advance for reading thoses lines...
    Vincent.

    Hi Jonah,
    I can't recompile a full OCILIB package on Linux now, but i made a test project with raw OCI code and it gives the same result : values are smashed up !
    (BTW : how do you highlight C syntax in posts ?)
    Here is the test code, First create the test type :
    SQL> create type type_test as object (v1 int, v2 date);
    Here the test raw OCI code :
    With GCC on linux, add -fshort-wchar to compile it !
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include "oci.h"
    #include "orid.h"
    #define OCI_TEST_UNICODE
    #ifdef OCI_TEST_UNICODE
    #include "wchar.h"
    #define ENV_MODE OCI_UTF16
    #define CHARSIZE sizeof(wchar_t)
    #define TS(x) L ## x
    #define tchar wchar_t
    #else
    #define ENV_MODE OCI_DEFAULT
    #define CHARSIZE sizeof(char)
    #define TS(x) x
    #define tchar char
    #endif
    int tslen(tchar *s)
    int n =0;
    while (*s++) n++;
    return n;
    #define tsize(x) (tslen(x) * sizeof(tchar))
    int main(int argc, char **argv)
    /* OCI handles */
    OCIEnv *p_env    = NULL;
    OCIError *p_err  = NULL;
    OCISvcCtx *p_svc = NULL;
    /* OCI types */
    OCIType *dto     = NULL ;
    OCINumber *p_num = NULL;
    void *obj        = NULL;
    /* misc*/
    OCIInd ind = 0;
    int value = 1;
    int rc = OCI_SUCCESS;
    /* OCI values placeholders */
    OCIDate *date;
    OCINumber num;
    /* attributes infos types */
    tchar* attr1_name[1] = {TS("V1")};
    ub4 attr1_len[1] = {2*CHARSIZE};
    tchar* attr2_name[1] = {TS("V2")};
    ub4 attr2_len[1] = {2*CHARSIZE};
    tchar *user = TS("winrest");
    tchar *pwd  = TS("fsi");
    tchar *db   = TS("maison");
    tchar *type = TS("TYPE_TEST");
    /* Initialize OCI */
    rc = OCIEnvCreate((OCIEnv **) &p_env,
    ENV_MODE | OCI_THREADED | OCI_OBJECT,
    NULL, NULL, NULL, NULL, 0, NULL);
    /* Initialize handles */
    rc = OCIHandleAlloc((dvoid *) p_env, (dvoid **) & p_err, OCI_HTYPE_ERROR,
    (size_t) 0, (dvoid **) 0);
    rc = OCIHandleAlloc((dvoid *) p_env, (dvoid **) & p_svc, OCI_HTYPE_SVCCTX,
    (size_t) 0, (dvoid **) 0);
    /* Connect to database server */
    rc = OCILogon(p_env, p_err, &p_svc,
    (const OraText *) user, tsize(user),
    (const OraText *) pwd, tsize(pwd),
    (const OraText *) db, tsize(db));
    if (rc)
    printf("connection error !");
    return 0;
    printf("connected...\n");
    /* get type info */
    rc = OCITypeByName(p_env, p_err, p_svc, (CONST text *) NULL, (ub4) 0,
    (CONST text *) type, tsize(type), (CONST text *) NULL, (ub4) 0,
    OCI_DURATION_SESSION, OCI_TYPEGET_ALL, &dto);
    /* create object */
    rc = OCIObjectNew(p_env, p_err, p_svc, SQLT_NTY, dto, NULL, OCI_DURATION_SESSION,
    TRUE, (dvoid **) &obj);
    /* get date value */
    rc = OCIObjectGetAttr(p_env, p_err, obj, NULL, dto,
    (CONST text**) attr2_name, attr2_len,
    1, NULL, 0, &ind, NULL, (void **) &date, NULL);
    /* set date value */
    OCIDateSysDate(p_err, date);
    /* print date value */
    printf("date before setting int val : %02i/%02i/%04i\n", date->OCIDateDD,
    date->OCIDateMM, date->OCIDateYYYY);
    /* set int value */
    rc = OCINumberFromInt(p_err, &value, sizeof(int), OCI_NUMBER_SIGNED, &num);
    ind = 0;
    rc = OCIObjectSetAttr(p_env, p_err, obj, NULL, dto,
    (CONST text**) attr1_name, attr1_len,
    1, NULL, 0, ind, NULL, &num);
    /* get it back for checking */
    value = 0;
    rc = OCIObjectGetAttr(p_env, p_err, obj, NULL, dto,
    (CONST text**) attr1_name, attr1_len,
    1, NULL, 0, &ind, NULL, (void **) &p_num, NULL);
    rc = OCINumberToInt(p_err, p_num, sizeof(int), OCI_NUMBER_SIGNED, &value);
    /* print int value */
    printf("int value : %i\n", value);
    /* print date value */
    printf("date after setting int val : %02i/%02i/%04i\n", date->OCIDateDD,
    date->OCIDateMM, date->OCIDateYYYY);
    /* free object */
    rc = OCIObjectFree(p_env, p_err, obj, 0);
    /* Disconnect */
    rc = OCILogoff(p_svc, p_err);
    /* Free handles */
    rc = OCIHandleFree((dvoid *) p_svc, OCI_HTYPE_SVCCTX);
    rc = OCIHandleFree((dvoid *) p_err, OCI_HTYPE_ERROR);
    rc = OCIHandleFree((dvoid *) p_env, OCI_HTYPE_ENV);
    return 1;
    if OCI_TEST_UNICODE is not defined, i get that (working) :
    date before setting int val : 03/02/2008
    int value : 1
    date after setting int val : 03/02/2008
    And if it's defined (smashed values):
    date before setting int val : 03/02/2008
    int value : 1
    date after setting int val : 204/02/-16126
    Message was edited by:
    Vicenzo : modified declaration of CHARSIZE
    Message was edited by:
    Vicenzo : Fixed code to compile on Linux

  • OID function in DB

    Hi Experts,
    i have query in DB, we are using 11g database;
    i have install oracle 11g in my Aix server,I had excuted DBMS_LDAP package also in my user.
    I try to create below function but it's thorws error.
    CREATE OR REPLACE FUNCTION GETGROUP(Username IN VARCHAR2,ldaphost VARCHAR2,ldapport number,ldapuser VARCHAR2,ldap_pwd VARCHAR2) RETURN ARRAY PIPELINED AS
    2 ldap_host VARCHAR2(256);
    3 ldap_port PLS_INTEGER;
    4 ldap_user VARCHAR2(256);
    5 ldap_passwd VARCHAR2(256);
    6 ldap_base VARCHAR2(256);
    7 retval PLS_INTEGER;
    8 my_session DBMS_LDAP.session;
    9 subscriber_handle DBMS_LDAP_UTL.HANDLE;
    10 sub_type PLS_INTEGER;
    11 subscriber_id VARCHAR2(2000);
    12 my_pset_coll DBMS_LDAP_UTL.PROPERTY_SET_COLLECTION;
    13 my_property_names DBMS_LDAP.STRING_COLLECTION;
    14 my_property_values DBMS_LDAP.STRING_COLLECTION;
    15 group_handle DBMS_LDAP_UTL.HANDLE;
    16 group_id VARCHAR2(2000);
    17 group_type PLS_INTEGER;
    18 user_handle DBMS_LDAP_UTL.HANDLE;
    19 user_id VARCHAR2(2000);
    20 user_type PLS_INTEGER;
    21 my_mod_pset DBMS_LDAP_UTL.MOD_PROPERTY_SET;
    22 my_attrs DBMS_LDAP.STRING_COLLECTION;
    23 group_string varchar2(32767);
    24 BEGIN
    25 – Please customize the following variables as needed
    26 ldap_host := x.x.x.x' ;
    27 ldap_port := x;
    28 ldap_user := ‘cn=x,cn=x,dc=x,dc=x;
    29 ldap_passwd := ‘xxx;
    30 sub_type := DBMS_LDAP_UTL.TYPE_DN;
    31 subscriber_id := ‘dc=x,dc=x;
    32 user_type := DBMS_LDAP_UTL.TYPE_DN;
    33 user_id := ‘cn=’||Username||’,cn=Users,dc=x,dc=x;
    34 group_type := DBMS_LDAP_UTL.TYPE_DN;
    35 group_id := ‘cn=Groups, dc=x,dc=x;
    36 – Choosing exceptions to be raised by DBMS_LDAP library.
    37 DBMS_LDAP.USE_EXCEPTION := TRUE;
    38 ———————————————–
    39 – Connect to the LDAP server
    40 – and obtain and ld session.
    41 ———————————————–
    42 my_session := DBMS_LDAP.init(ldap_host,ldap_port);
    43 ———————————————–
    44 – Bind to the directory
    45 –
    46 ———————————————–
    47 retval := DBMS_LDAP.simple_bind_s(my_session,
    48 ldap_user,
    49 ldap_passwd);
    50 ———————————————————————
    51 – Create User Handle
    52 –
    53 ———————————————————————
    54 retval := DBMS_LDAP_UTL.create_user_handle(user_handle,user_type,user_id);
    55 IF retval != DBMS_LDAP_UTL.SUCCESS THEN
    56 DBMS_OUTPUT.PUT_LINE(‘create_user_handle returns : ‘ || TO_CHAR(retval));
    57 END IF;
    58 —————————————
    59 – Get Group Membership
    60 —————————————
    61 my_attrs.delete();
    62 my_attrs(1) := ‘cn’;
    63 retval := DBMS_LDAP_UTL.get_group_membership ( my_session,
    64 user_handle,
    65 DBMS_LDAP_UTL.DIRECT_MEMBERSHIP,
    66 my_attrs,
    67 my_pset_coll );
    68
    69 – Handle Errors
    70
    71 IF retval != DBMS_LDAP_UTL.SUCCESS THEN
    72
    73 DBMS_OUTPUT.PUT_LINE(‘get_group_membership returns : ‘ || TO_CHAR(retval));
    74 END IF;
    75 IF my_pset_coll.count > 0 THEN
    76 group_string := NULL;
    77 FOR i in my_pset_coll.first .. my_pset_coll.last LOOP
    78 retval := DBMS_LDAP_UTL.get_property_names(my_pset_coll(i),
    79 my_property_names);
    80 IF my_property_names.count > 0 THEN
    81 FOR j in my_property_names.first .. my_property_names.last LOOP
    82 retval := DBMS_LDAP_UTL.get_property_values(my_pset_coll(i),
    83 my_property_names(j),
    84 my_property_values);
    85 IF my_property_values.COUNT > 0 THEN
    86 FOR k in my_property_values.FIRST..my_property_values.LAST LOOP
    87 DBMS_OUTPUT.PUT_LINE( my_property_names(j) || ‘ : ‘ ||
    88 my_property_values(k));
    89 IF my_property_names(j) = ‘cn’ THEN
    90 PIPE ROW(my_property_values(k));
    91 END IF;
    92 END LOOP;
    93 END IF;
    94 END LOOP;
    95 END IF; — IF my_property_names.count > 0
    96 END LOOP;
    97 END IF; — If my_pset_coll.count > 0
    98 ———————————————————————
    99 – Free handle
    100 –
    101 ———————————————————————
    102 DBMS_LDAP_UTL.free_handle(user_handle);
    103 – unbind from the directory
    104 retval := DBMS_LDAP.unbind_s(my_session);
    105 IF retval != DBMS_LDAP_UTL.SUCCESS THEN
    106 – Handle Errors
    107 DBMS_OUTPUT.PUT_LINE(‘unbind_s returns : ‘ || TO_CHAR(retval));
    108 END IF;
    109 – Handle Exceptions
    110 EXCEPTION
    111 WHEN OTHERS THEN
    112 DBMS_OUTPUT.PUT_LINE(‘ Error code : ‘ || TO_CHAR(SQLCODE));
    113 DBMS_OUTPUT.PUT_LINE(‘ Error Message : ‘ || SQLERRM);
    114 DBMS_OUTPUT.PUT_LINE(‘ Exception encountered .. exiting’);
    115 END GETUSERGROUP;
    116 /
    Warning: Function created with compilation errors
    SQL> show error
    Errors for FUNCTION UAT_SEC.GETGROUP:
    LINE/COL ERROR-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    25/3 PLS-00103: Encountered the symbol "–" when expecting one of the following: ( begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge
    It's throw above error .
    Please tell me what's wrong in this function.
    Its very urgent help me pz.
    Thanks
    satya

    No - you can not access routines in modules. I believe you
    can use queries (as stored procedures). My suggestion would be to
    write a cfc to handle this.

  • How to save the state of ProgrammaticLogin in serlet/JSP?

    excuse me,
    I login to Sun Java System Application Server Platform Edition 9.0_01 with ProgrammaticLogin in a servlet,and invoke security EJB.But the system show that
    I'm not login when I turn to another serelet and invoke security EJB.Should I login for every servlet?
    thanks

    Somebody please correct me if I'm wrong, but I think you need to add security constraints (in your web.xml) for every servlet/jsp you wish to access login info from. (e.g.: someservlet.getRemoteUser()).
    Actually, it's interesting that you have asked this question, because I am facing the same dilemma in my project and I am planning to save username from a secured servlet/jsp into my session and then access that attribute value from other non-secured servlets/jsps.
    This is for a forum/chat style page that I wish to have both accessible to non-registred (anonymous, but using a free handle/nickname) and registered users (using reserved handle/nickname) to prevent any user from portraying themselves as another registered user.

  • Abort of a OCILobRead() (streaming mode)

    I have a problem on canceling a sequence of OCILobRead() calls. They are in streaming mode, setting the amtp parameter to 0, and calling it over and over again as long as OCILobRead() returns OCI_NEED_DATA.
    According to the documentation, a sequence of those calls can be aborted with OCIBreak(), but this does not work in my case. The OCIBreak call returns without error, but the next OCI operation on that connection fails with:
    ORA-03127 no new operations allowed until the active operation ends.
    I tried it in both blocking mode and nonblocking mode, but the resulting error is the same.
    Any help would be appreciated.

    I tried that, but it doesn't work too. I dont get the mentioned error ORA-01013, but the additional OCILobRead returns again OCI_NEED_DATA.
    It seems that the OCIBreak had no influence at all on the sequence of calls.
    I extracted the code to a small test program, maybe i missed something during initialization (mode???), or statement prep?
    #include <string.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <oci.h>
    static OCIEnv*     oci_env     = NULL;  // Environment handle
    static OCISvcCtx*  oci_svcctx  = NULL;  // Service handle
    static OCIServer*  oci_server  = NULL;  // Server handles
    static OCIError*   oci_error   = NULL;  // Error handle
    static OCISession* oci_session = NULL;  // Session handle
    static OCIStmt*    oci_stmt    = NULL;  // Statement handle
    void checkerr(sword status)
      switch (status)
        case OCI_SUCCESS:
          break;
        case OCI_SUCCESS_WITH_INFO:
          printf("Info - OCI_SUCCESS_WITH_INFO\n");
          break;
        case OCI_NEED_DATA:
          printf("Info - OCI_NEED_DATA\n");
          break;
        case OCI_NO_DATA:
          printf("Info - OCI_NODATA\n");
          break;
        case OCI_ERROR:
          text  errbuf[1024];
          sb4   errcode = 0;
          OCIErrorGet(oci_error, 1, NULL, &errcode, errbuf, sizeof(errbuf), OCI_HTYPE_ERROR);
          printf("Error - %s\n", errbuf);
          break;
        case OCI_INVALID_HANDLE:
          printf("Error - OCI_INVALID_HANDLE\n");
          break;
        case OCI_STILL_EXECUTING:
          printf("Info - OCI_STILL_EXECUTE\n");
          break;
        case OCI_CONTINUE:
          printf("Error - OCI_CONTINUE\n");
          break;
        default:
          break;
    void logon(char* user, char* pass, char* host)
      // allocate environment handle
      checkerr(OCIEnvCreate(&oci_env, OCI_DEFAULT, NULL, NULL, NULL, NULL, 0, NULL));
      // allocate error handle
      checkerr(OCIHandleAlloc(oci_env, (dvoid**)&oci_error, OCI_HTYPE_ERROR, 0, NULL));
      // allocate server handle
      checkerr(OCIHandleAlloc(oci_env, (dvoid**)&oci_server, OCI_HTYPE_SERVER, 0, NULL));
      // allocate service context
      checkerr(OCIHandleAlloc(oci_env, (dvoid**)&oci_svcctx, OCI_HTYPE_SVCCTX, 0, NULL));
      checkerr(OCIServerAttach(oci_server, oci_error, (text*)host, strlen(host), 0));
      // set attribute server context in the service context
      checkerr(OCIAttrSet(oci_svcctx, OCI_HTYPE_SVCCTX, oci_server, 0, OCI_ATTR_SERVER, oci_error));
      // allocate session handle
      checkerr(OCIHandleAlloc(oci_env, (dvoid**)&oci_session, OCI_HTYPE_SESSION, 0, NULL));
      // set attributes username and password in the session context
      checkerr(OCIAttrSet(oci_session, OCI_HTYPE_SESSION, user, strlen(user), OCI_ATTR_USERNAME, oci_error));
      checkerr(OCIAttrSet(oci_session, OCI_HTYPE_SESSION, pass, strlen(pass), OCI_ATTR_PASSWORD, oci_error));
      // begin session
      checkerr(OCISessionBegin(oci_svcctx, oci_error, oci_session, OCI_CRED_RDBMS, OCI_DEFAULT));
      checkerr(OCIAttrSet(oci_svcctx, OCI_HTYPE_SVCCTX, oci_session, 0, OCI_ATTR_SESSION, oci_error));
    void logoff()
      checkerr(OCISessionEnd(oci_svcctx, oci_error, oci_session, OCI_DEFAULT));
      checkerr(OCIServerDetach(oci_server, oci_error, OCI_DEFAULT));
      /* free handles */
      if (oci_session)
        OCIHandleFree(oci_session, OCI_HTYPE_SESSION);
      if (oci_svcctx)
        OCIHandleFree(oci_svcctx, OCI_HTYPE_SVCCTX);
      if (oci_server)
        OCIHandleFree(oci_server, OCI_HTYPE_SERVER);
      if (oci_error)
        OCIHandleFree(oci_error, OCI_HTYPE_ERROR);
      if (oci_stmt)
        OCIHandleFree(oci_stmt, OCI_HTYPE_STMT);
      if (oci_env)
        OCIHandleFree(oci_env, OCI_HTYPE_ENV);
    int checkout()
      text*          select = (text*) "SELECT blob_obj FROM te_rblock WHERE te_rblock.obj_id = '301000xxx:1:1'";
      OCIDefine*     oci_define;
      OCILobLocator* oci_lob;
      ub2            oci_ind, oci_rlen, oci_rcode;
      checkerr(OCIHandleAlloc(oci_env, (dvoid**)&oci_stmt, OCI_HTYPE_STMT, 0, NULL));
      checkerr(OCIStmtPrepare(oci_stmt, oci_error, select, strlen((char*)select), (ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT));
      checkerr(OCIDescriptorAlloc(oci_env, (void**)&oci_lob, OCI_DTYPE_LOB, 0, NULL));
      checkerr(OCIDefineByPos(oci_stmt, &oci_define, oci_error, 1, &oci_lob, 0, SQLT_BLOB, &oci_ind, &oci_rlen, &oci_rcode, OCI_DEFAULT));
      checkerr(OCIStmtExecute(oci_svcctx, oci_stmt, oci_error, 1, 0, NULL, NULL, OCI_DEFAULT));
      ub4       offset = 1;
      ub4       amount = 0;
      const ub4 PIECE_SIZE = 128;
      ub4       piece_len = PIECE_SIZE;
      char      piece[PIECE_SIZE + 1];
      int       counter = 0;
      sword     ret = OCI_NEED_DATA;
      while (ret == OCI_NEED_DATA)
        checkerr(ret = OCILobRead(oci_svcctx, oci_error, oci_lob, &amount, offset, piece, piece_len, NULL, NULL, 0, SQLCS_IMPLICIT));
        // if we dont interrupt it, everything is ok
        if (++counter == 5)
          checkerr(OCIBreak(oci_svcctx, oci_error));
          break;
      checkerr(OCIHandleFree(oci_stmt, OCI_HTYPE_STMT));
      oci_stmt = NULL;
      return 0;
    int main(int argc,char* argv[])
      if (argc != 4)
        printf("usage: %s <dbuser> <pwd> <db>\n", argv[0]);
        return -1;
      logon(argv[1], argv[2], argv[3]);
      // first checkout works fine
      checkout();
      // second time ORA-03127 occurs!!
      checkout();
      logoff();
      return 0;

  • VISA Shared resources by lock CVI functions

    Hello,
    Attach to the post : http://forums.ni.com/t5/LabWindows-CVI/VISA-Shared-resources/m-p/1000856#M43685
    I use LabWindows/CVI 2013 SP2.
    I have a share VISA problem : 2 functions VISA (Read and Write), on the same ressource.
    I want to protect the access to the ressource VISA with the lock functions.
    Like they propose and also the "ThreadLockTimeout" NI example.
    So only at the beginning of the software, I do step 1 : cmtStatus = CmtNewLock ("", 0, &LockHandleRS), add before that, to a free handle in case of...
    Only at the end, step 4 : cmtStatus = CmtDiscardLock (LockHandleRS), add to a "LockHandleRS = 0".
    In each read and the write VISA function (20 ms < time < 100 ms, timeOut =2 s),
    I try to use different methodes, without success :
    - to lock (step 2) :
         1) cmtStatus = CmtGetLock (LockHandleRS)
         2) cmtStatus = CmtTryToGetLock (LockHandleRS, &lock), add to a while loop (for timeOut)
         3) cmtStatus = CmtGetLockEx (LockHandleRS, 0, timeOut, &lock)
         4) and even, statusRS = viLock (portVISA, VI_EXCLUSIVE_LOCK, timeOut, VI_NULL, VI_NULL)
    - the VISA read/write function :
         "viWrite" for the ask, following by a "viRead" for the answer
         (VISA read function (# measure) : for only an acknowledge echo traitment and read data reponse)
         (VISA write function (# order) : for only an acknowledge echo traitment)
    - to unlock (if lock successfull) (step 3)
         1)2)3) cmtStatus = CmtReleaseLock (LockHandleRS)
         4) statusRS = viUnlock (portVISA)
    I display every wrong "cmtStatus" and "statusRS", but nothing appears.
    The VISA read function is called following an "EveryNCallback" DAQmx function (every 0.5 s).
    The VISA write function is called punctually, by an operator action throught various interfaces.
    If I use only the periodic VISA read function, no problem on lock/unlock.
    N.B. : Lock function (step 2) take only # 100 µs (for case 2) : at the 1rst iteration).
    N.B. : I use the same external lock/unlock functions for the VISA read/write.
    But nearly at every VISA write asking (3 on 5), I can display 2 consecutive successfull locks function (VISA read and write) ???
    N.B. : same time (100 µs).
    Following, of course, to 2 unlock functions (step 3).
    And every time, the echo of the VISA read function is treat by the VISA write function.
    And the echo of the VISA read traitment is truncked.
    So for me, I treat it like 2 VISA errors (read/write).
    ======================================
    I try to improve the NI example to show my problem.
    I hope that I do not make so much big mistakes, which would cancel the interest of this example.
    Into this small code lines, I can reproduce my problem (by quick applies on F1 button).
    I do not implimente all the fonctions I try.
    Into a bigger one, it is very easy to reproduce (even with the other functions).
    N.B. : In my final application, the thead n°1, look like more to a CVICALLBACK, than a thread with a while loop inside.
    But the problem still the same.
    Thanks a lot for consideration.
    Certified LabWindows/CVI DEVELOPER (2004)
    LabVIEW since 5.01 | LabWindows/CVI since 4.01
    Attachments:
    ThreadLockTimeout.7z ‏127 KB

    Hello,
    With NI France support, we improve to the NI example again.
    We show, with adding timing, that the example can display the message in a wrong sense (with a  software slowing down, at this moment, why ???) (see Explication°1.png).
    If we display the message before the release (//#define M2), we can not reproduce the double lock (and release),
    but also any software slowing down.
    So this example can not be use to help me to resolve my application lock trouble.
    It is not representative of my problem, which is always in progress.
    Certified LabWindows/CVI DEVELOPER (2004)
    LabVIEW since 5.01 | LabWindows/CVI since 4.01
    Attachments:
    ThreadLockTimeout n°2.7z ‏289 KB

  • Heap corruption when call OCIEnvCreate( ) using vc2005

    I got the following error when I call OCIEnvCreate( ) in debug mode step by step. The error message is:
    HEAP[ocitest.exe]: Invalid Address specified to RtlFreeHeap( 130000, 141818 )
    Windows has triggered a breakpoint in ocitest.exe.
    This may be due to a corruption of the heap, and indicates a bug in ocitest.exe or any of the DLLs it has loaded.
    The output window may have more diagnostic information"
    I can run my problem if I don't debug my code step by step. However, if I debug my code, it stucked at OCIEnvCreate( ) and quit from the problem if I tried to skip it.
    I'm using vc2005 and oci 10 (I have tried both "10.2.0.3.0" and "10.2.0.3.0 Patch 13" libraries). The oci libraries are from vc8. Here are my additional libs in link:
    \Oracle\instantclient_10_2\sdk\lib\msvc\oci.lib
    \Oracle\instantclient_10_2\sdk\lib\msvc\ociw32.lib
    \Oracle\instantclient_10_2\sdk\lib\msvc\vc8_ps13\oraocci10.lib
    I also checked my path. Everything looks fine. But the problem is persistent.
    Debug mode is very important. Do any body has any idea?
    Thanks.

    Following is the complete code.
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <oci.h>
    static OCIEnv *p_env;
    static OCIError *p_err;
    static OCISvcCtx *p_svc;
    static OCIStmt *p_sql;
    static OCIDefine p_dfn    = (OCIDefine ) 0;
    static OCIBind p_bnd    = (OCIBind ) 0;
    void main()
    int p_bvi;
    int count = 0;
    int rc;
    char errbuf[100];
    int errcode;
    // Initialize evironment
    rc = OCIEnvCreate(&p_env, OCI_DEFAULT, 0, 0, 0, 0, 0, 0);
    /* Initialize handles */
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,
    (size_t) 0, (dvoid **) 0);
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_svc, OCI_HTYPE_SVCCTX,
    (size_t) 0, (dvoid **) 0);
    /* Connect to database server */
    rc = OCILogon(p_env, p_err, &p_svc, (const OraText *)"scott", 5, (const OraText *)"tiger", 5, (const OraText *)"TestDB", 6);
    if (rc != 0) {
    OCIErrorGet((dvoid *)p_err, (ub4) 1, (text *) NULL, &errcode, (OraText *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
    printf("Error - %.*s\n", 512, errbuf);
    exit(8);
    /* Allocate and prepare SQL statement */
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_sql,
    OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0);
    rc = OCIStmtPrepare(p_sql, p_err, (const text *)"select count(*) from cms_info",
    (ub4) 37, (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT);
    /* Bind the values for the bind variables */
    p_bvi = 10; /* Use DEPTNO=10 */
    /*rc = OCIBindByName(p_sql, &p_bnd, p_err, (text *) ":x",
    -1, (dvoid *) &p_bvi, sizeof(int), SQLT_INT, (dvoid *) 0,
    (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);*/
    /* Define the select list items */
    rc = OCIDefineByPos(p_sql, &p_dfn, p_err, 1, (dvoid *) &count,
    (sword) sizeof(sword), SQLT_INT, (dvoid *) 0, (ub2 *)0,
    (ub2 *)0, OCI_DEFAULT);
    /* Execute the SQL statment */
    rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0,
    (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);
    if (rc != 0) {
    OCIErrorGet((dvoid *)p_err, (ub4) 1, (text *) NULL, &errcode, (OraText *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
    printf("Error - %.*s\n", 512, errbuf);
    exit(8);
    while (rc >= 0 && rc != OCI_NO_DATA) {             /* Fetch the remaining data */
    printf("%d\n",count);
    rc = OCIStmtFetch(p_sql, p_err, 1, OCI_FETCH_NEXT, 0);
    // close the connection
    if (count > 0) {
    struct cmsData {
    int id;
    char name[33];
    struct cmsData *cmsArray = new cmsData[count];
    OCIDefine *dfnhp[2];
    int j;
    rc = OCIStmtPrepare(p_sql, p_err, (const OraText*)"select cms_id, library from cms_info",
    (ub4) 37, (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT);
    if (OCIDefineByPos(p_sql, &dfnhp[0], p_err, (ub4) 1,
    (dvoid *) & cmsArray[0].id,
    (sb4) (sizeof(int)), (ub2) SQLT_INT, (dvoid *) 0,
    (ub2 *) 0, (ub2 *) 0, (ub4) OCI_DEFAULT)
    || OCIDefineByPos(p_sql, &dfnhp[1], p_err, (ub4) 2,
    (dvoid *) cmsArray[0].name,
    (sb4) (sizeof(cmsArray[0].name)),
    (ub2) SQLT_STR, (dvoid *) 0, (ub2 *) 0,
    (ub2 *) 0, (ub4) OCI_DEFAULT))
    (void) printf("FAILED: OCIDefineByPos()\n");
    if (OCIDefineArrayOfStruct(dfnhp[0], p_err, sizeof(struct cmsData),
    0, 0, 0)
    || OCIDefineArrayOfStruct(dfnhp[1], p_err, sizeof(struct cmsData),
    0, 0, 0))
    (void) printf("FAILED: OCIDefineArrayOfStruct()\n");
    rc = OCIStmtExecute(p_svc, p_sql, p_err, count, 0, NULL, NULL,
    OCI_DEFAULT);
    if (rc != 0)
    OCIErrorGet((dvoid *) p_err, (ub4) 1, (text *) NULL, &errcode,
    (OraText *) errbuf, (ub4) sizeof(errbuf),
    OCI_HTYPE_ERROR);
    printf("Execute Error - %.*s\n", 512, errbuf);
    exit(8);
    for (j = 0; j < count; j++)
    printf("%d | %s\n", cmsArray[j].id, cmsArray[j].name);
    delete [] cmsArray;
    rc = OCILogoff(p_svc, p_err); /* Disconnect */
    rc = OCIHandleFree((dvoid *) p_sql, OCI_HTYPE_STMT); /* Free handles */
    rc = OCIHandleFree((dvoid *) p_svc, OCI_HTYPE_SVCCTX);
    rc = OCIHandleFree((dvoid *) p_err, OCI_HTYPE_ERROR);
    return;
    }

Maybe you are looking for

  • In CM01 selection screen, what is the meaning of "Operator"

    Hello, (1) In CM01 selection screen, there are 3 fields with column heading "Operator". There is no documentation available for those fields. Can someone help me understand what is the meaning and use of those 3 fields. Thanks. (2) We are in the proc

  • IBolt and SBO Licensing

    Hi All, Please can someone with some iBolt experience please give me some information on the following. What licenses do a client need to run an iBolt project created by a SBO partner? Does the customer have to buy the SDK? We are having some confusi

  • Syncing iPad to windows computer to get music

    I have had an iPod that I was always able to sync to my iTunes on my windows computer. I recently got an iPad an I was wanting to put the music I had on my old computer to the iPad but when I plug my iPad into my computer it does not pull it up on th

  • Unable to see Ess Job Definition in the ESS Test UI

    Hi, I am defining a new ESS Job. I have created the Jobdefinition.xml in the Jdev. I have defined the parameters in In the Application defined properties. In the system properties, I have added the Sys Effective Application & Sys_product. In the Acce

  • X-Fi Elite Pro external thing not working prope

    The external part of my elite pro (dont know what its called) is only working somewhat. I can hear music from it with headphones but if i try to adjust volume or any of the settings (crystallizer, CMSS-3D, etc) it wont work. I can use the remote to a