admin@glassfish.java.net

Re: ClassCastException with 'asadmin set' and duplicates in 'get'

From: Jerome Dochez <jerome.dochez_at_oracle.com>
Date: Tue, 06 Jul 2010 14:26:24 -0700

Bobby

I just fixed that issue. I have not been able to reproduce the duplicate
situation but since you mentioned you edited the file by hand, it was
hard to reproduce.
let me know if you run into more issues.

thx, jerome

On 6/23/10 8:52 AM, Bobby Bissett wrote:
> Hi all,
>
> Using the default properties that exist when a cluster is created, I
> can get some values but not set them:
>
> hostname% ./asadmin get "*" | grep heartbeats
> configs.config.c1-config.group-management-service.failure-detection.max-missed-heartbeats=3
>
> configs.config.default-config.group-management-service.failure-detection.max-missed-heartbeats=3
>
> hostname%
> hostname% ./asadmin set
> configs.config.c1-config.group-management-service.failure-detection.max-missed-heartbeats=4
>
> remote failure: java.lang.ClassCastException: org.jvnet.hk2.config.Dom
> cannot be cast to org.jvnet.hk2.config.ConfigBean
> org.jvnet.hk2.config.Dom cannot be cast to
> org.jvnet.hk2.config.ConfigBean
> Command set failed.
>
> Here's another example:
>
> hostname% ./asadmin get "*" | grep discovery
> configs.config.c1-config.group-management-service.group-discovery-timeout-in-millis=5000
>
> configs.config.default-config.group-management-service.group-discovery-timeout-in-millis=5000
>
> hostname%
> hostname% ./asadmin set
> configs.config.c1-config.group-management-service.group-discovery-timeout-in-millis=5001
>
> remote failure: java.lang.ClassCastException: org.jvnet.hk2.config.Dom
> cannot be cast to org.jvnet.hk2.config.ConfigBean
> org.jvnet.hk2.config.Dom cannot be cast to
> org.jvnet.hk2.config.ConfigBean
> Command set failed.
>
> If I manually edit domain.xml to add values into the
> <group-management-service> element rather than relying on defaults, I
> can run a get but see duplicate values:
>
> hostname% ./asadmin get "*" | grep heartbeats | grep c1
> configs.config.c1-config.group-management-service.failure-detection.max-missed-heartbeats=3
>
> configs.config.c1-config.group-management-service.failure-detection.max-missed-heartbeats=4
>
> hostname%
> hostname% ./asadmin set
> configs.config.c1-config.group-management-service.failure-detection.max-missed-heartbeats=5
>
> configs.config.c1-config.group-management-service.failure-detection.max-missed-heartbeats=5
>
> Command set executed successfully.
> hostname%
> hostname% ./asadmin get "*" | grep heartbeats | grep c1
> configs.config.c1-config.group-management-service.failure-detection.max-missed-heartbeats=5
>
> configs.config.c1-config.group-management-service.failure-detection.max-missed-heartbeats=5
>
> hostname%
>
> At least I can set them, but the duplicates are worrysome.
>
> Any suggestions? All the GroupManagementService and FailureDetection
> code in config-api is checked in.
>
> Thanks,
> Bobby
>
> p.s. Full stack trace of the class cast exception from server log:
>
> [#|2010-06-23T11:34:09.027-0400|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=98;_ThreadName=Thread-1;|Exception
> in command execution : java.lang.ClassCastException:
> org.jvnet.hk2.config.Dom cannot be cast to
> org.jvnet.hk2.config.ConfigBean
> java.lang.ClassCastException: org.jvnet.hk2.config.Dom cannot be cast
> to org.jvnet.hk2.config.ConfigBean
> at com.sun.enterprise.v3.admin.SetCommand.set(SetCommand.java:250)
> at com.sun.enterprise.v3.admin.SetCommand.execute(SetCommand.java:87)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:324)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:339)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1002)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:94)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1110)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1099)
>
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:367)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
> at
> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
>
> at
> com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:113)
>
> at
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
>
> at
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:803)
> at
> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:706)
> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:987)
> at
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:217)
>
> at
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
>
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
>
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
>
> at
> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
> at
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>
> at
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
>
> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:526)
>
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:507)
>
> at java.lang.Thread.run(Thread.java:637)
> |#]
>
> p.p.s The group-management-service info I manually added to the c1
> group-management-service element in domain.xml:
>
> <group-management-service group-discovery-timeout-in-millis="5001">
> <failure-detection
> max-missed-heartbeats="4"
> heartbeat-frequency-in-millis="2001"
> verify-failure-waittime-in-millis="1501"
> verify-failure-connect-timeout-in-millis="10001"/>
> <property name="MULTICAST_POOLSIZE" value="301"/>
> <property name="INCOMING_MESSAGE_QUEUE_SIZE" value="1000"/>
> <property name="MAX_POOLSIZE" value="20"/>
> <property name="FAILURE_DETECTION_TCP_RETRANSMIT_PORT" value="9000"/>
> <property name="CORE_POOLSIZE" value="10"/>
> <property name="WRITE_TIMEOUT" value="11"/>
> <property name="START_TIMEOUT" value="12"/>
> <property name="HIGH_WATER_MARK" value="12"/>
> <property name="NUMBER_TO_RECLAIM" value="12"/>
> <property name="MAX_PARALLEL" value="2"/>
> </group-management-service>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>