Search code examples
serviceeclipse-scouteclipse-neon

Eclipse Scout Neon : service registry does not contain a service of type


I try to call scout service from Scout Form, so I create interface in shared folder

@TunnelToServer
public interface IPersonsFormService extends IService {

  void test();
}

and in server I created implementation of this interface

public class PersonsFormService implements IPersonsFormService {

  @Override
  public void test() {

    System.out.println("TEST");

  }

}

but I get

o.e.scout.rt.platform.exception.ExceptionHandler - SecurityException:service registry does not contain a service of type com.sixt.leasing.contract.scout.shared.person.IPersonsFormService [majorPrincipal: 'marko']
java.lang.SecurityException: service registry does not contain a service of type com.sixt.leasing.contract.scout.shared.person.IPersonsFormService

It looks like interface is not registered, but in Neon I thought that service is registered with @TunnelToServer annotation.

Where else should I register service ?

This project is extension project of main project.

In Main project all services works,....


Solution

  • Solution: put scout.xml with default content in src/main/resources/META-INF folder of the server project.

    Why did this happen? Since this is an extension we apparently forgot to copy this file and Scout Neon seems to ignore projects that don't contain this file.

    Figured this out by putting a PlatformListener in that project and since that never triggered it was easier to track down the issue.