Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.AuthenticationException: Authentication error on host localhost/127.0.0.1: SASL Authentication is not supported in version 1 of the protocol
@Configuration@EnableCassandraRepositories(basePackages = {"com.foo.repository"})public class CassandraConfiguration extends AbstractCassandraConfiguration {@Value("${contactPoints}")private String contactPoints;@Value("${user}")private String user;@Value("${password}")private String password;@Overrideprotected String getContactPoints() {return contactPoints;}@Overrideprotected AuthProvider getAuthProvider() {return new PlainTextAuthProvider(user, password);}@Overrideprotected final String getKeyspaceName() {return "foo";}@Bean@Overridepublic CassandraAdminOperations cassandraTemplate() throws Exception {return super.cassandraTemplate();}}
Thanks for the input, I’ll ask the DS Driver Team about that.
From: Colin McQueen [mailto:colin....@shiftenergy.com]
Sent: Friday, April 04, 2014 9:13 AM
To: David Webb (Prowave)
Subject: Re: Is Authentication to a Cassandra cluster not supported?
Hi David,
Option 2 does not work as updating the driver to version 2 causes a NoClassDef exception on the Query class. Driver 2 renamed the Query class to Statement and a few other classes. Going to try option 1.
Colin McQueen
Software Developer
On Fri, Apr 4, 2014 at 10:00 AM, David Webb (Prowave) <dw...@prowaveconsulting.com> wrote:
Colin,
I have 2 suggestions to try.
1) Use the DseAuthProvider with the 1.0.X-dse driver (default dependency for SDC 1.0.0). This is supported.
CassandraClusterFactoryBean factory = new CassandraClusterFactoryBean();
factory.setContactPoints(env.getProperty("seeds"));
factory.setPort(Integer.parseInt(env.getProperty("port")));
factory.setAuthProvider(new DseAuthProvider());
factory.setUsername(env.getProperty("username"));
factory.setPassword(env.getProperty("password"));
Note: Using XML Config you can pass the Auth Provider Ref as well.
2) Using the same stratey, you can try your SASL Auth Provider class, and then override the DS Java Driver dependency to use the 2.0.X version. DS Driver engineers have told us that the 2.0.X driver is backwards compatible, but we have not tested it yet.
Please respond and let the group know if either of these options work with C* 2.0. J
Thanks,
Dave
--
You received this message because you are subscribed to the Google Groups "Spring Data Cassandra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spring-data-cass...@googlegroups.com.
To post to this group, send email to spring-dat...@googlegroups.com.
Visit this group at http://groups.google.com/group/spring-data-cassandra.
To view this discussion on the web visit https://groups.google.com/d/msgid/spring-data-cassandra/03962ec4-7adb-43bd-b56b-ce620ce8a608%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Can you provide your auth settings from cassandra.yaml?
Support for Cassandra 2.0 will be in SDC 1.1 and required API changes as you have discovered. There is no solution at this time based on the feedback from DataStax.
Colin McQueenSoftware Developer
Colin McQueen
Software Developer
Colin McQueen
Software Developer
Colin McQueen
Software Developer
To unsubscribe from this group and stop receiving emails from it, send an email to spring-data-cassandra+unsub...@googlegroups.com.