Greetings..
I am having an issue thrying to add Glacier2 support to the IcePack Simple demo. The Glacier2 service runs fine, but I can not use IcePack Queries through it. This is the error message I get:
I have made very few changes to the code:Code:C:\Dev\Test>client.exe .\Outgoing.cpp:359: Ice::ObjectNotExistException: object does not exist identity: IcePack/Query facet: operation: ice_isA
andCode:#include <Ice/Ice.h> #include <Glacier2/Router.h> #include <IcePack/Query.h> #include <Hello.h>
Other than that all the code is identical. I made sure to link glacier2d.lib. I also made some changes to the config file for the client (config)Code:int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::RouterPrx defaultRouter = communicator->getDefaultRouter(); Glacier2::RouterPrx router = Glacier2::RouterPrx::checkedCast(defaultRouter); string username = "test"; string password = "test"; try { router->createSession(username, password); } catch(const Glacier2::PermissionDeniedException& ex) { cout << "permission denied:\n" << ex.reason << endl; } catch(const Glacier2::CannotCreateSessionException& ex) { cout << "cannot create session:\n" << ex.reason << endl; } Ice::PropertiesPtr properties = communicator->getProperties(); IcePack::QueryPrx query = IcePack::QueryPrx::checkedCast(communicator->stringToProxy("IcePack/Query")); Ice::ObjectPrx base = query->findObjectByType("::Demo::Hello"); HelloPrx twoway = HelloPrx::checkedCast(base->ice_twoway()->ice_timeout(-1)->ice_secure(false));
and for IcePack (config.icepack)Code:# # The proxy to the Glacier2 router for all outgoing connections. This # must match the value of Glacier2.Client.Endpoints in config.glacier2. # Ice.Default.Router=Glacier2/router:ssl -p 10005 Ice.Default.Locator=IcePack/Locator:default -p 12000 # # No active connection management is permitted with Glacier2. # Connections must remain established. # Ice.ConnectionIdleTime=0 # # Ice.MonitorConnections defaults to Ice.ConnectionIdleTime, which we # set to 0 above. However we still want the connection monitor thread # for AMI timeouts (for completeness, even if this demo doesn't use # AMI). # Ice.MonitorConnections=60 # # Connection retry is not possible with Glacier2. Connections must # remain established. # Ice.RetryIntervals=-1 # # Other settings. # #Ice.Trace.Network=1 #Ice.Trace.Protocol=1 Ice.Warn.Connections=1 Ice.Plugin.IceSSL=IceSSL:create IceSSL.Client.CertPath=certs IceSSL.Client.Config=sslconfig.xml IceSSL.Server.CertPath=certs IceSSL.Server.Config=sslconfig.xml #IceSSL.Trace.Security=1
I am not sure what is causing the error, and I was hoping you could help out. Thanks.Code:# # This configuration file is used to configure an icepack node with a # collocated registry. # # # Enable ACM. # Ice.ConnectionIdleTime=30 # # IcePack registry configuration # IcePack.Registry.Client.Endpoints=default -p 12000 IcePack.Registry.Server.Endpoints=default IcePack.Registry.Internal.Endpoints=default IcePack.Registry.Admin.Endpoints=default IcePack.Registry.Data=db/registry # # IcePack node configuration. # IcePack.Node.Name=node IcePack.Node.Endpoints=default IcePack.Node.Data=db/node IcePack.Node.CollocateRegistry=1 #IcePack.Node.PropertiesOverride=Ice.Default.Host=127.0.0.1 #IcePack.Node.WaitTime=360 # # Trace properties to debug activation problems. # IcePack.Node.Trace.Activator=2 IcePack.Node.Trace.Adapter=2 IcePack.Node.Trace.Server=2 Ice.Default.Locator=IcePack/Locator:default -p 12000

Reply With Quote