I think you have to use
ObjectType obj = (objectType) context.get("objectname");
not
ObjectType obj = (objectType) stormConfig.get("objectname");On 1/24/15, clay teahouse <[email protected]> wrote: > Any feedback on what the issue could be would be appreciated. > I am getting an instance of Config and add my static objects to it and > want to access these objects in bolt's prepare method. > Config config = new Config(); > config.put("objectname", objectinstance); > > StormSubmitter.submitTopology(topologyname, config, > builder.createTopology()); > > And in bolt's prepare method, I try to extract the object. > > prepare(Map stormConfig,TopologyContext context) { > > ObjectType obj = (objectType) stormConfig.get("objectname"); > > } > > Object type is either String or ArrayList or HashMap. > > > On Sat, Jan 24, 2015 at 12:01 AM, clay teahouse <[email protected]> > wrote: > >> Hi, >> >> I am trying to pass some objects to the bolts through config, but I am >> not >> having much success. These objects are hashmap and arrarylists. I am >> assuming these are serializable. Any idea what could be wrong? >> >> thanks, >> Clay >> >> >
