dev@glassfish.java.net

Re: PropertyVetoException during upgrade

From: <jerome.dochez_at_oracle.com>
Date: Wed, 25 Aug 2010 12:55:01 -0700

I really tried to make *that* message clear :( You are using a read
only view to call the set method instead of using the locked view
which is passed to the run() call called from the ConfigSupport. I
fixed a bug in hk2 which is probably why it started failing, you were
doing the wrong thing all along.

Jerome

On Aug 25, 2010, at 12:45, Bobby Bissett <bobby.bissett_at_oracle.com>
wrote:

> Hi all,
>
> Can someone tell me what's causing the exception below and/or what I
> need to do to fix it? Note, this all worked last week and the
> upgrade code hasn't changed (unless Bill snuck some magic into the
> copyright header, heh heh).
>
> Bonus note: you can create the failure without needing a v2 domain
> to upgrade. Just run "asadmin start-domain --upgrade" on your 3.1
> server and you'll see it. Normally you can "upgrade" a 3.1 domain to
> 3.1 and everything succeeds (it just doesn't do any real work).
>
> Here's the code:
>
> http://tinyurl.com/25ckope -- see the top of "private class
> GroupManagementServiceConfigCode" for the bits that hk2 is
> complaining about.
>
> Here's the stack trace:
>
> SEVERE: Failure while upgrading cluster data from V2 to V3
> org.jvnet.hk2.config.TransactionFailure: Instance of
> com.sun.enterprise.config.serverbeans.GroupManagementService named
> 'null' is not locked for writing when invoking method
> setGroupDiscoveryTimeoutInMillis you must use transaction semantics
> to access it.
> at org.jvnet.hk2.config.ConfigSupport._apply(ConfigSupport.java:
> 203)
> at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:133)
> at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:112)
> at
> org.glassfish.gms.GMSConfigUpgrade.upgradeGroupManagementServiceElements(
> GMSConfigUpgrade.java:100)
> at org.glassfish.gms.GMSConfigUpgrade.postConstruct
> (GMSConfigUpgrade.java:79)
> at com.sun.hk2.component.AbstractWombImpl.inject
> (AbstractWombImpl.java:109)
> at com.sun.hk2.component.ConstructorWomb.initialize
> (ConstructorWomb.java:92)
> at com.sun.hk2.component.SingletonInhabitant.get
> (SingletonInhabitant.java:68)
> at com.sun.hk2.component.EventPublishingInhabitant.get
> (EventPublishingInhabitant.java:136)
> at com.sun.hk2.component.AbstractInhabitantImpl.get
> (AbstractInhabitantImpl.java:61)
> at org.glassfish.config.support.DomainXml.upgrade(DomainXml.java:
> 152)
> at org.glassfish.config.support.DomainXml.run(DomainXml.java:118)
> at
> com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(
> AbstractModulesRegistryImpl.java:167)
> at
> com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createHabitat(
> AbstractModulesRegistryImpl.java:149)
> at com.sun.enterprise.module.bootstrap.Main.createHabitat
> (Main.java:430)
> at org.jvnet.hk2.osgiadapter.HK2Main.createHabitat(HK2Main.java:92)
> at com.sun.enterprise.glassfish.bootstrap.GlassFishActivator
> $1.newGlassFish(GlassFishActivator.java:89)
> at com.sun.enterprise.glassfish.bootstrap.GlassFishMain
> $Launcher.launch(GlassFishMain.java:116)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main
> (GlassFishMain.java:101)
> at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:
> 65)
> Caused by: java.beans.PropertyVetoException: Instance of
> com.sun.enterprise.config.serverbeans.GroupManagementService named
> 'null' is not locked for writing when invoking method
> setGroupDiscoveryTimeoutInMillis you must use transaction semantics
> to access it.
> at org.jvnet.hk2.config.Dom.invoke(Dom.java:906)
> at org.glassfish.config.support.TranslatedConfigView.invoke
> (TranslatedConfigView.java:119)
> at $Proxy33.setGroupDiscoveryTimeoutInMillis(Unknown Source)
> at org.glassfish.gms.GMSConfigUpgrade
> $GroupManagementServiceConfigCode.run(GMSConfigUpgrade.java:145)
> at org.glassfish.gms.GMSConfigUpgrade
> $GroupManagementServiceConfigCode.run(GMSConfigUpgrade.java:138)
> at org.jvnet.hk2.config.ConfigSupport$1.run(ConfigSupport.java:115)
> at org.jvnet.hk2.config.ConfigSupport._apply(ConfigSupport.java:
> 174)
> ... 23 more
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>