cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Error "The object was stale" when running Batch

ChristopheLaudo
1-Newbie

Error "The object was stale" when running Batch

Hi, I have the attached Batch which add some users as Product Managers on Product in a list on file
When running on clone system on Windows I have not problem. When I run it on production on Solaris I have an error "The object was stale User: ..."
Any suggestions?
Thanks
1 REPLY 1

if anyone interested:

I have just read my basic info about Garbage collection and I have found the solution.

It is a matter of using loops appropriately: I had 4 Loops searching for users and then a loop going through products and trying to update with previously found user. Except as these users where found in another loop the Garbage collector defined them as being removable from memory.

Now I have a code that takes longer but works as for each user, I call a function that updates all Products to ensure we do not loose the user definition
Top Tags