Hello Igniters,

Is it possible to create BinaryObject without starting Ignite?

I was trying the following:

    private static BinaryObject createPrototype() throws
IgniteCheckedException {
        // based on
http://apache-ignite-users.70518.x6.nabble.com/Working-Directly-with-Binary-objects-td5131.html
        IgniteConfiguration iCfg = new IgniteConfiguration();
        BinaryConfiguration bCfg = new BinaryConfiguration();
        iCfg.setBinaryConfiguration(bCfg);
        BinaryContext ctx = new
BinaryContext(BinaryCachingMetadataHandler.create(), iCfg, new
NullLogger());
        BinaryMarshaller marsh = new BinaryMarshaller();
        marsh.setContext(new MarshallerContextImpl(null));
        IgniteUtils.invoke(BinaryMarshaller.class, marsh,
"setBinaryContext", ctx, iCfg);
        BinaryObjectBuilder builder = new BinaryObjectBuilderImpl(ctx,
"MyBinaryName");
        builder.setField("f1", (String) null);
        builder.setField("f2", (String) null);
        builder.setField("f3", (String) null);
        BinaryObject res = builder.build(); //  ---> throws NPE here
        return res;
    }

but this throws NPE on builder.build() due to null transport member in
MarshallerContextImpl.

Thank you for your help,
zbyszek



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to