I’m trying to extract cql query from com.datastax.oss.driver.api.core.session.Request. I’m using cassandra 4.17.0 java driver. I’m able to get request and tried to convert to SimpleStatement as mentioned in the below code.
SimpleStatement statement = (SimpleStatement)request
statement.getQuery();
But facing this exception:
ClassCastException: class jdk.proxy2.$Proxy179 cannot be cast to class com.datastax.oss.driver.api.core.cql.SimpleStatement (jdk.proxy2.$Proxy179 is in module jdk.proxy2 of loader 'app'; com.datastax.oss.driver.api.core.cql.SimpleStatement is in unnamed module of loader 'app'))}
Can anyone please suggest me how to fetch the query from Request ?