DBMS_AQ.dequeue_array always returns 0 messages

Hi all,
first of all, thanks for your time reading this...
I have to dequeue messages from a Oracle queue and for performance reasons, I must dequeue batches of messages and not one by one.
I have a logmessage object that it is what is queued:
CREATE OR REPLACE
type logmessage as object (
wpTRID number(9),
wpRuleID number(9),
wpCompType Number(4),
wpComponent varchar2(40),
wpEvent varchar2(80),
wpStartTimestamp timestamp,
wpEndTimestamp timestamp,
wpSuccess varchar2(20)
The queue is created with the following statement:
DBMS_AQADM.CREATE_QUEUE (
queue_name => 'Log_Queue',
queue_table => 'Log_Table',
queue_type => DBMS_AQADM.NORMAL_QUEUE,
max_retries => 3,
comment => 'Log Queue',
auto_commit => FALSE);
The messages are enqueued with this function:
PROCEDURE LOGENQUEUE(wpTRID in number, wpRuleID in number, wpCompType in number, wpComponent in varchar2, wpEvent in varchar2, wpSuccess in varchar2, wpStartTimestamp in timestamp, wpEndTimestamp in timestamp)
IS
queue_options DBMS_AQ.ENQUEUE_OPTIONS_T;
message_prop DBMS_AQ.MESSAGE_PROPERTIES_T;
message_id RAW(16);
my_msg LogMessage;
seq Number(9);
BEGIN
IF(wpTRID=-1)
THEN
select wp_queue_seq.nextval into seq from dual;
my_msg:=LogMessage(seq,wpRuleID,wpCompType,wpComponent,wpEvent, wpStartTimestamp, wpEndTimestamp, wpSuccess);
message_prop.correlation:=seq;
ELSE
my_msg:=LogMessage(wpTRID,wpRuleID,wpCompType,wpComponent,wpEvent, wpStartTimestamp, wpEndTimestamp, wpSuccess);
message_prop.correlation:=wpTRID;
END IF;
message_prop.exception_queue:='Log_ExcepQueue';
DBMS_AQ.ENQUEUE( queue_name => 'Log_Queue', enqueue_options => queue_options, message_properties => message_prop, payload => my_msg, msgid => message_id);
END LOGENQUEUE;
Now, this dequeue procedure works (but it gets one message at a time, so no good):
PROCEDURE DEQUEUE_LOG_TABLE_2
IS
options DBMS_AQ.dequeue_options_t;
properties DBMS_AQ.message_properties_t;
v_message_handle RAW(16);
log_message_a logmessage;
TYPE log_dump_a_t IS TABLE OF log_dump%ROWTYPE
INDEX BY BINARY_INTEGER;
log_dump_a log_dump_a_t;
total NUMBER := 0;
n NUMBER;
BEGIN
options.navigation := DBMS_AQ.first_message;
options.WAIT := DBMS_AQ.no_wait;
FOR rec IN (SELECT wpi_id
FROM jm_wp_info_history jm, log_table l
WHERE jm.wpi_state = 'DONE'
AND jm.wpi_id = l.user_data.wptrid
AND ROWNUM < 2
GROUP BY jm.wpi_id) LOOP
total := total + 1;
options.correlation := rec.wpi_id;
SELECT COUNT(1)
INTO n
FROM log_table
WHERE corrid = rec.wpi_id;
FOR i IN 1 .. n LOOP
DBMS_AQ.dequeue(queue_name => 'Log_Queue',
dequeue_options => options,
message_properties => properties,
payload => log_message_a,
msgid => v_message_handle
log_dump_a(NVL(log_dump_a.LAST + 1, 1)).wptrid := log_message_a.wptrid;
log_dump_a(log_dump_a.LAST).wpruleid := log_message_a.wpruleid;
log_dump_a(log_dump_a.LAST).wpcomptype := log_message_a.wpcomptype;
log_dump_a(log_dump_a.LAST).wpcomponent := log_message_a.wpcomponent;
log_dump_a(log_dump_a.LAST).wpevent := log_message_a.wpevent;
log_dump_a(log_dump_a.LAST).wpstarttimestamp := log_message_a.wpstarttimestamp;
log_dump_a(log_dump_a.LAST).wpendtimestamp := log_message_a.wpendtimestamp;
log_dump_a(log_dump_a.LAST).wpsuccess := log_message_a.wpsuccess;
END LOOP;
IF ( log_dump_a IS NOT NULL
AND log_dump_a.COUNT > 0) THEN
FORALL i IN log_dump_a.FIRST .. log_dump_a.LAST
INSERT INTO log_dump
VALUES log_dump_a(i);
log_dump_a.DELETE;
END IF;
COMMIT;
END LOOP;
END dequeue_log_table_2;
And this one doesn't (it does, doesn't return any exception, just doesn't dequeue any message):
PROCEDURE DEQUEUE_LOG_TABLE
IS
TYPE log_message_a_t IS TABLE OF logmessage;
payloadarr log_message_a_t := log_message_a_t();
deqopt DBMS_AQ.dequeue_options_t;
msgproparr DBMS_AQ.message_properties_array_t := DBMS_AQ.message_properties_array_t();
msgidarr DBMS_AQ.msgid_array_t := DBMS_AQ.msgid_array_t();
retval PLS_INTEGER;
TYPE log_dump_a_t IS TABLE OF log_dump%ROWTYPE
INDEX BY BINARY_INTEGER;
log_dump_a log_dump_a_t;
total NUMBER := 0;
BEGIN
payloadarr.EXTEND(100);
msgproparr.EXTEND(100);
deqopt.WAIT := DBMS_AQ.no_wait;
deqopt.navigation := DBMS_AQ.first_message_multi_group;
FOR rec IN (SELECT wpi_id
FROM jm_wp_info_history jm, log_table l
WHERE jm.wpi_state = 'DONE'
AND jm.wpi_id = l.user_data.wptrid
AND ROWNUM < 2
GROUP BY jm.wpi_id) LOOP
total := total + 1;
deqopt.correlation := TO_CHAR(rec.wpi_id);
payloadarr.DELETE;
msgidarr.DELETE;
msgproparr.DELETE;
retval :=
DBMS_AQ.dequeue_array(queue_name => 'Log_Queue',
dequeue_options => deqopt,
array_size => payloadarr.COUNT,
message_properties_array => msgproparr,
payload_array => payloadarr,
msgid_array => msgidarr
FOR i IN 1 .. retval LOOP
log_dump_a(NVL(log_dump_a.LAST + 1, 1)).wptrid := payloadarr(i).wptrid;
log_dump_a(log_dump_a.LAST).wpruleid := payloadarr(i).wpruleid;
log_dump_a(log_dump_a.LAST).wpcomptype := payloadarr(i).wpcomptype;
log_dump_a(log_dump_a.LAST).wpcomponent := payloadarr(i).wpcomponent;
log_dump_a(log_dump_a.LAST).wpevent := payloadarr(i).wpevent;
log_dump_a(log_dump_a.LAST).wpstarttimestamp := payloadarr(i).wpstarttimestamp;
log_dump_a(log_dump_a.LAST).wpendtimestamp := payloadarr(i).wpendtimestamp;
log_dump_a(log_dump_a.LAST).wpsuccess := payloadarr(i).wpsuccess;
END LOOP;
IF ( log_dump_a IS NOT NULL
AND log_dump_a.COUNT > 0) THEN
FORALL i IN log_dump_a.FIRST .. log_dump_a.LAST
INSERT INTO log_dump
VALUES log_dump_a(i);
log_dump_a.DELETE;
END IF;
COMMIT;
END LOOP;
END dequeue_log_table;
And I assure the queue has plenty of messages at the moment!
SELECT state, COUNT(1)
FROM log_table
GROUP BY state;
State count(1)
0      1218578
I already tried everything I could think off... From different (ALL) options.navigation settings available to removing the correlation use, etc, etc... I simply don't know what else to try.
Can anyone share some insight on this?!
Sorry for the long post. Better have all the information to start with, I guess.
Thanks a lot!
Best regards,
Vítor Pinto
Added the queue create statement.
Message was edited by:
user449493
Message was edited by:
user449493

don't define log_message_a_t in proc. Create an explicit type on SQL prompt and see it will work..
CREATE OR REPLACE TYPE log_message_a_t AS TABLE OF <schema_name>.logmessage;

Similar Messages

  • ORA-28500: connection from ORACLE to a non-Oracle system returned this message: ORA-02063: preceding line from OWB_75

    ORA-28500: connection from ORACLE to a non-Oracle system returned this message: ORA-02063: preceding line from OWB_75
    Scenario:
    I am having difficulty getting ODBC connection between Oracle OWB app with an 11gR2 DB (running on a VirtualBox Linux) and SQL Server 2008 running directly on the host. (Windows 8)
    I am trying to take a SQL Server 2008 feed into Oracle Ware house Builder, and think(!) I have read everything and configured it in accordance (but I presume not given 3 days of failed attempts to fix it). I have also read several blogs, hence there might be a few more settings in the configuration files than the formal documentation says, but these have come from blogs that have “Solved” problems for other similar situations.
    The environments:
    HOST:
    Name: RESOLVEIT-PC
    IP: 192.168.1.80
    Windows 8 (64bit) , with system DSN ODBC connection ACME_POS created with 32 bit ODBC set up (This setting still shows up fine in the 64 bit ODBC).
    GUEST VM:
    Name: OraDBSvr.com
    GUES fixed IP Address: 192.1.200
    Oracle VirtualBox (4.2.16)
    Oracle Redhat Linux 6 (x86)
    Oracle 11gR2 Enterprise Edition (11.2.0.1.0)
    ODBC: Freetds driver
    Configuration files:
    initacmepos.ora
    HS_FDS_CONNECT_INFO = 192.168.1.80/SQLEXPRESS/ACME_POS
    HS_FDS_TRACE_LEVEL = 0
    HS_FDS_SUPPORT_STATISTICS=FALSE
    HS_RPC_FETCH_REBLOCKING= OFF
    HS_FDS_FETCH_ROWS = 1
    HS_FDS_SHAREABLE_NAME = /usr/local/lib/libtdsodbc.so
    set ODBCINI=/opt/odbc/odbc.ini
    # set <envvar>=<value>
    odbc.ini
    [ACME_POS]
    Driver     = FreeTDS
    Description = ODBC Connection via FreeTDS
    Trace       = 1
    Servername  = 192.168.1.80
    Database    = dbo
    odbcinst.ini
    [PostgreSQL]
    Description                        = ODBC for PostgreSQL
    Driver                   = /usr/lib/psqlodbc.so
    Setup                    = /usr/lib/libodbcpsqlS.so
    Driver64                              = /usr/lib64/psqlodbc.so
    Setup64                              = /usr/lib64/libodbcpsqlS.so
    FileUsage                           = 1
    [MySQL]
    Description                        = ODBC for MySQL
    Driver                   = /usr/lib/libmyodbc5.so
    Setup                    = /usr/lib/libodbcmyS.so
    Driver64                              = /usr/lib64/libmyodbc5.so
    Setup64                              = /usr/lib64/libodbcmyS.so
    FileUsage                           = 1
    [FreeTDS]
    Discription             = TDS driver (Sybase / MS SQL)
    Driver                           = /usr/local/lib/libtdsodbc.so
    # Setup                         = /usr/local/lib/libtdsS.so
    FileUsage                           = 1
    CPTimeout               =
    CPReuse                 =
    [oracle@oraDBsvr etc]$
    freetds.conf
    #   $Id: freetds.conf,v 1.12 2007-12-25 06:02:36 jklowden Exp $
    # This file is installed by FreeTDS if no file by the same
    # name is found in the installation directory. 
    # For information about the layout of this file and its settings,
    # see the freetds.conf manpage "man freetds.conf". 
    # Global settings are overridden by those in a database
    # server specific section
    [global]
            # TDS protocol version
    ;              tds version = 4.2
                   # Whether to write a TDSDUMP file for diagnostic purposes
                   # (setting this to /tmp is insecure on a multi-user system)
    ;              dump file = /tmp/freetds.log
    ;              debug flags = 0xffff
                   # Command and connection timeouts
    ;              timeout = 10
    ;              connect timeout = 10
                   # If you get out-of-memory errors, it may mean that your client
                   # is trying to allocate a huge buffer for a TEXT field.
                   # Try setting 'text size' to a more reasonable limit
                   text size = 64512
    # A typical Sybase server
    [egServer50]
                   host = symachine.domain.com
                   port = 5000
                   tds version = 5.0
    # A typical Microsoft server
    [ACME_POS]
      host = 192.168.1.80
      port = 60801                                # also tried 1433
      instance = SQLEXPRESS
      tds version = 8.0
      client charset = UTF-8
    tsql -LH 192.168.1.80
         ServerName RESOLVEIT-PC
       InstanceName SQLEXPRESS
        IsClustered No
            Version 10.50.4000.0
                tcp 60801
                 np \\RESOLVEIT-PC\pipe\MSSQL$SQLEXPRESS\sql\query
                via RESOLVEIT-PC,0:1433
    Oracle listener:
    [oracle@oraDBsvr log]$ cat /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = acmepos)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    (PROGRAM = dg4odbc)
    (HS = OK)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraDBsvr)(PORT = 1521))
    ADR_BASE_LISTENER = /u01/app/oracle
    [oracle@oraDBsvr log]$ lsnrctl status
    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-SEP-2013 13:57:41
    Copyright (c) 1991, 2009, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oraDBsvr)(PORT=1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date                16-SEP-2013 13:50:34
    Uptime                    0 days 0 hr. 7 min. 7 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    Listener Log File /u01/app/oracle/diag/tnslsnr/oraDBsvr/listener/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oraDBsvr)(PORT=1521)))
    Services Summary...
    Service "acmepos" has 1 instance(s).
    Instance "acmepos", status UNKNOWN, has 1 handler(s) for this service...
    Service "dw" has 1 instance(s).
    Instance "dw", status READY, has 1 handler(s) for this service...
    Service "dwXDB" has 1 instance(s).
    Instance "dw", status READY, has 1 handler(s) for this service...
    The command completed successfully
    Oracle tnsnames.ora
    [oracle@oraDBsvr admin]$ cat tnsnames.ora
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    dw =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dw)
    acmepos  =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
    (CONNECT_DATA=(SID=acmepos)
    (HS=OK)
    Oracle sqlnet.ora
    [oracle@oraDBsvr admin]$ cat sqlnet.ora
    # sqlnet.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
    # Generated by Oracle configuration tools.
    NAMES.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)
    ADR_BASE = /u01/app/oracle
    I can connect from the linux server to SQL Server, and query the database:
    [oracle@oraDBsvr etc]$ tsql -S acme_pos -U acme_dw_user -P acme1234
    locale is "en_US.utf8"
    locale charset is "UTF-8"
    using default charset "UTF-8"
    1> select last_name from dbo.employees;
    2> go
    last_name
    Davolio
    Fuller
    Leverling
    Peacock
    Buchanan
    Suyama
    King
    Callahan
    Dodsworth
    (9 rows affected)
    1>
    However, I can’t get a response through Oracle OWB , and I get:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message: ORA-02063: preceding line from OWB_75
    In the hs log file I get:
    [oracle@oraDBsvr log]$ cat acmepos_agt_3821.trc
    Oracle Corporation --- MONDAY    SEP 16 2013 13:51:22.170
    Heterogeneous Agent Release
    11.2.0.1.0
    HS Gateway:  NULL connection context at exit
    [oracle@oraDBsvr log]$
    I am really stuck now and going round in circles and can’t see the wood for trees! Can anyone please help?!!
    Many Thanks.
    Rafe.

    Let us rewrite your ODBC DSN a little bit... Your current odbc.ini looks like:
    [ACME_POS]
    Driver     = FreeTDS
    Description = ODBC Connection via FreeTDS
    Trace       = 1
    Servername  = 192.168.1.80
    Database    = dbo
    Let us change it a little bit so that we only need one config file - no odbcinst.ini nor freetds.conf file anymore:
    [ACME_POS]
    Driver =/usr/local/lib/libtdsodbc.so
    Server = 192.168.1.80
    Database
    = dbo     ####  I have some doubts that you have a SQL Server database called dbo - one database that always exists is master - so as a test use master here or get the real database name of the SQL Server database you want to connect
    Port = 60801 ## make sure it really is the correct port - best would be to check on the SQL server and then try telnet <ip> <port> if you can connect to the SQL server
    TDS_Version = 8.0
    QuotedId=YES
    Especially the last 2 parameters are mandatory. TDS_Version specifies the TDS Version you have to use to connect to the SQL Server and QuotedID is required for DG4ODBC as it surrounds objevt names by double quotes.
    What happens now when you try to connect with for example isql - the ODBC test utility shipped with the ODBC Driver manager?
    In addition, could you please do me another favour and check the word size of DG4ODBC and the ODBC Driver Manager as well as the ODBC Driver - just execute:
    file /u01/app/oracle/product/11.2.0/dbhome_1/bin/dg4odbc
    file /usr/local/lib/libtdsodbc.so
    file < the patch to your libodbc.so library>/libodbc.so
    and post the output.

  • Cascading LOV always returns first row in af:query

    HI
    JDEV 11.1.1.3.0
    A strange thing is happening with my cascading LOV which is input text with LOV.
    I have a read only table with a query section. I then also bring up any of the tables rows in a popup with single record view where the row is then in an af:form for inserting and updating.
    Both the af:query and af:form have the cascaing LOV in them.
    When testing the cascading LOV in the BC Browser it works fine. When I use it in the popup in the af:form record it works fine. But in the af:query section, no matter which row I choose in the LOV, it always returns the 1st row of the LOV back to my input text component.
    Has anyone experienced this...any ideas?
    Thanks,
    Mario

    Aha...and the above log message lead me to the solution!! :-)
    The VO is based on an Oracle data dictionary view, DBA_TAB_COLUMNS. When you create the read only VO, by default it does not create any of the attributes as "key" attributes, because the oracle view has no primary key.
    Setting owner, tableName and columnName as key attributes solved this issue, now my cascading LOV works in the BC Tester, af:query component and my af:form component.
    Regards,
    Mario

  • Output parameters always return null when ExecuteNonQuery - No RefCursor

    I am trying to call a procedure through ODP that passes in one input parameter and returns two (non-RefCursor) VARCHAR2 output parameters. I am calling the procedure using ExecuteNonQuery(); however, my parameters always return null. When I run the procedure outside of ODP, such as with SQLPlus or SQL Navigator, the output parameters are populated correctly. For some reason, there appears to be a disconnect inside of ODP. Is there a way to resolve this?
    Anyone have this problem?
    Here is the basic code:
    ===========================================================
    //     External call of the class below
    DBNonCursorParameterTest Tester = new DBNonCursorParameterTest();
    ===========================================================
    //     The class and constructor that calls the procedure and prints the results.
    public class DBNonCursorParameterTest
         public DBNonCursorParameterTest()
              //     The test procedure I used is a procedure that takes a recordID (Int32) and then returns a
              //     general Name (Varchar2) and a Legal Name (Varchar2) from one table with those three fields.
              string strProcName                    = "MyTestProc;
              OracleConnection conn               = new OracleConnection(DBConnection.ConnectionString);
              OracleCommand cmd                    = new OracleCommand(strProcName,conn);
              cmd.CommandType                         = CommandType.StoredProcedure;
                   //     Create the input parameter and the output cursor parameter to retrieve data; assign a value to the input parameter;
              //     then create the parameter collection and add the parameters.
              OracleParameter pBPID               = new OracleParameter("p_bpid",               OracleDbType.Int32,          ParameterDirection.Input);
              OracleParameter pBPName               = new OracleParameter("p_Name",               OracleDbType.Varchar2,     ParameterDirection.Output);
              OracleParameter pBPLegalName     = new OracleParameter("p_LegalName",     OracleDbType.Varchar2,     ParameterDirection.Output);
              pBPID.Value = 1;
              //     Open connection and run stored procedure.
              try
                   conn.Open();
                   cmd.Parameters.Add(pBPID);
                   cmd.Parameters.Add(pBPName);
                   cmd.Parameters.Add(pBPLegalName);
                   cmd.ExecuteNonQuery();
                   Console.Write("\n" + cmd.CommandText + "\n\n");
                   //for (int i = 0; i < cmd.Parameters.Count; i++)
                   // Console.WriteLine("Parameter: " + cmd.Parameters.ParameterName + " Direction = "     + cmd.Parameters[i].Direction.ToString());
                   // Console.WriteLine("Parameter: " + cmd.Parameters[i].ParameterName + " Status = "          + cmd.Parameters[i].Status.ToString());
                   // Console.WriteLine("Parameter: " + cmd.Parameters[i].ParameterName + " Value = "          + cmd.Parameters[i].Value.ToString() + "\n");
                   foreach (OracleParameter orap in cmd.Parameters)
                        Console.WriteLine("Parameter: " + orap.ParameterName + " Direction = "     + orap.Direction.ToString() + " Value = " + orap.Value.ToString());
                        Console.WriteLine("Parameter: " + orap.ParameterName + " Status = "          + orap.Status.ToString());
                        Console.WriteLine("Parameter: " + orap.ParameterName + " Value = "          + orap.Value.ToString() + "\n");
                   //     End Test code.
              catch (Exception ex)
                   throw new Exception("ExecuteQuery() failed: " + ex.Message);
              finally
                   this.Close();
         public void Close()
              if (conn.State != ConnectionState.Closed)
                   conn.Close();
    =========================================================
    Other things to note:
    I have no problems with returning RefCursors; they work fine. I just don't want to use RefCursors when they are not efficient, and I want to have the ability to return output parameters when I only want to return single values and/or a value from an insert/update/delete.
    Thanks for any help you can provide.

    Hello,
    Here's a short test using multiple out parameters and a stored procedure. Does this work as expected in your environment?
    Database:
    /* simple procedure to return multiple out parameters */
    create or replace procedure out_test (p_text in varchar2,
                                          p_upper out varchar2,
                                          p_initcap out varchar2)
    as
    begin
      select upper(p_text) into p_upper from dual;
      select initcap(p_text) into p_initcap from dual;
    end;
    /C# source:
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace Miscellaneous
      class Program
        static void Main(string[] args)
          // change connection string as appropriate
          const string constr = "User Id=orademo; " +
                                "Password=oracle; " +
                                "Data Source=orademo; " +
                                "Enlist=false; " +
                                "Pooling=false";
          // the stored procedure to execute
          const string sql = "out_test";
          // simple input parameter for the stored procedure
          string text = "hello!";
          // create and open connection
          OracleConnection con = new OracleConnection(constr);
          con.Open();
          // create and setup connection object
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = sql;
          cmd.CommandType = CommandType.StoredProcedure;
          // the input paramater
          OracleParameter p_text = new OracleParameter("p_text",
                                                       OracleDbType.Varchar2,
                                                       text.Length,
                                                       text,
                                                       ParameterDirection.Input);
          // first output parameter
          OracleParameter p_upper = new OracleParameter("p_upper",
                                                        OracleDbType.Varchar2,
                                                        text.Length,
                                                        null,
                                                        ParameterDirection.Output);
          // second output parameter
          OracleParameter p_initcap = new OracleParameter("p_initcap",
                                                          OracleDbType.Varchar2,
                                                          text.Length,
                                                          null,
                                                          ParameterDirection.Output);
          // add parameters to collection
          cmd.Parameters.Add(p_text);
          cmd.Parameters.Add(p_upper);
          cmd.Parameters.Add(p_initcap);
          // execute the stored procedure
          cmd.ExecuteNonQuery();
          // write results to console
          Console.WriteLine("   p_text = {0}", text);
          Console.WriteLine("  p_upper = {0}", p_upper.Value.ToString());
          Console.WriteLine("p_initcap = {0}", p_initcap.Value.ToString());
          Console.WriteLine();
          // keep console from closing when run in debug mode from IDE
          Console.WriteLine("ENTER to continue...");
          Console.ReadLine();
    }Output:
       p_text = hello!
      p_upper = HELLO!
    p_initcap = Hello!
    ENTER to continue...- Mark

  • Every time I turn my mac off, the desktop background changes. It always returns to the same picture, which was the second or third thing I changed my desktop to after getting my mac.

    Every time I turn my mac off, the desktop background changes. It always returns to the same picture, which was the second or third thing I changed my desktop to after getting my mac. I have background switching unchecked in my preferences, and I have never selected it as an option. Also, when I go to my preferences, it will show the icon of the picture I changed it to, even though the desktop itself has switched back.

    I would start with some basic troubleshooting.
    REPAIRING DISK PERMISSIONS -
    NOTE: refer to article "About Disk Utility's Repair Disk Permissions feature" found here http://support.apple.com/kb/ht1452 - for the actual apple article on these step. ----
    - click finder in the bottom dock, and in the window that opens, select applications in the left column - scroll through until you see the 'Utilities' folder and double click to open it.  Then double click on 'Disk Utility'
    - When prompted to select a disk volume or image, select the 'Macintosh HD' in the left column
    - ensure the the "first aid" tab is highlighted blue in the middle of the screen
    - click the button at the bottom that says 'Repair Disk Permissions'
    - this process will take a few minutes to run.  It will indicate it's done, by scrolling to the bottom of the "details area" displaying 'Permissions repair complete'
    Dan Frankes has written an excellent article for Macworld on "Permissions" and the need to repair them - see - http://www.macworld.com/article/52220/2006/08/repairpermissions.html.    Another good web site is - http://www.thexlab.com/faqs/durepairfns.html.
    REPAIRING DISK - About OS X Recovery - http://support.apple.com/kb/HT4718.
    - restart your computer hold down command + R keys on the keyboard to boot you into Lion / Mountain Lion Recovery mode
    - select english as your main language then the continue arrow
    - select "Disk Utility" on the resulting screen then 'Disk Utility' ---
    - When prompted to select a disk volume or image, select the 'Macintosh HD' in the left column
    - ensure the the "first aid" tab is highlighted blue in the middle of the screen
    - click the button at the bottom that says 'REPAIR DISK' .......NOT "Repair disk permissions"
    - this process will take a few minutes to run.  It will indicate it's done, by scrolling to the bottom of the "details area" displaying "The Macintosh HD appears OK"
    If you get any other message OTHER than "The Macintosh HD appears OK", like "the Macintosh HD was repaired successfully" run the "Disk Repair" again, until it displays  "The Macintosh HD appears OK".
    Once done, restart the computer as normal

  • I am trying to update my apple tv, but it always returns an error

    i am trying to update my apple tv, but it always returns an error that says it can't be done right now, try again later.
    I had to change my DNS on my iphone and ipad, and those then upgraded fine, just not apple tv.
    Any help will be appreciated.

    this should help. https://discussions.apple.com/message/17797644#17797644
    update your atv via iTunes on your mac/pc using open dns. read also the warning with itunes rentals.

  • ServletAuthentication.weak() makes isUserInRole() always return false

    I have a problem with SSO and authentification. If I authenticate with the weak()
    method(have tried alle of them) authentication works fine and it seem to be single
    signed-on, but
    if we call the isUserInRole() method it always return false.
    If I try to "call" pages from the client the declerativ security-constraints also
    works fine preventing the user from accessing the pages. It is only when we use
    the forward() method that we also use isUserInRole() to check if the user is permitted
    to be forwarded(). WLS 6.1 sp2 tells us that the user is never in Role, no matter
    what, if we use the weak() method to authenticate.
    If I switch to using a j_sec_check form to authenticate the isUserInRole() works
    fine. I can't use j_sec_check as a permanent solution though, because I need to
    do a lot of pre- and post- processing in the login/authenication process.
    Have any of you figured out a solution to this problem? Shouldn't isUserInRole()
    work the same way regardless of if you logged in using SA.weak() or a j_security_check
    form?

    Hi ,
    If I switch to using a j_sec_check form to authenticate the isUserInRole()works
    fine. I can't use j_sec_check as a permanent solution though, because Ineed to
    do a lot of pre- and post- processing in the login/authenication process.You can use the j_security_check and still do the pre and post processing as
    you want.
    You have to following code,
    package examples.servlets;
    import java.io.PrintStream;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import weblogic.servlet.security.AuthFilter;
    public class AuthFilterImpl extends AuthFilter
    public AuthFilterImpl()
    System.out.println("New AuthFilterImpl has been created.");
    public void doPreAuth(ServletRequest servletrequest, ServletResponse
    servletresponse)
    System.out.println("AuthFilterImpl.doPreAuth has been called.");
    System.out.println("Password is " +
    servletrequest.getParameter("j_password"));
    public boolean doSuccessAuth(ServletRequest servletrequest,
    ServletResponse servletresponse)
    System.out.println("AuthFilterImpl.doSuccessAuth has been called.");
    return true;
    public void doFailAuth(ServletRequest servletrequest, ServletResponse
    servletresponse)
    System.out.println("AuthFilterImpl.doFailAuth has been called.");
    In your weblogic.xml have this entry,
    <weblogic-web-app>
    <auth-filter>
    examples.servlets.AuthFilterImpl
    </auth-filter>
    </weblogic-web-app>
    I am not sure about problem with SA.weak().
    -utpal
    "Morten" <[email protected]> wrote in message
    news:[email protected]...
    >
    I have a problem with SSO and authentification. If I authenticate with theweak()
    method(have tried alle of them) authentication works fine and it seem tobe single
    signed-on, but
    if we call the isUserInRole() method it always return false.
    If I try to "call" pages from the client the declerativsecurity-constraints also
    works fine preventing the user from accessing the pages. It is only whenwe use
    the forward() method that we also use isUserInRole() to check if the useris permitted
    to be forwarded(). WLS 6.1 sp2 tells us that the user is never in Role, nomatter
    what, if we use the weak() method to authenticate.
    If I switch to using a j_sec_check form to authenticate the isUserInRole()works
    fine. I can't use j_sec_check as a permanent solution though, because Ineed to
    do a lot of pre- and post- processing in the login/authenication process.
    Have any of you figured out a solution to this problem? Shouldn'tisUserInRole()
    work the same way regardless of if you logged in using SA.weak() or aj_security_check
    form?

  • PCI-6133 always returns huge constant number of counts

    Hi,
    I am trying to use a PCI-6133 with a BNC-2110 adapter to counting leading edges of pulses.  Please excuse my high degree of ignorance of how to do this.  Anyway, I connected up my TTL input signal according to the BNC-2110 instructions (to PFI-8 via User-2). Whenever I run the DAQmx sample program Count Digital Events.vi, it recognizes the PCI-6133 OK, but always returns an absurdly high and constant number of counts, like 3.2e9.  The number doesn't change as I send test pulses into the input.  It also remains the same even if I disconnect the input line entirely and rerun the sample program.
    Rebooting yields the same behavior.
    Using DAQ assistant to generate my own code, instead of the sample program, produced exactly the same result.
    Thanks for any help you can give me.  I don't even know where to start to debug this problem.
    Thanks,
    Andy

    BVeezy wrote:
    How/what exactly are you measureing from;? Are you wiring the digital signal directly into PFI 8? Have your tried using the other counter (CTR1) on the 6133? It should be PFI 3 (as indicated in the manual). You may also try generating a pulse signal from the 6133 and reading it with this VI to determine if your source may be the issue (you could use PFI 2 as a Digital Output for this). Finally, does it read the same value every time you run it (the reported 3.2e9)?
    Regards,
    Brandon V.
    Applications Engineer
    National Instruments
    Thank you very much for your help.
    How/what exactly are you measureing from;?
    I am measuring (counting) TTL pulses coming from a TTL driver.  They are about 1 us long and nominal TTL high and low values.  The pulses look fine on a scope.  The rate is very low, typically a few Hz up to perhaps 200 Hz.  The behavior is the same regardless of whether I have the input signal connected to the BNC-2110, however.  The pulses are ultimately generated by a neutron detector, with a bunch of signal processing in between.
    Are you wiring the digital signal directly into PFI 8?
    The input signal is connected by BNC cable to the "User 2" port on the BNC-2110.  A jumper wire connects the "User2" PFI Terminal to the "PFI-8" PFI Terminal.  Again, the behavior is exactly the same regardless of whether these wires are installed or not.
    Have your tried using the other counter (CTR1) on the 6133?
    The behavior is exactly the same on ctr1, which has no wires connected to it.
    You may also try generating a pulse signal from the 6133 and reading it with this VI to determine if your source may be the issue (you could use PFI 2 as a Digital Output for this).
    I tried running a "test panel" in MAX to count the 20 MHz internally generated signal.  It gave the exact same results, on both ctr0 and ctr1.  It did not throw any error message.
    Finally, does it read the same value every time you run it (the reported 3.2e9)?
    It reads the same value every time I run the sample VI or test panel (3217997774) on both channels, except that the number changes to a different constant number (very close) when I reboot the computer.
    I have been wondering if the problem might be associated with the configuration of the ports on the PCI-6133.  The manual repeatedly says that you can configure the ports to input or output, for example, but it is not clear to me how to do that.  When I right-click the device in MAX, "Configure" is not one of the choices, despite what it says in the "Getting Started" manual.
    Again, thanks for your help. 
    Take care,
    Andyaina

  • Navigation problems on SLD - always returning on index.jsp

    Hello, we are working with System Landscape Directory without the SAP Portal, and we have a lot of navigation errors.
    Every time we try to mantain any option (for example; add new system landscape) the browser always returns to home SLD page (index.jsp)... So is not possible to configure anything, only start/stop server.
    Somebody has been with this or similiar problem sometimes?
    Our Relesase is Netweaver 2004 SP14 for abap and java stack.

    For example, when we try to add a system lanscape:
    On home page, we click to System Landscapes.
    On System Landscape Browser, click on New Landscape,
    On popup asking the name, we put for example 'LNDSC1' and ok.
    Then the system lanscape is not created and the browser returns me to home page again.
    When we try to add a new technical systems, the SLD has the same behaviour as before...
    Another example:
    On Administration tab, when we try to import CIM models and data, after we introduce the name of the import file and click on 'Import file'.. the page returns to home page again without messages..
    I'm using user j2ee_admin. I'm not sure if is the correct users..

  • SelectInputMethod() method of InputContext always returning false in JWS

    Hi,
    I am setting the Locale on a textArea using the api:
    TextArea.getInputContext().selectInputMethod(Locale).
    This api is always returning false, when run on Java Web Start.
    However, it returns the correct value, when run on Java.
    Has any one faced such issue?
    Thanks,
    Charanjeet
    Message was edited by:
    jannyguy

    When I trace the nativePath of the file I am trying to find it shows "C:\Users\User\AppData\Roaming\Arakaron.debug\Local Store". This is the exact path I am following in Explorer. Now, instead of applicationStorageDirectory I can do documentsDirectory and it reads that the file is in fact there. With the applicationStorageDirectory it only registers that the file exists after I copy from the embedded db file. 

  • PartialPageUtils.isPartialRequest(fctx) always return false

    Hi All ,
    I am using Jdeveloper 11g and i can't solve the problem with getting always false from
    PartialPageUtils.isPartialRequest(fctx);
    If i use partialSubmit="true" PartialPageUtils.isPartialRequest(fctx) return false.
    If i don't use partialSubmit PartialPageUtils.isPartialRequest(fctx) return false.
    Could you please give me a solution.
    Thanks in advance,
    JavaDeveLoper

    Hi Mr. Frank Nimphius
    I have a creation form with 7 input text fields. 3 of them are required fields.
    These 3 fields have valueChangeListener , validator and autoSubmit="true".
    The problem is that when i enter info in field 1 and tab to the next field after passing the validator for field1 i get error message, because i've entered nothing in the other required fields.
    Also i've ovveride public void validateModelUpdates(LifecycleContext lifecycleContext) {...}
    public void validateModelUpdates(LifecycleContext lifecycleContext) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    boolean isPPR = PartialPageUtils.isPartialRequest(fctx);
    if (isPPR) {
    System.out.println("No Refresh");
    } else {
    super.validateModelUpdates(lifecycleContext);
    This method always return false.

  • Request.getMethod() will always return POST

    I found out that in Portal
    request.getMethod() will always return "POST"
    May I know is there any workaround for this???
    thanks for the help

    Hi,
    Break-point inserted as Emmanuel mentioned.. the message is:
    Internal error in program SAPLRSDRS and method
    GET_FETCH_TYPE-5-
    How can i fix it?
    Best regards
    Juan

  • Request.getParameter() always returns null

    I have a html file and am trying to retrieve the values from a formin my servlet.
    here is the html code:
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <h1><b>Add DVD</b></h1>
    </head>
    <body>
    <form action="add_dvd.do" method="POST">
    Title:<input type="text" name="title" />
    Year:<input type="text" name="year" />
    Genre: <select name='gselected'>
    <option value='Sci-Fi'>Sci-Fi</option>
    </select>
    or enter new genre:<input type="text" name='gentered' value="" />
    <input type="submit" value="Add DVD" />
    </form>
    </body>
    </html>
    and here is the servlet code:
    public class AddDVDServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    // System.out.println("in AddDVDServlet post method");
    List errorMsgs = new LinkedList();
    //retrieve form parameters
    try{
    String title = request.getParameter("title").trim();
    String year = request.getParameter("year").trim();
    *String gentered = request.getParameter("gentered");
    String gselected = request.getParameter("gselected");
    String genre="";
    if("".equals(gentered))
    genre = gselected;
    else
    genre = gentered;
    // System.out.println("parameter retrieved");
    if(!year.matches("\\d\\d\\d\\d"))
    // System.out.println("year not 4 digit long");
    errorMsgs.add("Year must be four digit long");
    if("".equals(title))
    // System.out.println("title not entered");
    errorMsgs.add("Please enter the title of the dvd");
    if("".equals(genre))
    // System.out.println("genre not valid");zdf
    errorMsgs.add("Enter genre.");
    if(! errorMsgs.isEmpty())
    //System.out.println("errors in entry ");
    request.setAttribute("errors",errorMsgs);
    // System.out.println("error attribute set in request");
    RequestDispatcher rd = request.getRequestDispatcher("error.view");
    rd.forward(request, response);
    return;
    //create DVDItem instance
    DVDItem dvd = new DVDItem(title,year,genre);
    request.setAttribute("dvdItem",dvd);
    RequestDispatcher rd = request.getRequestDispatcher("success.view");
    rd.forward(request, response);
    catch(Exception e){
    errorMsgs.add(e.getMessage());
    request.setAttribute("errors",errorMsgs);
    RequestDispatcher rd = request.getRequestDispatcher("error.view");
    rd.forward(request, response);
    e.printStackTrace();
    System.out.println("exception:"+e);
    why does getParameter always return null??? whats wrong?

    I don't know. However, I suspect that because you have a tag with the same name as 'title', its causing a name conflict. Chnage the name to something else. If it works, then that's the likely explaination.

  • My iphone 4 is stuck on the hello screen...with a white background after i tried to update it.  How do i correct this?  I have already gone to itunes and backed it up.  But after i back it up it always return to the hello screen in  different languages ?

    My iphone 4 is stuck in the setup phase with a white background.  It tells me hello in several diffrent  languages and tells me to slide to set up.  I have already backed it up on itunes several times but it always returns to the hello screen with the white back ground.  Can anyone please help me with this?  All of this happened after i updated it for the 1st time. Help pLease?
    Edward

    Hello Edward
    Follow the prompts on your iPhone and you will get either at your home screen like normal or get to a point of restoring from back up. The article below will give step by step for restoring from back up.
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • After upgrading to Lion the bookmarks in Preview returns error message.

    After upgrading to Lion the bookmarks in Preview returns error message : The File "****" couldn't be opened because you don't have permission to view it. To change the perimssion, select the item in finder and Choose File info.  I have bookmarked plenty of files in Preview.  How to overcome this error message???

    Doesn't work Steve. I think it is an issue with Preview being sandboxed (check the sandbox column in Activity Monitor: Preview = Yes). Sandboxed apps restrict file access to those the user has explicitly selected. My theory is that this causes the unfortunate side effect of bookmarked or linked PDFs not working. A simple test: open a file with bookmarks, manually open the bookmarked file and then select the bookmark in the first file - it should open with no complaints about permissions (which leads to a weak workaround: open all the PDFs you intend to work with!).

Maybe you are looking for

  • Automatic shutdown after 1 minute

    My macbook displays the turn on/off window(restart, sleep, cancel, shut down) after 1 minute and that only happens if I havn't typed anything or touched the touchpad. If I don't click the cancel button or move the pointer around the computer shuts do

  • Connecting an new ipod to a new macbook

    My friend just bought a macbook a wants to connect his new ipod which he used on a windows computer until now. It appears on the desktop, he can open it but it wont show his music files. Tried to consolidate the files to the library but it doesnt hap

  • Accidentally deleted a users keychain

    Hi, I accidentally deleted one of my user's keychain. I can't remember if I selected DELETE REFERENCES AND FILES or just DELETE REFERENCES. Now there are just 2 system keychains and the X509Anchors keychains, and no certificates either. I created a n

  • Satellite P series - I can no longer scroll using edge of the touch pad

    Please can anyone tell me why I can no longer scroll using the edge of the touch pad. This seems to have occurred since I had to reinstall Vista following a problem with some faulty Ram. Thanks

  • BAttery no longer showing on iPhone while charging

    Last night when I charged my iPhone the big green battery was on the display the whole time. Tonight as I'm charging it the screen goes blank and I have to hit the home button to see the battery. Anyone else notice this change in behavior? If not the