Index: core/kernel/src/main/java/com/sun/enterprise/v3/admin/AdminConsoleConfigUpgrade.java =================================================================== --- core/kernel/src/main/java/com/sun/enterprise/v3/admin/AdminConsoleConfigUpgrade.java (revision 44679) +++ core/kernel/src/main/java/com/sun/enterprise/v3/admin/AdminConsoleConfigUpgrade.java (working copy) @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development @@ -84,6 +84,11 @@ @Inject Configs configs; + // This will force the Grizzly upgrade code to run before + // AdminConsoleConfigUpgrade runs. Issue GLASSFISH-15599 + @Inject(name="grizzlyconfigupgrade", optional=true) + ConfigurationUpgrade precondition = null; + @Override public void postConstruct() { Config config = configs.getConfigByName("server-config"); Index: admin/config-api/src/main/java/org/glassfish/config/support/GrizzlyConfigSchemaMigrator.java =================================================================== --- admin/config-api/src/main/java/org/glassfish/config/support/GrizzlyConfigSchemaMigrator.java (revision 44679) +++ admin/config-api/src/main/java/org/glassfish/config/support/GrizzlyConfigSchemaMigrator.java (working copy) @@ -108,9 +108,19 @@ createFromScratch(); } normalizeThreadPools(); - processHttpListeners(); - promoteHttpServiceProperties(currentConfig.getHttpService()); - promoteVirtualServerProperties(currentConfig.getHttpService()); + if (currentConfig.getHttpService() != null) { + processHttpListeners(); + promoteHttpServiceProperties( + currentConfig.getHttpService()); + promoteVirtualServerProperties( + currentConfig.getHttpService()); + } else { + // this only happens during some unit tests + Logger.getAnonymousLogger().log(Level.WARNING, + String.format( + "config.getHttpService() null for config '%s'", + currentConfig.getName())); + } promoteSystemProperties(); addAsadminProtocol(currentConfig.getNetworkConfig()); } catch (TransactionFailure tf) {