Good news! Please note down your steps, to include in documentation later, if this repeats.
Regards, Chamila de Alwis Committer and PMC Member - Apache Stratos Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com On Sat, Jun 27, 2015 at 4:33 AM, Ashan Dhananjaya <dhananjay...@gmail.com> wrote: > Hi Chamila, > > I was able to fix this issue using a wso2 OSGI bundle > (cassandra-jdbc-1.1.1.wso2v1) which includes the missing class for CQL. > > Thank You! > Best Regards, > Ashan > > > > On Fri, Jun 26, 2015 at 8:09 PM, Chamila De Alwis <chami...@wso2.com> > wrote: > >> Hi Ashan, >> >> Were you able to solve this issue? >> >> (On a mobile) >> Regards, >> Chamila de Alwis >> Committer and PMC Member - Apache Stratos >> Software Engineer - WSO2 >> http://code.chamiladealwis.com >> On Jun 24, 2015 8:01 AM, "Ashan Dhananjaya" <dhananjay...@gmail.com> >> wrote: >> >>> Hi All, >>> >>> I tried to access Cassandra RDBMS using Jaggery [1] and got this >>> exception : >>> >>> [2015-06-24 14:39:20,680] ERROR >>> {org.jaggeryjs.jaggery.core.manager.WebAppManager} - >>> org.mozilla.javascript.WrappedException: Wrapped >>> java.sql.SQLNonTransientConnectionException: >>> org.apache.thrift.TApplicationException: Invalid method name: >>> 'prepare_cql3_query' (/cassandracon-1.0.0//index.jag#20) >>> org.jaggeryjs.scriptengine.exceptions.ScriptException: >>> org.mozilla.javascript.WrappedException: Wrapped >>> java.sql.SQLNonTransientConnectionException: >>> org.apache.thrift.TApplicationException: Invalid method name: >>> 'prepare_cql3_query' (/cassandracon-1.0.0//index.jag#20) >>> at >>> org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571) >>> at >>> org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) >>> at >>> org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:447) >>> at >>> org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >>> at >>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) >>> at >>> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) >>> at >>> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379) >>> at >>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) >>> at >>> org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >>> at >>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) >>> at >>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) >>> at >>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) >>> at >>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) >>> at >>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) >>> at >>> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56) >>> at >>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) >>> at >>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52) >>> at >>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) >>> at >>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) >>> at >>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) >>> at >>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) >>> at >>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653) >>> at >>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >>> at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >>> at java.lang.Thread.run(Thread.java:745) >>> Caused by: org.mozilla.javascript.WrappedException: Wrapped >>> java.sql.SQLNonTransientConnectionException: >>> org.apache.thrift.TApplicationException: Invalid method name: >>> 'prepare_cql3_query' (/cassandracon-1.0.0//index.jag#20) >>> at >>> org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754) >>> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148) >>> at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386) >>> at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) >>> at >>> org.jaggeryjs.rhino.cassandracon__1._0._0.c0._c_script_0(/cassandracon-1.0.0//index.jag:20) >>> at >>> org.jaggeryjs.rhino.cassandracon__1._0._0.c0.call(/cassandracon-1.0.0//index.jag) >>> at >>> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) >>> at >>> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) >>> at >>> org.jaggeryjs.rhino.cassandracon__1._0._0.c0.call(/cassandracon-1.0.0//index.jag) >>> at >>> org.jaggeryjs.rhino.cassandracon__1._0._0.c0.exec(/cassandracon-1.0.0//index.jag) >>> at >>> org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567) >>> ... 35 more >>> Caused by: java.sql.SQLNonTransientConnectionException: >>> org.apache.thrift.TApplicationException: Invalid method name: >>> 'prepare_cql3_query' >>> at >>> org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.<init>(CassandraPreparedStatement.java:107) >>> at >>> org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:388) >>> at >>> org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:372) >>> at >>> org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:50) >>> at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126) >>> at >>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) >>> at >>> org.wso2.carbon.ndatasource.rdbms.ConnectionRollbackOnReturnInterceptor.invoke(ConnectionRollbackOnReturnInterceptor.java:51) >>> at >>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) >>> at >>> org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:67) >>> at >>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) >>> at >>> org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:153) >>> at >>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) >>> at >>> org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:41) >>> at >>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) >>> at >>> org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80) >>> at com.sun.proxy.$Proxy12.prepareStatement(Unknown Source) >>> at >>> org.jaggeryjs.hostobjects.db.DatabaseHostObject.jsFunction_query(DatabaseHostObject.java:186) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) >>> ... 44 more >>> Caused by: org.apache.thrift.TApplicationException: Invalid method name: >>> 'prepare_cql3_query' >>> at >>> org.apache.thrift.TApplicationException.read(TApplicationException.java:108) >>> at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71) >>> at >>> org.apache.cassandra.thrift.Cassandra$Client.recv_prepare_cql3_query(Cassandra.java:1625) >>> at >>> org.apache.cassandra.thrift.Cassandra$Client.prepare_cql3_query(Cassandra.java:1611) >>> at >>> org.apache.cassandra.cql.jdbc.CassandraConnection.prepare(CassandraConnection.java:517) >>> at >>> org.apache.cassandra.cql.jdbc.CassandraConnection.prepare(CassandraConnection.java:532) >>> at >>> org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.<init>(CassandraPreparedStatement.java:96) >>> ... 68 more >>> >>> >>> I could resolve it using "cassandra-jdbc-1.1.1.wso2v1.jar", by including >>> it to the repository/component/lib directory. >>> >>> >>> [1]=http://jaggeryjs.org/documentation.jag?api=rdb >>> >>> Thank You! >>> Best Regards, >>> Ashan >>> >> >