I am using couchbase lite for java for my windows application.
In my code I am successfully able to push my local data on the couchbase server. However when I am trying to pull it, it is unable to do so. Earlier I was trying to do it with couchbase-lite-java-1.2.1. It displayed no error in the log.
So now I am trying to do it using couchbase-lite-java-1.3.1. But I am getting the following error:
Library not found: /native/windows/x86/CouchbaseLiteJavaForestDB.dll
Error loading library: CouchbaseLiteJavaForestDB
java.lang.NullPointerException
at com.couchbase.lite.util.NativeLibUtils.loadLibrary(NativeLibUtils.java:45)
at com.couchbase.lite.store.ForestDBStore.(ForestDBStore.java:75)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.couchbase.lite.Database.createStoreInstance(Database.java:1156)
at com.couchbase.lite.Database.open(Database.java:1221)
at com.couchbase.lite.Manager.openDatabase(Manager.java:335)
at com.couchbase.lite.Manager.getDatabase(Manager.java:299)
at pluginforcouchbase.actions.CouchbaseConnection.ConnectToDatabase(CouchbaseConnection.java:73)
at pluginforcouchbase.actions.CouchbaseDataManupulation.connect(CouchbaseDataManupulation.java:27)
at pluginforcouchbase.actions.CouchbaseDataManupulation.updateDocInDb(CouchbaseDataManupulation.java:60)
at pluginforcouchbase.actions.TestCouchbase.test2(TestCouchbase.java:37)
at pluginforcouchbase.actions.TestCouchbase.main(TestCouchbase.java:44)
Sep 26, 2016 2:53:28 PM com.couchbase.lite.util.SystemLogger e
SEVERE: Database: ERROR: Failed to load CouchbaseLiteJavaForestDB
Library not found: /native/windows/x86/sqlcipher.dll
Sep 26, 2016 2:53:28 PM com.couchbase.lite.util.SystemLogger e
SEVERE: CBLite: Cannot find library: sqlcipher
Library not found: /native/windows/x86/sqlite3.dll
Sep 26, 2016 2:53:28 PM com.couchbase.lite.util.SystemLogger e
SEVERE: CBLite: Cannot find library: sqlite3
JavaSQLiteStorageEngine
Sep 26, 2016 2:53:28 PM com.couchbase.lite.util.SystemLogger e
SEVERE: Database: Cannot load native library
Library not found: /native/windows/x86/sqlcipher.dll
Sep 26, 2016 2:53:28 PM com.couchbase.lite.util.SystemLogger e
SEVERE: CBLite: Cannot find library: sqlcipher
Library not found: /native/windows/x86/sqlite3.dll
Sep 26, 2016 2:53:28 PM com.couchbase.lite.util.SystemLogger e
SEVERE: CBLite: Cannot find library: sqlite3
Sep 26, 2016 2:53:28 PM com.couchbase.lite.util.SystemLogger e
SEVERE: Database: Cannot load native library
Why is it trying to fetch DLLs when I am working with Java Jars.
I am just trying to create a manager object and fetching my database. Following is my source code:
try {
manager = new Manager(new JavaContext("\DatabaseData"),
Manager.DEFAULT_OPTIONS);
database = manager.getDatabase(dbName);// create or open database
} catch (CouchbaseLiteException e) {
e.printStackTrace();
}
Is this a bug in the new JAR? or am I doing something wrong ? @simonbasle@jens
Hi @aniket.khedekar,
Thank you for reporting this issue.
I assume you downloaded couchbase lite for Java from Couchbase download site. I confirmed that Zip file does not include CouchbaseLiteJavaForestDB.dll.
Best regards,
Hideki
I am not sure where sqlcipher.dll keyword comes from. CBL Java does not dynamically link to sqlcipher.dll. Do you use SQLCipher? How do you integrate SQLCipher into your project? Can you share your development environment? I will try to reproduce with Windows machine.
Both getPendingDocumentIDs() and getDocIds() are only push replication feature. For pull replication, they just return null.
and getting the following issue when executing manager.getDatabase(dbName):
Library not found: /native/windows/x86/sqlcipher.dll
Sep 27, 2016 12:32:36 PM com.couchbase.lite.util.SystemLogger e
SEVERE: CBLite: Cannot find library: sqlcipher
JavaSQLiteStorageEngine
Library not found: /native/windows/x86/sqlcipher.dll
Sep 27, 2016 12:32:37 PM com.couchbase.lite.util.SystemLogger e
SEVERE: CBLite: Cannot find library: sqlcipher
Following is my environment:
IDE: Eclipse (Neon Release (4.6.0)),
OS: Windows 8 (32 bit)
Processor: Intel i5-3230M 2.60GHz
JRE: 1.8.0_51
Couchbase lite Java 1.3.1
I’ve created a basic java project for evaluating Couchbase lite as an offline option for my windows application.
@borrrden,
Thank you for your inputs. As you wrote, libsqlcipher.so/dylib for Linux and OSX are in JAR file. But not sqlicipher.dll for Windows in Windows. This requires to fix build script for Windows.
Thanks!
Hi @aniket.khedekar,
We will fix sqlcipher.dll issue on windows with next release. Till it will be available, please use solution @borrrden posted earlier.
I will go ahead and do that, I just saw that the PR had been accepted months ago and figured it should hopefully make it into a production version soon. Thanks!