Issue using couchbase lite java on Windows XP

Hi all !

I am using couchbase lite for java (couchbase-lite-java-1.3.1) for my JavaFX application.
My code is working well on Mac OS X, Windows 7/10.
Now I am trying to make it work on Windows XP but I am getting the following error:

Executing C:\Documents and Settings\Administrator\Desktop\Testy\Testy\dist\run618830020\Testy.jar using platform C:\Documents and Settings\Administrator\Desktop\NetBeans_JavaSE_7.4_Portable\App\jdk\jre/bin/java
Exception in Application constructor
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(
at com.sun.javafx.application.LauncherImpl.launchApplication(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at sun.launcher.LauncherHelper$FXHelper.main(
Caused by: java.lang.RuntimeException: Unable to construct Application instance: class
at com.sun.javafx.application.LauncherImpl.launchApplication1(
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(
at com.sun.javafx.application.PlatformImpl.lambda$null$173(
at Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(
at Method)
… 1 more
Caused by: java.lang.UnsatisfiedLinkError: C:\Documents and Settings\Administrator\Local Settings\Temp\NetBeans_JavaSE_7.4_PortableTemp\CouchbaseLiteJavaForestDB.dll: The specified procedure could not be found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.load0(
at java.lang.System.load(
at com.couchbase.lite.util.NativeLibUtils.loadLibrary(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at com.couchbase.lite.Database.createStoreInstance(
at com.couchbase.lite.Manager.openDatabase(
at com.couchbase.lite.Manager.getDatabase(
… 13 more
Exception running application

I use the same Netbeans project for Mac OS X, Windows 7 and for Windows XP.
Do you have some info about this problem? It is trying to use a procedure in CouchbaseLiteJavaForestDB.dll…

Thank you.


I believe native library loading method can not find the DLL in the jar file.

As I don’t have Windows XP environment, can you debug by yourself little further?

libraryResourcePath variable value could be different from our expectation with Windows XP.



Thank you for your help.
I’m debugging, here is the value of libraryResourcePath = /native/windows/x86/CouchbaseLiteJavaForestDB.dll

Is it normal?

Thank you for additional information. It looks fine. DLL for Windows x86 exists.

From following error message, I believe DLL couchbase provides does not meet the requirements to run CBL on Windows x86. I am not sure what are missing from this log message.

I believe Windows XP is not officially supported by CBL Java. Can you build couchbase-lite-java-forestdb for Windows XP by yourself?


Hi @hideki,

OK sure. So I have to compile the lib on XP using CMake or something equivalent?
Can you guide me through this task? Do you have some documentation?


“Not supported” means that we do not have documentation or guides for it. You’re on your own, unfortunately. (I’m sure you must have some legitimate reason to be developing for XP, but it’s an ancient OS.)

Hi @aissa,

You could follow the instruction in README of couchbase-lite-java. We have never built it with Win XP. If you have build issue, please post here. We might be able to help you.

Hi @hideki,

I cloned the Github repository “couchbase-lite-java” and read readme instructions.
I see that Visual Studio 2013 is required to build. I can’t install VS2013 on Windows XP because it is not supported.
The last supported version on XP is Visual Studio 2010. Can I use it?


Hi @aissa,

We have not tried VS2010 to build. And also we are using VS2015 now. I believe VS2013 might have an issue. Sorry for not updating README promptly.

I am not sure if Gradle support VS2010. You might encounter some difficulty.

I see that Visual Studio 2013 is required to build. I can’t install VS2013 on Windows XP because it is not supported.

There’s no reason you have to build on XP. Build it on an up to date Windows system and then deploy it on XP.

The caveat to that is if there is any c++ involved you must install the proper redistributable package that includes the runtime library.

Couchbase provided DLL, which was built with VC2015 on Windows 7, does not work on Windows XP. Do you know how we can figure out the requirements (redistributable package)?

– updated –
Does installing Visual C++ Redistributable for Visual Studio 2015 sufficinet?

Guys, XP is not supported. Period.

Hi @jens,

The software we develop is used in developing countries in health domain (Tuberculosis). Half of the diagnostic computers financed by WHO are on Windows XP. The reason we chose Couchbase Mobile is that it meets well all our requirements. Sorry, but I don’t see where Windows XP is marked as not supported.

Given that Microsoft support for Windows XP itself formally ended nearly three years ago I’d think that it would be in the “better ask to make sure” category and not the “safe unless marked otherwise category,” but regardless I don’t think there is anywhere that claims support for it (although we could do better with our support statement for mobile) and support is generally in the explicit category (i.e. we support X) as opposed to the implicit category (i.e. we don’t support X).

@hideki, it’s trying to load the CouchbaseLiteJavaForestDB DLL. That shouldn’t be required unless the database is trying to use ForestDB, right?

It is correct. @aissa can try to use SQLite as a storage engine.

1 Like

@jens, @hideki,

Yes I’ll use SQLite mode for the moment (I just tested and it’s working on Windows XP :heart_eyes:) and see later if I can build ForestDB for XP.

Thank you guys.

1 Like

ForestDB will improve performance, but if your app is fast enough with SQLite you may not need to go through the pain of trying to build ForestDB :slight_smile:

(Just remember to use transactions around multiple writes. Without a transaction, making lots of writes is slow.)

1 Like