Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-1988

Creating Dataset through REST API fails if no properties are provided

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 3.1.0
    • Component/s: Datasets
    • Labels:
      None
    • Rank:
      1|hzyq3r:

      Description

      If I want to create a KeyValueTable (with no properties set), I issue a curl request as follows:

      This works:
      v2/data/datasets/table1 -X PUT -d '{"typeName":"co.cask.cdap.api.dataset.lib.KeyValueTable", "properties":{"":""}}'

      This doesn't:
      v2/data/datasets/table1 -X PUT -d '

      {"typeName":"co.cask.cdap.api.dataset.lib.KeyValueTable"}

      '

      Fails with an exception :
      2015-04-03 01:46:34,071 - ERROR [executor-28:c.c.c.c.e.HttpExceptionHandler@45] - Unexpected error: request=PUT /v3/namespaces/default/data/datasets/table1 user=<null>:
      java.lang.NullPointerException: null
      at co.cask.cdap.data2.datafabric.dataset.service.DatasetInstanceHandler.getInstanceConfiguration(DatasetInstanceHandler.java:213) ~[co.cask.cdap.cdap-data-fabric-3.0.0-SNAPSHOT.jar:na]
      at co.cask.cdap.data2.datafabric.dataset.service.DatasetInstanceHandler.create(DatasetInstanceHandler.java:139) ~[co.cask.cdap.cdap-data-fabric-3.0.0-SNAPSHOT.jar:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
      at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
      at co.cask.http.HttpMethodInfo.invoke(HttpMethodInfo.java:85) ~[co.cask.http.netty-http-0.11.0.jar:na]
      at co.cask.http.HttpDispatcher.messageReceived(HttpDispatcher.java:41) [co.cask.http.netty-http-0.11.0.jar:na]
      at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [io.netty.netty-3.6.6.Final.jar:na]
      at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [io.netty.netty-3.6.6.Final.jar:na]
      at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [io.netty.netty-3.6.6.Final.jar:na]
      at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) [io.netty.netty-3.6.6.Final.jar:na]
      at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) [io.netty.netty-3.6.6.Final.jar:na]
      at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314) [io.netty.netty-3.6.6.Final.jar:na]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]

        Attachments

          Activity

            People

            • Assignee:
              ataylor314 Ashley Taylor
              Reporter:
              gokul Gokul Gunasekaran
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: