Customfield-type module - issue search within getVelocityParameters() returns no results after Jira restart

I am creating a customfield type, that extends GenericTextCFType and overrides getVelocityParameters().
Part of code is retrieving list of issues by JQL (SearchService).
Weird thing is, that all works ok after plugin is installed until Jira is re-started. After that search in code returns no results (getResults() is empty).
Once the plugin is re-installed, all is ok again (even disabling - enabling doesn’t help).
Tried also re-indexing after restart, but it doesn’t help - plugin must be reinstalled for everything work ok again.

Could this be related to the fact, that needed components are imported only, when class is initiated?

public AdvanceInvoiceField(@ComponentImport CustomFieldValuePersister customFieldValuePersister,
@ComponentImport GenericConfigManager genericConfigManager,
@ComponentImport TextFieldCharacterLengthValidator textFieldCharacterLengthValidator,
@ComponentImport JiraAuthenticationContext jiraAuthenticationContext,
@ComponentImport IssueManager issueManager,
@ComponentImport SearchService searchService) {
super(customFieldValuePersister, genericConfigManager,textFieldCharacterLengthValidator, jiraAuthenticationContext);
this.jiraAuthenticationContext = jiraAuthenticationContext;
this.issueManager = issueManager;
this.searchService = searchService;

But on the other hand - all code works ok (query is parsed successfully, e.g.) - just search returns no issues.

Found the problem.
Turned out, that instance of logged in user must be initiated in getVelocityParameters() method.
Problem solved!