DequeueArray error

DequeueArray error

Postby ppvdude » Mon 23 Mar 2009 23:03

Hello,

I am receiving the following error when trying to call OracleQueue.DequeueArray(size):

ORA-06550: line 1210, column 18:
PLS-00103: Parser stack overflow error.

I get this error when I try to dequeue 70 or more messages. I have started at various points in the queue to confirm that it was not a particular message causing the problem. I am using the trial edition of dotConnect. Below is the section of code that is generating the error:

connEEG.Open()

' Create an OracleQueue to dequeue from.
Dim qEEG As New OracleQueue("TOPIC", connEEG)
qEEG.AsyncNotification = False
qEEG.DequeueOptions.Navigation = OracleQueueNavigation.NextMessage
qEEG.DequeueOptions.DequeueMode = OracleQueueDequeueMode.Remove
qEEG.DequeueOptions.ConsumerName = "TEST_SUB"
qEEG.DequeueOptions.Visibility = OracleQueueVisibility.Immediate

Dim mEEG() As OracleQueueMessage = qEEG.DequeueArray(70)

and here is the stack trace:

at Devart.Data.Oracle.am.b(Int32 A_0)
at Devart.Data.Oracle.ao.e(Int32 A_0)
at Devart.Data.Oracle.ao.a(Int32 A_0, a3 A_1)
at Devart.Data.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
at Devart.Data.Oracle.OracleQueue.DequeueArray(Int32 size, OracleQueueDequeueOptions deqOptions)
at Devart.Data.Oracle.OracleQueue.DequeueArray(Int32 size)
at EEG_iConsumer.Form1.TestAQ() in C:\Source\EEG_iConsumer\EEG_iConsumer\EEG_iConsumer\Form1.vb:line 51
at EEG_iConsumer.Form1.Button1_Click(Object sender, EventArgs e) in C:\Source\EEG_iConsumer\EEG_iConsumer\EEG_iConsumer\Form1.vb:line 117
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at EEG_iConsumer.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Thanks for any help.
ppvdude
 
Posts: 3
Joined: Mon 23 Mar 2009 21:46
Location: Pennsylvania

Postby Shalex » Tue 24 Mar 2009 14:44

I have checked the following code with the 5.20.24 version of dotConnect for Oracle. It works fine.
Code: Select all
OracleConnection oracleConnection =
new OracleConnection("User Id=system;Password=manager;Server=ora1020;Direct=False;");
oracleConnection.Open();
OracleQueueTable oracleQueueTable =
new OracleQueueTable("QUEUE_TABLE_MESSAGE", oracleConnection);
// Set the table to be multiconsumer.
oracleQueueTable.Options.MultipleConsumers = true;
oracleQueueTable.Options.PayloadTypeName = "RAW";
oracleQueueTable.CreateQueueTable();
OracleQueueAdmin oracleQueueAdmin =
new OracleQueueAdmin("MESSAGE_QUEUE", "QUEUE_TABLE_MESSAGE", oracleConnection);
oracleQueueAdmin.CreateQueue();
oracleQueueAdmin.StartQueue();

// Register Bob  as known recipient.
// This is required to send messages to Bob personally.
oracleQueueAdmin.AddSubscriber(new OracleQueueAgent("Bob"));
OracleQueue oracleEnqueueQueue = new OracleQueue("MESSAGE_QUEUE", oracleConnection);

// These messages will be delivered to Bob only.
  OracleQueueAgent bob = new OracleQueueAgent("Bob");
  for (int i = 0; i < 100; i++) {
    OracleQueueMessage message1 = new OracleQueueMessage();
    message1.StringPayload = "Message for Bob." + i;
    message1.MessageProperties.RecipientList.Add(bob);
    oracleEnqueueQueue.Enqueue(message1);
  }

  // Create an object that receives the messages.
  OracleQueue oracleDequeueQueue = new OracleQueue("MESSAGE_QUEUE", oracleConnection);
  oracleDequeueQueue.AsyncNotification = false;
  try {
    oracleDequeueQueue.DequeueOptions.Navigation = OracleQueueNavigation.NextMessage;
    oracleDequeueQueue.DequeueOptions.DequeueMode = OracleQueueDequeueMode.Remove;
    oracleDequeueQueue.DequeueOptions.ConsumerName = "Bob";
    oracleDequeueQueue.DequeueOptions.Visibility = OracleQueueVisibility.Immediate;
    OracleQueueMessage[] msg = oracleDequeueQueue.DequeueArray(100);
    for (int i = 0; i < 100; i++){
       if (msg[i] != null && msg[i].StringPayload != null) {
         if (i % 10 == 9) {
           MessageBox.Show(msg[i].StringPayload);
         }
       }
     }
   }
   catch (OracleException ex) {
     MessageBox.Show(ex.Message);
   }
  oracleQueueAdmin.StopQueue();
  oracleQueueAdmin.DropQueue();
  oracleQueueTable.DropQueueTable();
  oracleConnection.Close();

What versions of dotConnect for Oracle, Oracle client and Oracle server are you using?
Please post here the full text of your code. We will try to reproduce the error.
Shalex
Devart Team
 
Posts: 7149
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle