session.warn: [35] org.adempiere.exceptions.AdempiereException: Context lost

Description

i found this in logs, can be bug ?

Environment

None

Activity

Show:
Carlos Ruiz
August 27, 2020, 9:24 AM

Hi ,

I saw this problem recently on a plugin that used wrongly Env.setCtx - the comment on that method says:

Replace the contents of the current session/process context.
Don't use this to setup a new session/process context, use ServerContext.setCurrentInstance instead.

Also, see the comment here:
https://idempiere.atlassian.net/browse/IDEMPIERE-4300?focusedCommentId=44787&oldIssueView=true&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-44787

A background process, can define its own context but that should be through the ServerContext.setCurrentInstance(Properties) method, not by passing a plain Properties object around. After the setCurrentInstance call, Env.getCtx() should be use after that.

Regards,

Carlos Ruiz

Norbert Bede
August 27, 2020, 10:32 AM

thanks. for the suggestion.

Assignee

Unassigned

Reporter

Norbert Bede

Labels

None

Tested By

None

Priority

Major
Configure