I have a connection string which is throwing the following error:
method buildKeyspace in class Builder cannot be applied to given types;
reason: inferred type does not conform to declared bound(s)
where T is a type-variable:
The connection string is below. I can't figure out why the ThriftFamilyFactory.getInstance() method is causing this. Any help appreciated. I'm using astyanax-thrift, astyanax-cassandra and astyanax-core all versions 1.56.29. I've also tried updating to astyanax-thrift 1.56.31 but the problem persists.
CassDAO.context = new AstyanaxContext.Builder()
.withAstyanaxConfiguration( new AstyanaxConfigurationImpl().setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
.buildKeyspace( ThriftFamilyFactory.getInstance() );
Ive never seeing this error. Are you trying this with java or another language?
Using Java. It's strange because I 1st loaded the astyanax 1.5.26 before I realised I need to install thrift, core and cassandra libs separately to use the newer versions. I installed those 3 and then removed the astyanax 1.5.26. That's when I started getting the error. I've just reinstalled 1.5.26 along with the 3 other libs and the error disappears!
I'm new to netbeans and maven so maybe I'm not loading my libraries in an optimal way??
I suspect that it disappeared because it's actually only accessing the old 1.56.26 jar. Splitting the project did cause a bit of a headache because astyanax.jar is now obsolete and can conflict with the new split jars. We've actually seen situations where code was being compiled against astyanax.jar but only the split jars were being deployed. The best thing to do is try to determine if anything is pulling in the older unsplit 1.56.26 jars and make sure those are excluded from your build by either updating any transitive dependencies or specifically excluding astyanax.jar and only including the new split jars.
Thanks for your help. I figured it out. I was missing the libraries org.apache.cassandra.thrift and org.apache.cassandra. Once I loaded them I was able to query successfully without the astyanax1.5.26 library.