Archived

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

Cannot get IceStorm working on Android

Some context: Ice 3.3.1, IceAndroid 0.1.1, Android SDK 2.3, JDK 1.6, XP

I am a new Ice user, have used CORBA for many years, and sure enjoy the "lightness" of my experimentation so far. I have successfully 'run' the helloWorld example from the Android Emulator to the "server" running on my PC and have successfully "run" the IceStorm demo publishing 'time' from a publisher to a subscriber. Very easy, very fast.

I am now trying to run the equivalent of the IceStorm "weather measurement" example where my Android emulator will display the various data fields in the example (windspeed, direction, etc) being published from my PC. I am sure that I am simply being a knuckehead, but I am not having success establishing connectivity between the android emulator and the IceStorm service I am running from the "demoj/Icestorm/Clock" directory using the following command line:

$ icebox --Ice.Config=config.icebox

The emulator croaks with a "local.exception" on the checkedcast operation in the fragment below:

try {

Ice.Communicator communicator = Ice.Util.initialize();
String s = "DemoIceStorm/TopicManager:default -h " +
DEFAULT_HOST + " -p 10000";
Ice.ObjectPrx obj = communicator.stringToProxy(s);

IceStorm.TopicManagerPrx topicManager =
IceStorm.TopicManagerPrxHelper.checkedCast(obj);

//the cast above always fails and hits a catch for "Ice.LocalException"
//not shown here.
}

The String 's' above is the same as what the subscriber uses in the clock/IceStorm demo...but I have added the -h paramater as being "10.0.2.2". I have tried UDP, TCP, and Default as the transport params, I have tried checked/unchecked conversion....and the stacktrace, when using TCP is as follows:

Ice.LocalException
IceInternal.Network.createTcpSocket(Network.java:130)
IceInternal.TcpTransceiver.<init>(TcpTransceiver.java:355)
IceInternal.TcpConnector.connect(TcpConnector.java:22)
IceInternal.OutgoingConnectionFactory$ConnectCallback.nextConnector(OutgoingConnectionFactory.java:1159)
IceInternal.OutgoingConnectionFactory.getConnection(OutgoingConnectionFactory.java:751)
IceInternal.OutgoingConnectionFactory.access$600(OutgoingConnectionFactory.java:12)
IceInternal.OutgoingConnectionFactory$ConnectCallback.getConnection(OutgoingConnectionFactory.java:1129)
IceInternal.OutgoingConnectionFactory$ConnectCallback.connectors(OutgoingConnectionFactory.java:1055)
IceInternal.EndpointHostResolver.run(EndpointHostResolver.java:94)
IceInternal.EndpointHostResolver$HelperThread.run(EndpointHostResolver.java:146)

I was unable to find a solution for this problem in existing posts....and am probably being a major knucklehead who is so far wrapped around the axle that an obvious solution is no longer visible.

Thanks in advance for any enlightenment.

Comments

  • The software gods sometimes do show kindness....

    ...it is not often....but maybe this is an omen for the New Year? My house lost power, all of my electronics restarted, my project auto-cleaned, and somehow, the fragment I posted now runs without exception. Emulator process unknowingly running in the background??? Who knows...glad to be rolling....and thanks to the people who took the time to have a "read" of my post!

    May the software gods show kindness to all of you this New Year as well!