valchkou / cassandra-driver-mapping

JPA addon for DataStax Java Driver for Cassandra
58 stars 24 forks source link

NoHostAvailableException when column family is unconfigured #63

Open SusilPanda opened 9 years ago

SusilPanda commented 9 years ago

In this case when column family is unconfigured we should get the exception InvalidQueryException. But I am getting NoHostAvailableException.

This exception should come in the getMappingSession method. My query is why this exception is coming ?

Thanks in advance.

valchkou commented 9 years ago

NoHostAvailableException thrown by datastax core driver. I don't handle it in my module. But if you can consistently reproduce it, please post code sample here. Otherwise it hard to guess what is going on

SusilPanda commented 9 years ago

Hi, The exception I am getting while fetching employee details using get method. Example : I have an employee column family CF : Employee emp_id emp_name emp_address 1234 abc India

Now I run the below query : Employee employee = mapper.get(employeeDto);

Exception scenario : My CF has been dropped when I run the above query. In this case I expect the exception will be InvalidQueryException, but NoHostAvailableException is thrown.

And this exception is not consistent , sometimes com.google.common.util.concurrent.UncheckedExecutionException - com.datastax.driver.core.exceptions.InvalidQueryExceptions is thrown.

Thanks