mondrian.rolap.RolapConnection cannot be cast to org.olap4j.OlapWrapper
Hi, I tried to get the customise Results to get the cell values. Here is the code and got stuck while casting.
connection = DriverManager.getConnection(connectStr, null);
=>OlapWrapper wrapper = (OlapWrapper) connection; //getting error here
OlapConnection olapConnection = ((OlapWrapper) connection).unwrap(OlapConnection.class);
java.lang.ClassCastException: mondrian.rolap.RolapConnection cannot be cast to org.olap4j.OlapWrapper
I just followed the link "http://www.olap4j.org/olap4j_fs.html" for ref. Previously i tried to execute the query (as given in the documentation), that uses Result res = connection.executed(query); (which is deprecated and working fine for now). Now trying to create statement and execute to get cellset.
Platform: Ubuntu 12.04 LTS
Eclipse (Java 1.6)