Java client library: "Cannot inherit from final class" error



I’m using your MultiStream as a starting point for a client.

I’m using the java client library datasift-datasift-java-6060d3b

If I leave my code in your package it all works ok, but as soon as i move it into a different package i get the following stack trace on execution… I’m guessing an inappropriate scoping somewhere in your client library?

Any thoughts?

Exception in thread “main” java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(
at java.lang.ClassLoader.defineClass(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at org.apache.http.impl.client.DefaultHttpClient.createHttpParams(
at org.apache.http.impl.client.AbstractHttpClient.getParams(
at org.datasift.ApiClient.(
at org.datasift.User.callAPI(
at org.datasift.Definition.compile(
at org.datasift.Definition.getHash(
at com.othermaps.analysis.reactions.cli.DataSiftUtils.addQueryToBagAndLaunch(
at com.othermaps.analysis.reactions.cli.DataSiftUtils.buildQueries(
at com.othermaps.analysis.reactions.cli.DataSiftUtils.init(
at com.othermaps.analysis.reactions.cli.DataSiftUtils.main(


If you could zip up you code and send it to, we can take a quick look into it.


You can replicate this by simply changing the package of your MultiStream example (from to anything outside your hierarchy – eg

package com.othermaps.analysis.test

rather than


I’m running against your java client lib version 6060d3b on java Java™ SE Runtime Environment (build 1.6.0_29-b11-402-11D50)




We have recently updated the Java Client library to include a downloadable .jar file to include in other projects :

You should be able to use this to install the DataSift library into your applications, and write your own custom scripts using the library.