I am not sure which config is causing the issue.  You can start testing it by 
calling
assert org.apache.storm.utils.Utils.isValidConf(conf);
as you add things to the config to find which config is causing the issues.  
Sadly the code does not provide any information about what it didn't like about 
the config.
You can look at the code for the validity check

https://github.com/apache/storm/blob/v1.1.0/storm-core/src/jvm/org/apache/storm/utils/Utils.java#L476-L502
It should not be too hard to modify it to at least log which entries are 
different when it does the check.

- Bobby


On Thursday, July 20, 2017, 2:44:48 AM CDT, kalliopi kalantzaki 
<tsantalos-spa...@yahoo.gr> wrote:

Hello,
I am trying to pass to storm configuration an object (not priminitive type), 
the AESEncryption.class. I created a custom kryo serializer the AESSerializer 
class and in main topology i used: 
Config conf=new Config();conf.registerSerialization(AESEncryption.class, 
AESSerializer.class);conf.setFallBackOnJavaSerialization(false);
LocalCluster cluster = new 
LocalCluster();cluster.submitTopology("stormKafkaTopology", conf, 
builder.createTopology());
public class AESEncryption{

    public static final String cypherAlgorithm = "AES/CBC/PKCS5Padding";
    private SecretKey privateKey;.
    private IvParameterSpec entrophy;
    private String encryptedMsg;
    public static final int bitLength = 256;
... setters getterss methods}

public class AESSerilizer extends Serializer<AESEncryption> implements 
Serializable {

    public AESSerilizer() {
    }

    @Override
    public void write(Kryo kryo, Output output, AESEncryption object) {


        kryo.writeClassAndObject(output, object);

    }

    @Override
    public AESEncryption read(Kryo kryo, Input input, Class<AESEncryption> 
type) {
        return (AESEncryption) kryo.readClassAndObject(input);
    }

}
However, even using kryo serialization i always get the same 
exception....Problem initializing cluster topology:
java.lang.IllegalArgumentException: Topology conf is not json-serializable
    at org.apache.storm.testing$submit_local_topology.invoke(testing.clj:308) 
~[storm-core-1.1.0.jar:1.1.0]
    at 
org.apache.storm.LocalCluster$_submitTopology.invoke(LocalCluster.clj:49) 
~[storm-core-1.1.0.jar:1.1.0]
    at org.apache.storm.LocalCluster.submitTopology(Unknown Source) 
~[storm-core-1.1.0.jar:1.1.0]
    at 
com.jrtechnologies.ifg.bsp.kafka.storm.StormKafkaStarter.main(StormKafkaStarter.java:117)
 [classes/:?]

Any ideas what am i doing wrong? 

Reply via email to