[
https://issues.apache.org/jira/browse/GEODE-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16055137#comment-16055137
]
ASF subversion and git services commented on GEODE-3092:
--------------------------------------------------------
Commit 63cd4c714f9f50c6a7d1538eec8d76cc33b2dccd in geode's branch
refs/heads/release/1.2.0 from [~jinmeiliao]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=63cd4c7 ]
GEODE-3092: fix specifiedDefaultValue for cacheLoader and cacheWriter
(cherry picked from commit c6d88f7)
> Using the gfsh alter region command to unset a CacheWriter no longer works
> --------------------------------------------------------------------------
>
> Key: GEODE-3092
> URL: https://issues.apache.org/jira/browse/GEODE-3092
> Project: Geode
> Issue Type: Bug
> Components: gfsh
> Reporter: Barry Oglesby
> Assignee: Jinmei Liao
>
> In 1.1, a command like this is used to unset the CacheWriter:
> {noformat}
> gfsh>alter region --name=/Person --cache-writer=''
> Member | Status
> ------- | -------------------------------------
> server1 | Region "/Person" altered on "server1"
> {noformat}
> In 1.2, that same command fails:
> {noformat}
> gfsh>alter region --name=/Person --cache-writer=''
> Member | Status
> ------- | ----------------------------------------------------------------
> server1 | ERROR: Could not find class "null" specified for "cache-writer".
> {noformat}
> And throws this RuntimeException on the server:
> {noformat}
> [error 2017/06/15 15:55:12.150 PDT server1 <Function Execution Processor1>
> tid=0x4c] Could not find class "null" specified for "cache-writer".
> java.lang.RuntimeException: Could not find class "null" specified for
> "cache-writer".
> at
> org.apache.geode.management.internal.cli.functions.RegionAlterFunction.forName(RegionAlterFunction.java:327)
> at
> org.apache.geode.management.internal.cli.functions.RegionAlterFunction.alterRegion(RegionAlterFunction.java:277)
> at
> org.apache.geode.management.internal.cli.functions.RegionAlterFunction.execute(RegionAlterFunction.java:69)
> at
> org.apache.geode.internal.cache.MemberFunctionStreamingMessage.process(MemberFunctionStreamingMessage.java:185)
> at
> org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:374)
> at
> org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:440)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at
> org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:665)
> at
> org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1111)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ClassNotFoundException: null
> at
> org.apache.geode.internal.ClassPathLoader.forName(ClassPathLoader.java:169)
> at
> org.apache.geode.management.internal.cli.functions.RegionAlterFunction.forName(RegionAlterFunction.java:323)
> ... 10 more
> {noformat}
> The CreateAlterDestroyRegionCommands alterRegion method was changed fairly
> recently
> From:
> {noformat}
> @CliOption(key = CliStrings.ALTER_REGION__CACHEWRITER,
> unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
> specifiedDefaultValue = "null",
> help = CliStrings.ALTER_REGION__CACHEWRITER__HELP) String
> cacheWriter,
> {noformat}
> To:
> {noformat}
> @CliOption(key = CliStrings.ALTER_REGION__CACHEWRITER, specifiedDefaultValue
> = "null",
> help = CliStrings.ALTER_REGION__CACHEWRITER__HELP) String
> cacheWriter,
> {noformat}
> What is passed to the RegionAlterFunction now is a string with the value
> "null".
> I think the same issue exists for the CacheLoader.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)