Archived

This forum has been archived. Please start a new discussion on GitHub.

Question regarding to run IceBox service

I am writing a simple program to run the IceBox java services.
The simple configuration for the IceBox is like below:

IceBox.InstanceName=ServiceIceBox
IceBox.ServiceManager.Endpoints=tcp -p 10000
IceBox.ServiceManager.RegisterProcess=1
IceBox.Service.SimpleTest=service.MessageServiceI
SimpleTest.Endpoints=tcp -p 10001


But when I use the command to run the IceBox:
java IceBox.Server ‑‑Ice.Config=./service.cfg

I got the exception like below:
error: ServiceManager: Ice.InitializationException
reason = "object adapter "IceBox.ServiceManager" requires configuration."
Ice.InitializationException
reason = "object adapter "IceBox.ServiceManager" requires configuration."
at Ice.ObjectAdapterI.<init>(ObjectAdapterI.java:789)
at IceInternal.ObjectAdapterFactory.createObjectAdapter(ObjectAdapterFactory.java:183)
at Ice.CommunicatorI.createObjectAdapter(CommunicatorI.java:71)
at IceBox.ServiceManagerI.run(ServiceManagerI.java:131)
at IceBox.Server.run(Server.java:50)
at Ice.Application.main(Application.java:114)
at Ice.Application.main(Application.java:30)
at IceBox.Server.main(Server.java:28)

To my understand, the only necessary configuration for ServiceManager is the endpoints. Is there anything I am missing?

Thanks,
Zao

Comments

  • matthew
    matthew NL, Canada
    I'm not sure what you are exactly doing wrong ... very likely you are not using the configuration that you expect. I tried a very similar configuration with demo/IceBox/hello and everything works fine.

    Your configuration does have some issues, but none that cause the error that you have described:

    - You have defined RegisterProcess, but you have no corresponding locator defined. This will cause a warning to be issued.
    - You are defining the service endpoints in the icebox configuration file, however, you are not using property inheritance (IceBox.InheritProperties=1). Therefore, the service will not see the properties.