locked
Fatal exception while firing a rule RRS feed

  • Question

  • Hi,

    I am having a problem when moving our NS application from dev environment to testing environment. What happens, is that when the rule is fired, a fatal exception is generated.

    Any hints how I can start hunting down what the source of the problem is. The thing is, this works in dev environment, but not in test. Further, if I try to execute the stored proc manually which fails (NS_MyAppApplication].[NSFire3]) I get the same error: A user request from the session with SPID 63 generated a fatal exception. SQL Server is terminating this session.

    Both dev and test environments use same ADF and ICF files. The ADF file is pretty much like in the InventoryTracker sample, using ConditionAction element like this:

               <ConditionAction>
                <SqlLogin>NSRulesEvaluator</SqlLogin>
                <SqlUser>NSRulesEvaluator</SqlUser>
                <InputName>InventoryTrackerEvents</InputName>
                <InputSchema>NS_InventoryTrackerApplication</InputSchema>
                <SqlExpression>

                  INSERT INTO [NS_InventoryTrackerApplication].[InventoryTrackerNotifications]
                  (
                  [SubscriberId],
                  [DeviceName],
                  [SubscriberLocale],
                  [ProductId],
                  [ProductName],
                  [ProductNumber],
                  [Quantity],
                  [LocationName]
                  )

                  (
                  SELECT
                  r.[Subscription.SubscriberId],
                  r.[Subscription.DeviceName],
                  r.[Subscription.SubscriberLocale],
                  r.[Input.ProductId],
                  r.[Input.ProductName],
                  r.[Input.ProductNumber],
                  r.[Input.Quantity],
                  r.[Input.LocationName]

                  FROM [NS_InventoryTrackerApplication].InventoryTrackerRule AS r
                  )
                </SqlExpression>
              </ConditionAction>


    I tried changing ADF to little simple version, using action element instead of conditionaction. This time I got it working (and before that normal error messages and not just a stack dump).

    Any hints how I can find out what is the problem here, or am I possibly missing something totally?

    //sami


    Both servers are as below:

    Microsoft SQL Server Management Studio        9.00.2047.00
    Microsoft Analysis Services Client Tools    2005.090.2047.00
    Microsoft Data Access Components (MDAC)        2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
    Microsoft MSXML                    2.6 3.0 6.0
    Microsoft Internet Explorer            6.0.3790.1830
    Microsoft .NET Framework            2.0.50727.42
    Operating System                5.2.3790




    These are entries from application log (in reverse order):

    -----------------------------------------------------------------------------------------------------

    Description: The running of the rule failed. Please check the rule.
    EventParameters:
      Application Name: MyApp
      Quantum ID: 4513
      Rule Firing ID: 17
      Rule Name: MyAppRule
      Notification Throttle: 1000
      Event Class ID: 1
      Subscription Class ID: 1
      Rule ID: 3
      Rule Action: INSERT INTO [NS_MyAppApplication].[MyAppNotifications]
                  (
                  [SubscriberId],
                  [DeviceName],
                  [SubscriberLocale],
                  [SomeData]
                  )

                  (
                  SELECT
                  r.[Subscription.SubscriberId],
                  r.[Subscription.DeviceName],
                  r.[Subscription.SubscriberLocale],
                  r.[Input.SomeData]
                  FROM [NS_MyAppApplication].MyAppRule AS r

                  )
      Stored Procedure Name: [NS_MyAppApplication].[NSFire3]

    SqlServerError:
      Error Number: 0
      Source: .Net SqlClient Data Provider
      Number: 0
      State: 0
      Class: 11
      Message: A severe error occurred on the current command.  The results, if any, should be discarded.
      Procedure:
      Line Number: 0

      Error Number: 1
      Source: .Net SqlClient Data Provider
      Number: 0
      State: 0
      Class: 20
      Message: A severe error occurred on the current command.  The results, if any, should be discarded.
      Procedure:
      Line Number: 0

    Description: A severe error occurred on the current command.  The results, if any, should be discarded.
    A severe error occurred on the current command.  The results, if any, should be discarded.
    InstanceName: MyAppInstance
    ApplicationName: MyApp
    Component: Generator
    Thread: 4

    -----------------------------------------------------------------------------------------------------

    Notification Services performed a quantum status update.
    EventParameters:
      Application Name: MyApp
      Quantum ID: 4513
      Status Code: 128
      Quantum Status Code: 135

    InstanceName: MyAppInstance
    ApplicationName: MyApp
    Component: Generator
    Thread: 4

    -----------------------------------------------------------------------------------------------------

    A user request from the session with SPID 57 generated a fatal exception. SQL Server is terminating this session.

    -----------------------------------------------------------------------------------------------------

    The generator has started firing a rule.
    EventParameters:
      Application Name: MyApp
      Quantum ID: 4513
      Rule Firing ID: 17
      Rule Name: MyAppRule
      Notification Throttle: 1000

    InstanceName: MyAppInstance
    ApplicationName: MyApp
    Component: Generator
    Thread: 4

    Tuesday, September 5, 2006 12:20 PM

All replies

  • I have been banging my head with this one. I tried creating the NS app from scracth. I managed to get it working again with <Action> element, using STMP notifications and XsltFormatter. After that I modified to solution, taking example from Shyams books userdefinedlogic sample. Got everything up and running, but when rule starts firing same thing happens again.


    After that, I disabled the generator and did the debugging procedures. All went fine up to
    NPPrepareRuleFiring. When I executed NSExecuteRuleFiring, bang! Fatal exception..  no  additional information, sigh.

    What I was wondering was that in the preparerulefiring resultset I got EventBatchId as null. Is this correct in this scenario?
    Wednesday, September 6, 2006 1:29 PM
  • Hi,
    have the same problem you have... did you find an answer?

    Thanks

    Ricardo Carvalho
    Wednesday, October 25, 2006 10:51 AM
  • Have not had any luck with this. As a workaround I am using <action> element instead of <conditionaction>. I don't like it, but at the moment I have no other solution.
    Tuesday, November 7, 2006 9:00 AM