ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zbyszek <zbab...@yahoo.com>
Subject Create BinaryObject without starting Ignite?
Date Mon, 15 Jan 2018 15:08:21 GMT
Hello Igniters,

Is it possible to create BinaryObject without starting Ignite?

I was trying the following:

    private static BinaryObject createPrototype() throws
IgniteCheckedException {
        // based on
        IgniteConfiguration iCfg = new IgniteConfiguration();
        BinaryConfiguration bCfg = new BinaryConfiguration();
        BinaryContext ctx = new
BinaryContext(BinaryCachingMetadataHandler.create(), iCfg, new
        BinaryMarshaller marsh = new BinaryMarshaller();
        marsh.setContext(new MarshallerContextImpl(null));
        IgniteUtils.invoke(BinaryMarshaller.class, marsh,
"setBinaryContext", ctx, iCfg);
        BinaryObjectBuilder builder = new BinaryObjectBuilderImpl(ctx,
        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

Thank you for your help,

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

View raw message