在 Windows XP 上使用 couchbase lite java 时出现问题

Issue using couchbase lite java on Windows XP

我正在为我的 JavaFX 应用程序使用 couchbase lite for java (couchbase-lite-java-1.3.1)。 我的代码在 Mac OS X,Windows 7/10 上运行良好。 现在我试图让它在 Windows XP 上运行,但我收到以下错误:

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 java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) Caused by: java.lang.RuntimeException: Unable to construct Application instance: class org.company.business.testy.Main at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:907) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication5(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication11(LauncherImpl.java:819) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait5(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null3(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater4(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null8(WinApplication.java:191) ... 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(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) 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:264) 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 org.company.business.testy.dbms.DBMS.initDatabase(DBMS.java:38) at org.company.business.testy.dbms.DBMS.(DBMS.java:23) at org.company.business.testy.dbms.DAO.(DAO.java:28) at org.company.business.testy.Main.(Main.java:91) ... 13 more Exception running application org.company.business.testy.Main

我为 Mac OS X、Windows 7 和 Windows XP 使用相同的 Netbeans 项目。 你有关于这个问题的一些信息吗?它正在尝试使用 CouchbaseLiteJavaForestDB.dll...

中的过程

谢谢。

我联系了 Couchbase Lite 开发团队,他们建议我删除 ForestDB jar 库并使用 SQLite 作为存储引擎。现在它在 Windows XP 上运行良好。

https://forums.couchbase.com/t/issue-using-couchbase-lite-java-on-windows-xp/11405/17