[
https://issues.apache.org/jira/browse/CALCITE-7852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated CALCITE-7852:
------------------------------------
Labels: pull-request-available (was: )
> Geode schema fails with NullPointerException when pdxSerializablePackagePath
> is not set
> ---------------------------------------------------------------------------------------
>
> Key: CALCITE-7852
> URL: https://issues.apache.org/jira/browse/CALCITE-7852
> Project: Calcite
> Issue Type: Bug
> Components: geode-adapter
> Reporter: Vladimir Sitnikov
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.43.0
>
>
> A Geode schema whose model does not set the {{pdxSerializablePackagePath}}
> operand cannot be created when Calcite has to create a new Geode client
> cache. Since CALCITE-7787 the operand is rejected unless the system property
> {{calcite.geode.pdxSerializablePackagePath.allowed}} is {{true}}, so leaving
> it out is the only configuration that works by default, and that
> configuration fails.
> Both {{GeodeSchemaFactory}} and {{GeodeSimpleSchemaFactory}} fail the same
> way. Reproduced on main at 8f27e24a02 (1.43.0-SNAPSHOT, geode-core 1.15.1) by
> creating the schema from the operand that
> {{GeodeSchemaFactoryTest.operand()}} builds, minus
> {{pdxSerializablePackagePath}}, after {{GeodeUtils.closeClientCache()}}:
> {code}
> java.lang.NullPointerException: Cannot invoke "String.split(String)" because
> "value" is null
> at
> org.apache.geode.pdx.internal.AutoSerializableManager.processInitParams(AutoSerializableManager.java:2370)
> at
> org.apache.geode.pdx.internal.AutoSerializableManager.reconfigure(AutoSerializableManager.java:2362)
> at
> org.apache.geode.pdx.internal.AutoSerializableManager.create(AutoSerializableManager.java:148)
> at
> org.apache.geode.pdx.ReflectionBasedAutoSerializer.<init>(ReflectionBasedAutoSerializer.java:212)
> at
> org.apache.geode.pdx.ReflectionBasedAutoSerializer.<init>(ReflectionBasedAutoSerializer.java:166)
> at
> org.apache.calcite.adapter.geode.util.GeodeUtils.createClientCache(GeodeUtils.java:126)
> at
> org.apache.calcite.adapter.geode.rel.GeodeSchemaFactory.create(GeodeSchemaFactory.java:71)
> {code}
> Expected: {{create}} returns a {{GeodeSchema}} (or a {{GeodeSimpleSchema}})
> whose client cache has a {{ReflectionBasedAutoSerializer}} with no class
> pattern, as {{new ReflectionBasedAutoSerializer()}} creates.
> {{GeodeUtils.checkPdxPackagePathOperand}} documents a null operand as "not
> set" and accepts it, so the factories are meant to work without it.
> Cause: {{GeodeUtils.createClientCache}} passes the null operand to {{new
> ReflectionBasedAutoSerializer(String...)}}, which reads it as a class pattern.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)