title: Could not find implementation class: "cassandra"
body: <p>I'm trying to connect to Titan backed with Cassandra (installed with the Rexster Titan-Server package) via Titan-Node.</p>
  
  <p>I get the error...</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: Could not find implementation
    class: "cassandra"</p>
  </blockquote>
  
  <p>... when I run the following code....</p>
  
  <pre><code>var Titan = require('titan-node');
  var gremlin = new Titan.Gremlin({ loglevel: 'OFF' });
  
  var TitanFactory = gremlin.java.import('com.thinkaurelius.titan.core.TitanFactory');
  var graph = TitanFactory.openSync('titan.config');
  </code></pre>
  
  <p>Config:</p>
  
  <pre><code>storage.directory = "/tmp/titan"
  storage.backend = "cassandra"
  storage.hostname = "127.0.0.1"
  storage.port = 9160
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>I seem to have the required .jar within my Titan installation folder and also in the target/dependency folder within the Titan-Node package.</p>
  
  <p>Why can't Java find the file? Is there a missing classpath entry? If so would it need to be set for the database or for node? I figure it would be node because that's the app trying to load the class.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Dan's suggestion gave me....</p>
  
  <blockquote>
    <p>'java.lang.IllegalArgumentException: Could not find implementation
    class:
    "com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager"'</p>
  </blockquote>
  
  <p>...and...</p>
  
  <blockquote>
    <p>'java.lang.IllegalArgumentException: Could not find implementation
    class:
    "com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager"'</p>
  </blockquote>
  
  <p>...respectively.</p>
  
  <p>In fact whatever value you set <code>storage.backend</code> to in the config, that's the name of the class it can't find an implementation for that it reports in the exception message.</p>
  
  <p>If you look in the code here...</p>
  
  <p><a href="https://github.com/thinkaurelius/titan/blob/master/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/Backend.java" rel="nofollow">https://github.com/thinkaurelius/titan/blob/master/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/Backend.java</a></p>
  
  <p>...the <code>instantiate</code> method that is throwing the exception uses the method parameter <code>clazzname</code> in the message which is passed in by the call in <code>getImplementationClass</code>. The latter ought to be looking up the class to load via the key set in <code>storage.backend</code> but oddly it doesn't seem to find anything so it uses the value as is. Even so, it still can't find the class even if you set it directly. So there's a second mystery here.</p>
  
  <p>I suppose I will have to go through Rexster until this is fixed.</p>