You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Masaki Yamakawa (Jira)" <ji...@apache.org> on 2020/08/02 07:57:00 UTC

[jira] [Created] (GEODE-8396) NullPointerException occurs in create jdbc-mapping command

Masaki Yamakawa created GEODE-8396:
--------------------------------------

             Summary: NullPointerException occurs in create jdbc-mapping command
                 Key: GEODE-8396
                 URL: https://issues.apache.org/jira/browse/GEODE-8396
             Project: Geode
          Issue Type: Bug
          Components: jdbc
            Reporter: Masaki Yamakawa


NullPointerException occurs in create jdbc-mapping command when partitioned region is specified by refid of cache.xml (cluster.xml).

The cluster.xml and gfsh command are as follows:

cluster.xml
{code:java}
<region name="ExampleRegion">
 <region-attributes refid="PARTITION" />
 </region>{code}
gfsh
{code:java}
gfsh start locator --name=ExampleLocator --enable-cluster-configuration=true
 gfsh start server --name=ExampleServer --locators=ExampleLocator[10334] --use-cluster-configuration=true
 create data-source --name=ExampleDataSource --url=jdbc:mysql://mariadb/geode_db --username=geode_user --if-not-exists=true
 create jdbc-mapping --data-source=ExampleDataSource --region=ExampleRegion --catalog=geode_db --table=ExampleRegion --pdx-name=com.example.Example --synchronous=false{code}
The cause is that `org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand#createAsyncQueue` refers to the DataPolicy, but when using cluster.xml is not set.
 * In case of create region command, both refid and data-policy are set.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)