Service is not registered in LocalServiceDirectory

In my project I have an extended login window with overridden method login() where I try to use a middleware service bean:

@Override
public void login() {
  super.login();
  SomeService someService = AppBeans.get(SomeService.class);
  someService.someServiceMethod();
}

but get the error “Service app-core/sample_SomeService is not registered in LocalServiceDirectory”.
What’s wrong and how can I call the method without the error?
SomeService interface is declared in global module, SomeServiceBean implemented in core.
The service is registered in the web-spring.xml file of the web module.
Call of the method from middleware modules doesn’t lead to the error.
Platform version 6.3.4.

I found my fault, SomeServiceBean had the @Component annotation instead of @Service