Internal error 1247 in module 19

tondiegotondiego Member Posts: 2
Dynamics Navision 4.0 SP1

It occurs just too often. I know the reason (This problem may occur when you handle a new transaction inside a transaction.), but don't know how to resolve this. It's Navision bug. Does anybody know, how to resolve this problem? I've searched for hot fixes (Partnersource), but only what I've found was this problem should be resolved in some service pack for Dynamics Navision 5.01. OK, good for them, but what about others?

Any ideas?
Thank you.

Comments

  • ThetybThetyb Member Posts: 1
    Hi,
    For version 4, look at the KB article 948824 on microsoft.
    I hope it will help you
  • crisnicolascrisnicolas Member Posts: 177
    I've got this error and I'm really confused. I don't think it is caused by a deadlock...

    I'm using a NAS to do some processing.
    The NAS is running all day on an endless loop, looking for records to process. After processing every record, I do a COMMIT to unlock tables used by the NAS.
    I do also do some kind of error control, so that if a record throws an error, the NAS can move to the next record and forget about the first one.

    Here is the code for the endless loop and the error control:
    WHILE TRUE DO
    BEGIN
      Table1.RESET;
      Table1.SETRANGE("Error Field",FALSE);
      IF Table1.FIND('-') THEN
      REPEAT
        CLEAR(Codeunit1);
        Codeunit1.FunctionToSetRecordToProcessAsGlovalVarOnCodeunit(Table1);
        IF NOT Codeunit1.RUN THEN
        BEGIN
          FunctionToInsertErrorMessageAsCommentOnRecord(Table1,GETLASTERRORTEXT);
          CLEARLASTERROR;
          Table1."Error Field" := TRUE;
          Table1.MODIFY;
        END;
        COMMIT;
      UNTIL Table1.NEXT = 0;
    END;
    

    And here the code on the OnRun trigger
      Table1Lines.SETRANGE("Document No.",Table1GlobalVar."Document No.");
      //*****
      // Here the processing code for both header (the global var that the previous function passed to the codeunit) and its lines
      //*****    
    
      Table2.INIT;
      Table2.TRANSFERFIELDS(Table1GlobalVar);
      Table2.INSERT;
    
      IF Table1Lines.FINDSET THEN
      REPEAT
        Table2Lines.INIT;
        Table2Lines.TRANSFERFIELDS(Table1Lines);
        Table2Lines.INSERT;
      UNTIL Table1Lines.NEXT = 0;
    
      Table1GlobalVar.DELETE;
      Table1Lines.DELETEALL;
    

    Table2Lines.INSERT gives an error because the line already exists.
    Ok, this can happen. But... the error control on the function that does codeunit.RUN should catch it...
    It is catching many other errors (the blocked error when trying to insert item on a transfer line and the item is blocked, error saying that Quantity cannot be less than shipped quantity if the process tries to reduce quantity on a partially posted transfer line, etc. etc.).
    I've even seen the error that is poping now about line already existing on Table2Lines on my error control table...
    I've also seen on my error control table a record that could not be processed because of locking.

    But now... instead of catching the error and moving on... I do see the error message on the server's Event Viewer, and right after the error, there is another event on the Event Viewer that says: Internal error 1247 in module 19.

    It cannot be a deadlock, as the NAS starts (and has got the error) at midnight and there are no users at that time...
    It could have locks on some other times, as the NAS is running all day long and at some point, of course, there are users on the database... but this particular one, at midnight, it is impossible!

    Any help will be really appreciated
  • crisnicolascrisnicolas Member Posts: 177
    Thetyb wrote:
    Hi,
    For version 4, look at the KB article 948824 on microsoft.
    I hope it will help you

    I'm not in version 4, but in version 5.01.
    KB says: This problem may occur when you handle a new transaction inside a transaction
    And it provides new exes to solve the problem.

    Does anyone know if there are new exes for 5.01 as well?
    Or could anyone tell me if somewhere in my code I'm "handling a new transaction inside a transaction"?
  • crisnicolascrisnicolas Member Posts: 177
    I've run the endless loop manually, not using the NAS... and the internal error is thrown in line Table1GlobalVar.DELETE;

    Why? I don't understand it... there is one record that is causing problems...
    I've manually checked "Error Field" on that record, and the NAS was able to process a bunch of other records.
    I've stopped the NAS, unchecked "Error Field" manually and run the endless loop manually and keep on getting the same internal error.
    Am I locking myself somehow?
  • BeliasBelias Member Posts: 2,998
    sorry for necroposting...but i have to download this darn KB and i cannot find the link (google and bing couldn't help, and needless to say, https://mbs2.microsoft.com/Knowledgebase/search.aspx didn't give any result, as always :evil: )
    someone can help?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • KYDutchieKYDutchie Member Posts: 345
    I think this is the link to the hotfix:
    https://mbs2.microsoft.com/Knowledgebase/kbdisplay.aspx?wtntzsmnwukntmmyvlxuzlwukkqpovrvxytuqpskvuxozzwm

    let me know if you can download it.

    Regards,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • BeliasBelias Member Posts: 2,998
    Great, i owe you one :wink:
    just a question: how did you find it?!?!?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • KYDutchieKYDutchie Member Posts: 345
    You are welcome :)

    Actually.....I used the Knowledge base search https://mbs2.microsoft.com/Knowledgebase/search.aspx and searched on '948824' :whistle:
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • BeliasBelias Member Posts: 2,998
    it doesn't work for me (as you can see, I already tried - and now, retried - to use the search for the kb id)..there must be something messy with my account...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Belias wrote:
    it doesn't work for me (as you can see, I already tried - and now, retried - to use the search for the kb id)..there must be something messy with my account...

    I have the same problem. I wonder if there isn't some IP blocking on mbs.microsoft.com that is causing problems. Or maybe the log in account.
    David Singleton
Sign In or Register to comment.