minizao
9th May 2005, 12:34
Hi all,

i'm having some problems working with AFS... Sometimes i got this error BW Message :
1 : message_loop_nesting error, nesting level = 2 (should be 1)
2 : message_loop_nesting error, nesting level = 1 (should be 0)

Does anyone have any idea of what is this error?

regards,

Nuno

mark_h
9th May 2005, 15:43
Never seen this error. Is there a specific session you are having problems with?

minizao
9th May 2005, 16:34
Hi Mark,

this error it seams to happen when i execute 2 sessions at the same time...
The session that was run, it was : tdinv1120m000
What's happen when 2 users execute the same session at same time in the same order???

mark_h
9th May 2005, 16:42
You might want to check objects to make sure you have the latest. We run receiving sessions at multiple sites using multiple sessions without any problems.

minizao
9th May 2005, 17:04
You might want to check objects to make sure you have the latest.

They have instaled in BAAN4 :
- Service Pack 15
- Porting Set 6.1c.07.02
- Port number PA.2376

It's enought to work fine with this?

thnks

mark_h
9th May 2005, 17:16
You may just need the latest stpapi objects. Your service pack info is higher than our production.(6.1c.07.01). I think we are Service pack 16. On May 20th we will be installing service pack 18 (I think) with porting set 6.1c.07.04. We have tested all of my applications, but I am not sure a complete stress test was involved. Then again it could be combination of errors or something unique to your setup. I know we have limited the number of records a few of my function servers run. I have one to delete GRP production orders - if you delete a 1000 it will error out. But if you run it 10 times for 100 each it will work(without closing my session or anything).

minizao
9th May 2005, 18:25
ok...
I will see if they has the latest version of stapi instaled...

The code i execute it's something like this :


Public Function ManterRecontagem(ByVal Ordem As String, ByVal Armazem As String, ByVal Artigo As String, ByVal NrSequencia As String, ByVal StockAcumulado As String) As String

Dim Ret, ErrMessage1, ErrMessage2 As String
Dim CodLocalizacao As String

dllFunction = "tdinv0501m000f.put.armaz_m(" + Chr(34) + Armazem + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANArtigoPorArmazemdll, dllFunction, BaanMessage)

dllFunction = "tdinv0501m000f.put.artigo(" + Chr(34) + Artigo.ToUpper + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANArtigoPorArmazemdll, dllFunction, BaanMessage)
If RetMsg <> "0" Then Escreve_LOG(RetMsg)

dllFunction = "tdinv0501m000f.find( )"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANArtigoPorArmazemdll, dllFunction, BaanMessage)
If RetMsg <> "0" Then Escreve_LOG(RetMsg)
Ret = BAANObj.returnvalue.ToString
If Ret <> "1" Then
ManterRecontagem = "E: Art. Arm. n existe"
dllFunction = "tdinv0501m000f.end(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANArtigoPorArmazemdll, dllFunction, BaanMessage)
Else
dllFunction = "tdinv0501m000f.get.localiza_o_de_stock( )"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANArtigoPorArmazemdll, dllFunction, BaanMessage)
CodLocalizacao = BAANObj.returnvalue.ToString

dllFunction = "tdinv0501m000f.end(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANArtigoPorArmazemdll, dllFunction, BaanMessage)

dllFunction = "tdinv1120m000f.put.Ordem_de_recontagem(" + Ordem + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)

dllFunction = "tdinv1120m000f.put.Armaz_m(" + Chr(34) + Armazem + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)

dllFunction = "tdinv1120m000f.put.n_mero_de_sequ_ncia(" + NrSequencia + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)

dllFunction = "tdinv1120m000f.put.Localiza_o_de_stock(" + Chr(34) + CodLocalizacao + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)

dllFunction = "tdinv1120m000f.put.Artigo(" + Chr(34) + Artigo.ToUpper + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)

dllFunction = "tdinv1120m000f.find( )"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)
Ret = BAANObj.returnvalue.ToString
If Ret <> "1" Then

ManterRecontagem = "E: Art. n existe na ordem"

dllFunction = "tdinv1120m000f.end(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)
Else
dllFunction = "tdinv1120m000f.put.Stock_contado(" + StockAcumulado + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)

dllFunction = "tdinv1120m000f.update(" + do_update + "," + Chr(34) + ErrMessage1 + Chr(34) + ")"
ErrMessage2 = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)
ErrMessage2 = BaanMessage

dllFunction = "tdinv1120m000f.get.last.message.code()"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)
ErrMessage1 = BaanMessage
If ErrMessage1 <> Nothing Then
ManterRecontagem = "E: " + ErrMessage1
Else
If ErrMessage2 = "0" Then
ManterRecontagem = "E: Erro Recontagem"
Else
'Function to save an update/insert/delete in session tdinv1120m000
ErrMessage1 = "errmessage"
dllFunction = "tdinv1120m000f.save(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)
Ret = BAANObj.ReturnValue.ToString

ManterRecontagem = "1"

End If
End If

dllFunction = "tdinv1120m000f.end(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
RetMsg = ClBAAN.SendToBAAN(BAANObj, BAANInst, BAANManterRecontagemdll, dllFunction, BaanMessage)

End If
End If

End Function~

mark_h
9th May 2005, 20:02
I did not realize that this was coming from VB. Your client could also be the problem.

minizao
9th May 2005, 20:15
Thanks Mark,

i'll see what he has instaled about stpapi... Then i'll notice...

regards,

Nuno

minizao
10th May 2005, 12:43
Hi Mark,

how can i see the version of stpapi that my client has instaled?

mark_h
10th May 2005, 15:42
Actually I have never worried about the stpapi versions - I document the problem sent it to my Baan admin person and he takes care of contacting Baan. I think you can see it using the bic_info command. The one time I tried using the OLE piece(on 4C3) going into production I had a problem I got some kind of base_extern stpapi error. Called Baan and they gave us a new client and new porting set, when that did not solve the problem they said they do not support it. Never messed with it after that.

shaboo
10th May 2005, 16:24
I have seen that error and in our case it had nothing to do with AFS. We use WorkTop and during execution of one of our custom report, we will get this error. We have not yet figured out what is causing this problem but it happens when we run this complex report.

minizao
10th May 2005, 18:26
My problem is when i execute one function with the same session at same time for 2 terminals.

to Terminal ID 1 - call execSessiontdinv1120()
to Terminal ID 2 - call execSessiontdinv1120()

I solved the problem by having making my thread sleeping until first terminal ends it proccess...

Nuno