Error initializing GeoApiContext in Java - google-api-client

After upgrading version 0.2.2 of google-maps-services, trying to do the following:
GeoApiContext context = new GeoApiContext.Builder().apiKey("MY KEY").build();
I am getting the error detailed below:
Exception in thread "main" java.lang.NoClassDefFoundError: okhttp3/OkHttpClient$Builder
Hope someone can help.
Thanks,
Amir

There was a reference to an older version of okhttp in another project I had included. Took 2 hours by I got this to work.

Related

Upgrade to Phantom cassandra 1.26 gives GenTraversableOnce$class error

I was using phantom to connect to cassandra database from my scala code. It worked before. But today after I upgraded to the latest 1.26.1, it throws the following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
at scala.reflect.internal.util.WeakHashSet.<init>(WeakHashSet.scala:19)
at scala.reflect.internal.util.WeakHashSet$.apply(WeakHashSet.scala:429)
at scala.reflect.internal.SymbolTable$perRunCaches$.<init>(SymbolTable.scala:310)
at scala.reflect.internal.SymbolTable.perRunCaches$lzycompute(SymbolTable.scala:304)
at scala.reflect.internal.SymbolTable.perRunCaches(SymbolTable.scala:304)
at scala.reflect.internal.Symbols$class.$init$(Symbols.scala:71)
at scala.reflect.internal.SymbolTable.<init>(SymbolTable.scala:13)
at scala.reflect.runtime.JavaUniverse.<init>(JavaUniverse.scala:12)
at scala.reflect.runtime.package$.universe$lzycompute(package.scala:16)
at scala.reflect.runtime.package$.universe(package.scala:16)
at com.websudos.diesel.engine.reflection.EarlyInit$class.$init$(EarlyInit.scala:13)
at com.websudos.phantom.db.DatabaseImpl.<init>(DatabaseImpl.scala:42)
at data.MyDatabase.<init>(Users.scala:87)
I'm using scala 2.11.7. Strange enough that downgraded to the older version the issue remains. I know it must be something else. But I couldn't figure it out. Any help?

whenever i choose POS tagger in my .net code. it shows me unsupported major.minor error.. why?

The complete error is something like:
Exception in thread "main" java.lang.UnsupportedClassVersionError:edu/stanford/nlp/tagger/maxent/MaxentTagger: Unsupported major.minor version 52.0`
There are two ways to solve it, Easiest way is to download and update latest version of JRE in the system which is running java code.

akka-kryo-serialization ClassNotFoundException: scala.Enumeration$Val

Sometimes when updating a dependency version for my project, when I would run the project I would get the following error:
ERROR 09:31:34:241 apply$mcV$sp - Class could not be loaded and/or registered: scala.Enumeration$Val
ERROR 09:31:34:247 apply$mcV$sp - exception caught during akka-kryo-serialization startup: java.lang.ClassNotFoundException: scala.Enumeration$Val
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
I usually got lucky and was able to fix this by tweaking the versions of my dependencies.
Until I updated my akka version from 2.3.6 to 2.3.12, specifically akka-contrib which contains akka-cluster, akka-remote and akka-peristance.
Turns out that the problem was actually occurring during the transition between akka 2.3.8 and 2.3.9. Looking at the change log, I found that between these two versions the Scala version was upgraded from 2.11.4 to 2.11.5.
My project was building on scala 2.11.4. Upgrading to 2.11.5 fixed the problem.
I couldn't find any help online for this, and lost a couple days trying to figure this out. I'm hoping that this will help someone else out.

Getting IncompatibleClassChangeError while running shark-0.9.0 with hadoop 2.2.0

I am getting the following error while running shark 0.9.0.
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class scala.collection.mutable.ArrayOps, but interface was expected
at shark.SharkCliDriver$.main(SharkCliDriver.scala:82)
at shark.SharkCliDriver.main(SharkCliDriver.scala)
Any solution regarding the problem is highly appreciable.
Its a backward compatibility issue.
This exception is raised when the version of scala-library.jar is different during compilation and execution. Make sure that you use the same library version during compiling and executing.
if you are using hadoop 2.x version, do the below steps
find path to shark installation folder -name hadoop-core-1.0.4.jar
remove all the hadoop-core-1.0.4.jar
check this
http://bigdataanalyze.blogspot.com/2014/03/issues-on-shark-with-cdh5-beta2-1.html

Exception in thread "main" java.lang.NoSuchMethodError: net.sf.jasperreports.engine.design.JasperDesign.setIgnorePagination(Z)V

I am new to dynamicreports, the example can be found at the link, but it gives me the following exception.
Please help me to find the issue.
Exception in thread "main" java.lang.NoSuchMethodError: net.sf.jasperreports.engine.design.JasperDesign.setIgnorePagination(Z)V
Regards
You must be sure that you are using the correct version of the libraries.
http://dynamicreports.sourceforge.net/requirements.html
In your case you have an error with jasperreports. With DynamicReports 3.0.2, the jasperreports correct version is 4.7.0 or above