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

How to add an object to node by using AdminPrx?

Hi, all.

I want to deploy applications to servers shown as attachment(ServerTopLogic.png).

I startup icegridregistry and icegridnode at my Linux operating system, and I want to add an object to it, so write the following code:
package Demo.main;

import Demo.impl.HelloImpl;
import Ice.ObjectAdapter;

public class AddObject extends Ice.Application {
	public int run(String[] args) {
		try {
			IceGrid.RegistryPrx registry = IceGrid.RegistryPrxHelper
			IceGrid.AdminSessionPrx session = registry.createAdminSession(
					"foo", "bar");
			IceGrid.AdminPrx admin = session.getAdmin();
			ObjectAdapter adapter = communicator().createObjectAdapter(
			Ice.Identity ident = communicator().stringToIdentity("HelloObject");
			Ice.ObjectPrx factory = adapter.add(new HelloImpl(), ident);
			try {
			} catch (IceGrid.ObjectExistsException e) {

		} catch (Exception e) {
		return 0;

	public static void main(String[] args) {
		AddObject app = new AddObject();
		int status = app.main("Admin", args, "client.cfg");

But the program can't work, and the error message is:
    reason = "object adapter "HelloAdapter" requires configuration."
	at Ice.ObjectAdapterI.<init>(
	at IceInternal.ObjectAdapterFactory.createObjectAdapter(
	at Ice.CommunicatorI.createObjectAdapter(
	at Ice.Application.main(
	at Ice.Application.main(
	at Demo.main.AddObject.main(

What is the problem?