Segmentation fault when calling dbms_alert.register() procedure from OCCI

I am trying to call the dbms_alert.register() from the OCCI but I get segmentation fault when I run the program, here is the code snippet. I am gettin segmentation fault immediately after calling setSQL() method.
Environment *occiEnvironment_;
Connection *occiConnection_ ;
string userName("SCOTT");
string userPasswd("tiger");
string url("");
occiEnvironment_ = Environment::createEnvironment();
try{
occiConnection_ = occiEnvironment_->createConnection(userName,userPasswd,url);
Statement *occiStatement1;
cout << "Before setSQL" << endl;
occiStatement1->setSQL("BEGIN dbms_alert.register(:1); END;");
cout << "After setSQL" << endl;
string alert1("MY_ALERT");
occiStatement1->setString(1,alert1);
occiStatement1->execute();
catch (SQLException ea)
cout << ea.what();
}

Thanks for the reply, now I dont see segmentation fault.
I tried to exted the code further to wait for the registered events, I added the following code, I do get and event but then get the exception:
Statement *occiStatement1 = occiConnection_->createStatement();
Statement *occiStatement2 = occiConnection_->createStatement();
string alert, msg;
int status;
occiStatement1->setSQL("BEGIN dbms_alert.register(:1); END;");
string alert1("MY_ALERT");
occiStatement1->setString(1,alert1);
occiStatement1->execute();
occiStatement2->setSQL("BEGIN dbms_alert.waitany(:alert,:msg,:status); END;");
occiStatement2->registerOutParam(1, OCCICHAR, sizeof(alert));
occiStatement2->registerOutParam(2, OCCICHAR, sizeof(msg));
occiStatement2->registerOutParam(3, OCCIINT, sizeof(int));
occiStatement2->execute();
===========================================================
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.DBMS_ALERT", line 252
ORA-06512: at line 1
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.DBMS_ALERT", line 252
ORA-06512: at line 1
*** glibc detected *** free(): invalid pointer: 0x08619c48 ***
Aborted

Similar Messages

  • Error when calling a stored procedure from a SQL Script

    Apologies if this is a really dumb question but I can't seem to call a procedure in package from a SQL script. I have a simple package.procedure containing a loop to populate a table. I would like to include a call to this procedure from my database install script, that also includes my CREATE and INSERT statements. I run the script using "@install_databae" and the CREATE and INSERT statements run fine. The script gives an error when it reaches the line below:
    exec lazarus.PopulateGridPositions;
    and gives the error.....
    BEGIN lazarus.PopulateGridPositions; END;
    ERROR at line 1:
    ORA-04063: package body "LAZARUS.LAZARUS" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "LAZARUS.LAZARUS"
    ORA-06512: at line 1
    The procedure and package have both compiled without errors and the statement on its own works fine in SQL*Plus.
    I've obviously missed some fundamental concept with scripts and SQL. Please can anybody help me?

    Histon FTM wrote:
    ORA-04063: package body "LAZARUS.LAZARUS" has errors Above, obviously conflicts with the statement that follows:
    >
    The procedure and package have both compiled without errors and the statement on its own works fine in SQL*Plus.I suggest you take a look in the USER_ERRORS view to see, what the errors are.
    And just checking:
    You have schema called LAZARUS, which holds a package named LAZARUS, which holds a procedure called POPULATEGRIDPOSITIONS?
    Edited by: Toon Koppelaars on Oct 1, 2009 5:55 PM

  • ORA-06553: PLS-908 when calling 10g remote procedure from 11g database

    Hi,
    I have 2 instances: 11g (11.1.0.7) and 10g (10.2.0.4). When I try to call 10g (remote) procedure from 11g database, there is errors:
    ORA-04052: error occurred when looking up remote object CUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK
    ORA-06541: PL/SQL: compilation error - compilation aborted
    ORA-06553: PLS-908: The stored format ofCUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK is not supported...
    But, if I call the same procedure from another 10g instance, it's OK.
    How can I fix the problem?
    Thx,
    qtpham

    As you can see ,it seems like the workaround that was mentioned there is currently the only way to remove this ORA.
    Workaround: Remove the function call(s) from the called subroutine's
                package's spec.

  • Segmentation fault when calling gpctr function from matlab mex file

    I am trying to write a simple mex file for square wave generation using counter1 of PCI-6035E. I am using matlab's native compiler to compile and link with the nidaq32 library, ver.6.9.3, with no errors. When the mex function is called from a matlab script, however, the program crashes at the first call, to reset the counter. (I can generate a square wave with the test panel.)

    Sorry for the delay in responding. I got caught up in other stuff. I am attaching my little program as requested. As you can see, I have just wrapped a mexFunction call round the example code for square wave generation. After I posted this, I tracked down a copy of BorlandC++, installed it on my computer and recompiled using that compiler and *b.* libraries. And would you know it, the program works. The question remains, though, why it doesn't work with Matlab's native lcc compiler. Plus, I have limited disk space, so if I can do without BorlandC, I can use the extra room. The runtime error was a Segmentation fault that I traced to the first call to GPCTR_Control.
    Attachments:
    pulsegen.c ‏4 KB

  • Segmentation Fault when connecting to SQL*Plus from Applications tier

    Hi Everyone -
    I am currently in the process of upgrading a client from 11.5.10.2 to 12.1.1 (eventually 12.1.3) on a OEL x86-64 server. I have laid down the software stack and followed all of the requirements as per the Installation manuals and 761566.1. I also have an open SR right now on this issue - but I wanted to see if any of you have ever run into the issue that I am encountering.
    When I try to run adadmin/adpatch - I get to the prompt of providing the system user password and the utility simply exits. No errors in adpatch.log or adadmin.log (both are 0 bytes in size).
    When I try to connect using SQL*Plus from the applications tier using either:
    sqlplus apps/****@SID
    sqlplus system/****@SID
    I get a Segmentation Fault error. There are also no errors in my alert log file on the database tier. I found this error while attempting to apply the upgrade merge patch.
    Has anyone ever seen s Segmentation Fault error? I have search MOS, found a couple of potential solutions - but nothing has solved the issue so far.
    Thanks in advance...
    Brenna

    >
    Are you on 11.1.0.5.0? Is this the database version?
    No, my database tier is 11.2.0.3 (the database version displayed above was the client version running on the Application Tier.
    Who is the owner of the application tier files? If it is applmgr user, please make sure you login as that user and source the application env file before running sqlplus -- Please issue "echo $ORACLE_HOME" and "which sqlplus" and post the output here.
    My owner of the application tier is oracle. I have sourced the environment using $APPL_TOP/APPSR12Dev1_******.env
    [oracle@****** log]$ echo $ORACLE_HOME
    /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2
    [oracle@****** log]$ which sqlplus
    /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/bin/sqlplus
    >
    Please relink sqlplus by issuing "$ORACLE_HOME/bin/relink all > relink.txt 2>&1" and check the relink.txt file for any error
    A number of errors occur during the relink, here are some of them:
    /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/bin/genclntsh
    /usr/bin/ld: warning: i386:x86-64 architecture of input file `/u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libn10.a(nnfgt.o)' is incompatible with i386 output
    /usr/bin/ld: warning: i386:x86-64 architecture of input file `/u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libn10.a(ntcontab.o)' is incompatible with i386 output
    /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/bin/genagtsh /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libagtsh.so 1.0
    /usr/bin/ld: warning: i386:x86-64 architecture of input file `/u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libn10.a(nnfgt.o)' is incompatible with i386 output
    /usr/bin/ld: warning: i386:x86-64 architecture of input file `/u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libn10.a(ntcontab.o)' is incompatible with i386 output
    /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libn10.a(nnfgt.o):(.rodata+0xc8): undefined reference to `nnflboot'
    /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libn10.a(ntcontab.o):(.data+0x8): undefined reference to `nttini'
    /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libn10.a(ntcontab.o):(.data+0x28): undefined reference to `ntzini'
    /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libn10.a(ntcontab.o):(.data+0x68): undefined reference to `ntpini'
    /u01/app/oracle/R12Dev1/apps/tech_st/10.1.2/lib/libn10.a(ntcontab.o):(.data+0x88): undefined reference to `ntusini'
    collect2: ld returned 1 exit status
    Thanks again...

  • Jdbc NullPointerException calling pl/sql procedure from java

    Hi.
    Getting the following exception calling a plsql procedure from jdbc.
    - Jdbc version is 10.2.0.2, but it also happens running several other variants, including 10.1.0.5.0.
    - Application is running in Weblogic 8.1.3 (8.1 SP 3).
    The procedure call itself has 2 in/out parameters which are tables (actually just 1 dimensional arrays), which I'm suspecting has something to do with the problem. I can successfully call this procedure using a plsql developer tool with the same bind parameters.
    Any ideas?
    Exception encountered while executing PL/SQL procedure MVT_Web_Inquiry.ShowInquiry:
    java.lang.NullPointerException at oracle.jdbc.driver.T4CTTIiov.processRXD([Loracle.jdbc.driver.Accessor;I[B[C[SILoracle.jdbc.driver.DBConversion;[B[B[[Ljava.io.InputStream;[[[B[[Loracle.jdbc.oracore.OracleTypeADT;Loracle.jdbc.driver.OracleStatement;[B[C[S)[Loracle.jdbc.driver.Accessor;(T4CTTIiov.java:139)
    at oracle.jdbc.driver.T4C8Oall.receive()V(T4C8Oall.java:521)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(ZZZZ)V(T4CCallableStatement.java:215)
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(Z)V(T4CCallableStatement.java:1119)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout()V(OracleStatement.java:1278)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal()I(OraclePreparedStatement.java:3446)
    at oracle.jdbc.driver.OraclePreparedStatement.execute()Z(OraclePreparedStatement.java:3552)
    at oracle.jdbc.driver.OracleCallableStatement.execute()Z(OracleCallableStatement.java:5261)
    at weblogic.jdbc.wrapper.PreparedStatement.execute()Z(PreparedStatement.java:70)
    at
    [snip]

    OK... I figured it out.
    Apparently, this error happens when you forget to register the output part of an in/out parameter. I would have hoped for better error messaging, but oh well.
    -ed-

  • Calling a stored procedure from Reports

    I am trying to call a stored procedure using oracle reports in the afterparameter code. My code is:
    v_ain := sp_get_ain(:P_session_id);
    Can someone help me out by telling what is wrong. I keep getting an error stating that sp_get_ain needs to be declared.?!

    I am creating a function and a stored procedure and calling them
    in afterparameter report trigger.
    -------------------Create function ----------------
    create or replace function get_name( emp_id number) return varchar2 is
    v_name varchar2(20);
    begin
    select name into v_name
    from sample_table
    where employ_id = emp_id ;
    return(v_name); ---------This is the way to return value from function.
    exception
    when no_data_found then
    return('Name not found.');
    when others then
    return('Other error found.');
    end ;
    ==================================================================================
    ------------------------Create procedure ------------------------------------
    create or replace procedure get_name( emp_id number, return_name out varchar2) is
    v_name varchar2(20);
    begin
    select name into v_name
    from sample_table
    where employ_id = emp_id ;
    return_name := v_name ; --Assign out parameter value from procedure.
    exception
    when no_data_found then
    return_name := 'Name not found.';
    when others then
    return_name := 'Other error found.';
    end ;
    ============================================================================
    -----------------Call function and procedure from report ---------------------
    In formula column or any report trigger you can use this code.
    v_function_return_name varchar2(20);
    v_procedure_return_name varchar2(20);
    v_employ_id number(10);
    begin
    v_employ_id := 101 ;
    v_function_return_name := get_name(v_employ_id ); --- call function
    get_name(v_employ_id , v_procedure_return_name ); -- call procedure
    end;
    Here v_function_return_name has same value as v_procedure_return_name,
    these are the values returned from function and procedure.
    --Anita

  • Calling Oracle Stored Procedure from Weblogic.

    Hi All,
    I am using Oracle 11g R2 and weblogic 10.3.5.0
    Do you know if it is possible to call a stored procedure from Weblogic.
    Basically, what I would like to do is to call the following procedure : EXEC DBMS_SESSION.SET_IDENTIFIER('provider_a') when my application connects to my database, "provider_a" being the user used to connect to the oracle schema.
    Thanks.

    Up !
    Thanks.

  • Calling PL/SQL procedures from a Windows CMD script

    Hello,
    I am writing a Windows CMD script. From this script I want to call procedures from a PL/SQL package which selects, inserts or deletes rows from the database.
    How do I go about logging into the database from the cmd script and calling PL/SQL procedures from there?
    Does anyone have any examples of such scripts? Thanks in advance.

    No, it is not a job that needs to be scheduled.
    The script will be used when needed to select info from a certain table and also to insert or delete certain info into/from this table (so, it is just simple sql statements which I have put into a package), but I'm sure how to log into the database and execute the procedures from this package in a cmd script.

  • Segmentation fault when using snapshot isolation with Berkeley DB 6.1.19 and 5.1.29

    Hello,
    I have been experimenting with snapshot isolation with Berkeley DB, but I find that it frequently triggers a segmentation fault when write transactions are in progress.  The following test program reliably demonstrates the problem in Linux using either 5.1.29 or 6.1.19. 
    https://anl.app.box.com/s/3qq2yiij2676cg3vkgik
    Compilation instructions are at the top of the file.  The test program creates a temporary directory in /tmp, opens a new environment with the DB_MULTIVERSION flag, and spawns 8 threads.  Each thread performs 100 transactional put operations using DB_TXN_SNAPSHOT.  The stack trace when the program crashes generally looks like this:
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7ffff7483700 (LWP 11871)]
    0x00007ffff795e190 in __memp_fput ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    (gdb) where
    #0  0x00007ffff795e190 in __memp_fput ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #1  0x00007ffff7883c30 in __bam_get_root ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #2  0x00007ffff7883dca in __bam_search ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #3  0x00007ffff7870246 in ?? () from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #4  0x00007ffff787468f in ?? () from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #5  0x00007ffff79099f4 in __dbc_iput ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #6  0x00007ffff7906c10 in __db_put ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #7  0x00007ffff79191eb in __db_put_pp ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #8  0x0000000000400f14 in thread_fn (foo=0x0)
        at ../tests/transactional-osd/bdb-snapshot-write.c:154
    #9  0x00007ffff7bc4182 in start_thread (arg=0x7ffff7483700)
        at pthread_create.c:312
    #10 0x00007ffff757f38d in clone ()
        at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
    I understand that this test program, with 8 concurrent (and deliberately conflicting) writers, is not an ideal use case for snapshot isolation, but this can be triggered in other scenarios as well.
    You can disable snapshot isolation by toggling the value of the USE_SNAP #define near the top of the source, and the test program then runs fine without it.
    Can someone help me to identify the problem?
    many thanks,
    -Phil

    Hi Phil,
       We have taken a look at this in more detail and there was a bug in the code.   We have fixed the bug.     We will roll it into our next 6.1 release that we do.   If you would like an early patch that will go on top of 6.1.19, please email me at [email protected], reference this forum post and I can get a patch sent out to you.   It will be a .diff file that apply on the source code and then rebuild the library.  Once again thanks for finding the issue, and providing a great test program which tremendously helped in getting this resolved.
    thanks
    mike

  • Calling Oracle store procedure from Crystal 11 command

    I need to call Oracle store procedure from Crystal Command. The Store proc has ref cursor. Is it possible. Can you post few examples?
    Also, is it possible to have multiple sql statements in a Crystal Command, when working with Oracle 10g?
    It is working for SQL server.

    Please re-post if this is still an issue to the Data Connectivity - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly.

  • Collect causes segmentation fault when profiling L2 data cache misses on T1

    I am attempting to profile L2 data cache misses on a SUN T1000 server, but collect causes a segmentation fault when I choose to profile L2 data cache misses.
    Is it possible to profile L2 data misses on the T1 processor?
    Thanks!
    -John
    A simple hello world application and the failed profiling:
    %] collect -p +on -h ecdm hello
    Segmentation fault
    I compiled with
    CC -xhwcprof -xdebugformat=dwarf -g -03 -o hello hello.c

    No it is not possible to profile L2 cache misses -- the chip does not generate
    interrupts on performance register 0 (only register 1, which is hard-wired
    to instruction count).
    That said, we should not generate a segmentation fault. Exactly
    which version of collect are you using? We did patch Studio 11
    to correctly handle the US-T1, and Studio 12 express also
    correctly handles it.
    Is the SEGV on the collect command, or on the target it launches?
    Marty Itzkowitz,
    Project Lead, Sun Studio Analyzer

  • Calling invalid stored procedure from java

    Will the stored procedure which is invalid get re-compiled automatically when called from a java program?
    1.a stored procedure is invalid (oracle 9i)
    2.calling the stored procedure from a java program
    3.what will happen a.oracle recompiles the stored procedure
    b.returns an sql exception
    what happens,kindly help
    drop your mail to [email protected]
    Keep Smiling and Mailing,
    Vijay Anand Natesan.

    thank you ..Kindly let me know if any of your friends have tried this

  • How to call a stored procedure from WorkShop

    Hello Everyone .. I'm quite new with WebLogic 8.1 & WorkShop, so please bare with
    me .. Today I'm simply trying to find out how to call a stored procedure from
    within workshop, using any of the DB Controls .. I see workshop provides a way
    create a Java Control, Rowset Control, but it wont easily allow for a stored procedured
    to be entered in place of the inline query .. Perhaps I've over looked it. Any
    advise on the best way to tackle this task will be appreciated.
    Atahualpa

    Atahualpa--
    Maybe this will help:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
    Eddie
    Atahualpa wrote:
    Hello Everyone .. I'm quite new with WebLogic 8.1 & WorkShop, so please bare with
    me .. Today I'm simply trying to find out how to call a stored procedure from
    within workshop, using any of the DB Controls .. I see workshop provides a way
    create a Java Control, Rowset Control, but it wont easily allow for a stored procedured
    to be entered in place of the inline query .. Perhaps I've over looked it. Any
    advise on the best way to tackle this task will be appreciated.
    Atahualpa

  • Calling a stored procedure from within a ViewObject

    Is it possible to make stored procedure call from within a BC4J ViewObject? Basically something like this:
    select * from table(f1(3)); where f1 is a table function. Using Oracle's pipelined table functions?
    If not, is it possible to call a stored procedure from Java and have the returned results be put back into a BC4J RowSet.
    In addition, is there a way to create a JDBC Resultset from a BC4J RowSet?
    We need to be able to dynamically create our SQL statements (the entire SQL, not just the where clause) but are required to have these sql statements generated/executed from within a pl/sql stored procedure in the database.

    Is it possible to make stored procedure call from within a BC4J ViewObject? Basically something like this:
    select * from table(f1(3)); where f1 is a table function. Using Oracle's pipelined table functions?
    Yes. Using our expert-mode query feature this is possible.
    is it possible to call a stored procedure from Java and have the returned results be put back into a BC4J RowSet.
    Yes. See this article about basing a view object on a REF CURSOR:
    http://radio.weblogs.com/0118231/2003/03/03.html
    In addition, is there a way to create a JDBC Resultset from a BC4J RowSet?
    No. Not directly. What's the business requirement here so I can understand better?
    We need to be able to dynamically create our SQL statements (the entire SQL, not just the where clause) but are required to have these sql statements generated/executed from within a pl/sql stored procedure in the database.
    REF CURSOR would work fine, or if it's just the statement that needs to be generated dynamically, you could fetch the text of the SQL statement from the stored procedure, then use createViewObjectFromQueryStmt(). Although this has runtime overhead involved with describing the query.
    The REF CURSOR based approach is probably best for this.

Maybe you are looking for

  • Simple button in AS3

    hello everybody, in my website I have a simple button that should trigger at every click a different frame. Browsing the net I have found the AS for the simple button (attached code) that works for a sigle click. Would please tell me the AS to give t

  • Wont charge 100%

    i was wondering is someone new why my macbook pro won't fully charge, it stays at 99%, while plugged into the wall, and won't go to full 100%, thus the light on the plug stays orange.

  • Wall mounting Omni 100 all in one PC

    I am looking for an adaptor to mount my Omni 100-5050 all in one PC to the wall.  Having trouble finding an adaptor.  Any suggestions would be great!  Thank for you help.

  • Public exception handler in database package

    I'm working on Oracle 10 g; I have a package with 10 functions, instead of writing exception for each individually is there is a way to do the same exception handler in all without repeating the exception handler in the 10 function (my exception hand

  • Photoshop cs2 not working

    Ive just found out after buying and installing mountain lion that photoshop cs2 isnt compatible !!! Obviously slightly annoyed but staying calm Is there any easy workaround for this or does anyone know if I can get refunded by apple and return to sno