android - Neo4j OGM Library Driver configuration -


i'm trying use neo4j ogm library 2.0.1 in android application.

this builde.gradle file:

dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     testcompile 'junit:junit:4.12'     compile 'com.android.support:appcompat-v7:23.3.0'     compile 'org.neo4j:neo4j-ogm-core:2.0.1'     compile 'org.neo4j:neo4j-ogm-http-driver:2.0.1' } 

then in oncreate() method inside main activity:

configuration configuration = components.configuration();         configuration.driverconfiguration()                 .setdriverclassname("org.neo4j.ogm.drivers.http.driver.httpdriver")                 .seturi("http://socialphonebook:a24mwont0eapsi2ct679@socialphonebook.sb09.stations.graphenedb.com:24789/db/data/"); sessionfactory sessionfactory = new sessionfactory("it.lucaspuerari.entities"); sessionfactory.opensession(); 

i got error:

e: fatal exception: main    java.lang.nosuchmethoderror: no static method encodebase64string([b)ljava/lang/string; in class lorg/apache/commons/codec/binary/base64; or super classes (declaration of 'org.apache.commons.codec.binary.base64' appears in /system/framework/org.apache.http.legacy.boot.jar)        @ org.neo4j.ogm.authentication.usernamepasswordcredentials.<init>(usernamepasswordcredentials.java:28)        @ org.neo4j.ogm.config.driverconfiguration.setcredentials(driverconfiguration.java:72)        @ org.neo4j.ogm.config.driverconfiguration.seturi(driverconfiguration.java:58) 

your problem trying use ogm on android, team behind ogm never try in android environment , android isn't target platform. may know android java different oracle java.

if want use ogm on android recommend fork ogm , try build , run test agains android java.

your problem missing encodebase64string method, because android's library old , should use android.util.base64 instead of org.apache.commons.codec.binary.base64.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -