dev@glassfish.java.net

BLOCKING: NPE in GrizzlyService.java

From: Bobby Bissett <bobby.bissett_at_oracle.com>
Date: Wed, 29 Sep 2010 15:52:21 -0400

Howdy,

In GrizzlyService#postConstruct(), there's this:

    public void postConstruct() {
        NetworkConfig networkConfig = config.getNetworkConfig();
        configListener = new DynamicConfigListener();
        ObservableBean bean = (ObservableBean) ConfigSupport.getImpl(networkConfig.getNetworkListeners());
        // etc
    }

But in clustered instances after an upgrade, there is no network-config element and so the networkConfig object is null. Thus: NPE. To be more specific, there is no <network-config> object under /domain/configs/config[@name='mycluster-config'] but there is one under /domain/configs/config[@name='server-config']

My question: is there always supposed to be a network-config object? IOW, is this a bug during upgrade or a bug during runtime?

Thanks,
Bobby