title: IllegalStateException : Gremlin Server must be configured to use the JanusGraphManager
body: <pre><code>Set&lt;String&gt; graphNames = JanusGraphFactory.getGraphNames();
  for(String name:graphNames) {
      System.out.println(name);
  }
  </code></pre>
  
  <p>The above snippet produces the following exception</p>
  
  <pre><code>java.lang.IllegalStateException: Gremlin Server must be configured to use the JanusGraphManager.
      at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
      at org.janusgraph.core.JanusGraphFactory.getGraphNames(JanusGraphFactory.java:175)
      at com.JanusTest.controllers.JanusController.getPersonDetail(JanusController.java:66)
  </code></pre>
  
  <p>my.properties</p>
  
  <pre><code>gremlin.graph=org.janusgraph.core.JanusGraphFactory
  storage.backend=cql
  storage.hostname=127.0.0.1
  cache.db-cache = true
  cache.db-cache-clean-wait = 20
  cache.db-cache-time = 180000
  cache.db-cache-size = 0.5
  index.search.backend=elasticsearch
  index.search.hostname=127.0.0.1
  </code></pre>
  
  <p>gremlin-server.yaml</p>
  
  <pre><code>host: 0.0.0.0
  port: 8182
  scriptEvaluationTimeout: 30000
  channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
  graphManager: org.janusgraph.graphdb.management.JanusGraphManager
  graphs: {
    ConfigurationManagementGraph: conf/my.properties,
  }
  plugins:
    - janusgraph.imports
  scriptEngines: {
    gremlin-groovy: {
      imports: [java.lang.Math],
      staticImports: [java.lang.Math.PI],
      scripts: [scripts/empty-sample.groovy]}}
  serializers:
    - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
    - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: {ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
    - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
    - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
    - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
    - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
  processors:
    - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
    - { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}
  metrics: {
    consoleReporter: {enabled: true, interval: 180000},
    csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
    jmxReporter: {enabled: true},
    slf4jReporter: {enabled: true, interval: 180000},
    gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
    graphiteReporter: {enabled: false, interval: 180000}}
  maxInitialLineLength: 4096
  maxHeaderSize: 8192
  maxChunkSize: 8192
  maxContentLength: 65536
  
  maxAccumulationBufferComponents: 1024
  resultIterationBatchSize: 64
  writeBufferLowWaterMark: 32768
  writeBufferHighWaterMark: 65536
  </code></pre>