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

Ice 3.5.1 java client needs user factory to instantiate class with no operations


I have a slice definition like:
module Samples {
    sequence<float> FloatArray;

    class OrderedSequence {

    /* a numeric sequence with a regular interval */
    class RegularSequence extends OrderedSequence {
        float min;
        float max;
        float step;

    /* a numeric sequence with arbitrary intervals */
    class SampledSequence extends OrderedSequence {
        FloatArray samples;

    /* a series of 'y' samples, measured along some sequence 'x' */
    struct Samples {
        OrderedSequence x;
        FloatArray y;

    interface Graph {
        Samples getSamples(int id);

When my java client calls getSamples(), ICE bails with a message like "compact format prevents slicing (the sender should use the sliced format instead)".

Eventually I figured out what that meant and added ["format:sliced"] to the getSamples operation, only to have ICE bail with NoObjectFactoryException.

If I register an ObjectFactory with the client's Communicator for the RegularSequence/SampledSequence types everything works.

The documentation suggests that the runtime should be able to instantiate this class without my intervention, since my classes do not define any operations -- yes?

Observed with both C++ and C# servers. Sorry I don't have concrete code to reproduce, already spent too much time tracking this down.


  • benoit
    benoit Rennes, France

    Are you using the
    metadata for your Slice definitions? If you do, you need to configure the appropriate
    property. See Package Configuration Properties for more information on this configuration property.

    Without this property, Ice can't figure out the package where the classes were generated. The message you get from the exception is a bit mis-leading, we'll look into improving it for the next release!

  • Ah! Yes, I am using java:package, and setting Ice.Package.<module> does the trick. Sorry I failed to mention that detail initially.

    Thanks for the quick response Benoit!