# Confusing error when using FDBMetaDataStore

**URL:** https://forums.foundationdb.org/t/confusing-error-when-using-fdbmetadatastore/1818
**Category:** Record Layer
**Created:** [December 6, 2019, 12:10am UTC](https://forums.foundationdb.org/t/confusing-error-when-using-fdbmetadatastore/1818 "2019-12-06T00:10:34Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![max](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/max/32/585_2.png) [@max](https://forums.foundationdb.org/u/max)
#### Post date: [December 6, 2019, 8:08pm UTC](https://forums.foundationdb.org/t/confusing-error-when-using-fdbmetadatastore/1818/6 "2019-12-06T20:08:13Z")

</div>

Either setting the db up from scratch in docker or with the following:

```auto
val metaDataSubspace = session.getPath().toSubspace(context)
context.ensureActive.clear(Range.startsWith(metaDataSubspace.pack))
context.commit()

```

I don’t think I’m using a path with null in it. The path used in this setup passes the following: `assert(path.toString() == "/hi:\"hi\"")` (not sure if the escaped quotes are expected)

I’m building my keyspace/path as follows:

```auto
val ks = new KeySpace(
  new KeySpaceDirectory(
    this.keySpace,
    KeySpaceDirectory.KeyType.STRING,
    this.keySpace
  )
)
return ks.path(this.keySpace)

```

`this.keySpace` is a `String`

Right before the createOrOpen call there is just one key (I used this to grab all keys: [Range-reading all key-values](https://forums.foundationdb.org/t/range-reading-all-key-values/1647)) in the database, it is:

```auto
[{\x02hi\x00\x00\x14 [10 123 10 12 116 97 98 108 101 115 46 112 114 111 116 111 34 44 10 4 85 115 101 114 18 14 10 2 105 100 24 1 32 1 40 9 82 2 105 100 18 20 10 5 101 109 97 105 108 24 2 32 1 40 9 82 5 101 109 97 105 108 34 45 10 15 82 101 99 111 114 100 84 121 112 101 85 110 105 111 110 18 26 10 5 95 85 115 101 114 24 1 32 1 40 11 50 5 46 85 115 101 114 82 4 85 115 101 114 66 6 90 4 109 97 105 110 98 6 112 114 111 116 111 51 26 26 10 4 85 115 101 114 18 18 10 16 10 2 90 0 10 10 26 8 10 2 105 100 16 1 24 1 32 0 40 2 64 0]}]

```

---

_[View the full topic](https://forums.foundationdb.org/t/confusing-error-when-using-fdbmetadatastore/1818)._
