eclipse - mongoDB: java.lang.IncompatibleClassChangeError: Implementing class -


i trying write little test-programm different databases. mongodb 1 of them , worked fine until last friday, though didn't change in java code of mongodb class.

system: use ubuntu 14.04 vm package mongo-org. version of mongo 3.0.5.

i run mariadb, postgresql , cassandra on vm. client, have windows 7 , eclipse.

the connection , test work fine other 3 databases.

and can run "mongo" client on ubuntu well.

but when try out java test of mongodb, keep getting error:

exception in thread "main" java.lang.incompatibleclasschangeerror: implementing class     @ java.lang.classloader.defineclass1(native method)     @ java.lang.classloader.defineclass(unknown source)     @ java.security.secureclassloader.defineclass(unknown source)     @ java.net.urlclassloader.defineclass(unknown source)     @ java.net.urlclassloader.access$100(unknown source)     @ java.net.urlclassloader$1.run(unknown source)     @ java.net.urlclassloader$1.run(unknown source)     @ java.security.accesscontroller.doprivileged(native method)     @ java.net.urlclassloader.findclass(unknown source)     @ java.lang.classloader.loadclass(unknown source)     @ sun.misc.launcher$appclassloader.loadclass(unknown source)     @ java.lang.classloader.loadclass(unknown source)     @ java.lang.classloader.defineclass1(native method)     @ java.lang.classloader.defineclass(unknown source)     @ java.security.secureclassloader.defineclass(unknown source)     @ java.net.urlclassloader.defineclass(unknown source)     @ java.net.urlclassloader.access$100(unknown source)     @ java.net.urlclassloader$1.run(unknown source)     @ java.net.urlclassloader$1.run(unknown source)     @ java.security.accesscontroller.doprivileged(native method)     @ java.net.urlclassloader.findclass(unknown source)     @ java.lang.classloader.loadclass(unknown source)     @ sun.misc.launcher$appclassloader.loadclass(unknown source)     @ java.lang.classloader.loadclass(unknown source)     @ com.mongodb.mongoclientoptions$builder.<init>(mongoclientoptions.java:52)     @ com.mongodb.mongoclient.<init>(mongoclient.java:126)     @ com.mongodb.mongoclient.<init>(mongoclient.java:115)     @ de.motza.database.impl.databaseimplmongodb.connect(databaseimplmongodb.java:197)     @ de.motza.database.impl.databaseimplmongodb.instantiate(databaseimplmongodb.java:207)     @ de.motza.test.history_log.testnewdatabase(history_log.java:86)     @ de.motza.test.history_log.main(history_log.java:66)  

the part of java class, exception occurs:

private static string dbhost = "10.158.251.251"; private static int dbport = 27017; private static string dbname = "history_log"; private static mongoclient mongoclient = null; [...] @override     public void connect() {         try {             mongoclient = new mongoclient(dbhost, dbport);             db = mongoclient.getdb(dbname);         } catch (exception e) {             log.error(e);         }      } 

i read disk-space, habe 12 gb free in vm, not think problem. ran apt-get upgrade, didn't change either. reinstalled mongodb, nothing changed. tried recompile, nothing changed there either.

does have advice?

addition:

here find library tab of project. use multiple databases, marked ones important mongodb the library tab of project

one possible reason incompatibleclasschangeerror mongo library binary has changed (for whatever reason) , earlier compiled test code isn't more compatible library. suggest recompile test code , try again.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -