【发布时间】:2014-06-30 18:41:19
【问题描述】:
Aynone 让 MongoDB 驱动程序与 Xpages 一起工作?当 MongoDB 客户端尝试连接到其服务器时,我在服务器控制台上收到以下错误。
30.06.2014 20:32:55 HTTP JVM: java.lang.IllegalStateException: NotesContext not initialized for the thread. For more detailed information, please consult
C:/domino/data/domino/workspace/logs
30.06.2014 20:32:55 HTTP JVM: java.lang.IllegalStateException: NotesContext not initialized for the thread. For more detailed information, please consult
C:/domino/data/domino/workspace/logs
30.06.2014 20:32:55 HTTP JVM: Exception in thread "cluster-1-localhost:27017"
30.06.2014 20:32:55 HTTP JVM: java.lang.IllegalStateException: NotesContext not initialized for the thread
30.06.2014 20:32:55 HTTP JVM: at com.ibm.domino.xsp.module.nsf.NotesContext.getCurrent(NotesContext.java:123)
30.06.2014 20:32:55 HTTP JVM: at com.ibm.domino.xsp.module.nsf.ModuleClassLoader$DynamicClassLoader.loadClass(ModuleClassLoader.java:383)
30.06.2014 20:32:55 HTTP JVM: at java.lang.ClassLoader.loadClass(ClassLoader.java:638)
30.06.2014 20:32:55 HTTP JVM: at com.mongodb.ServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(ServerMonitor.java:162)
30.06.2014 20:32:55 HTTP JVM: at com.mongodb.ServerMonitor$ServerMonitorRunnable.waitForNext(ServerMonitor.java:143)
30.06.2014 20:32:55 HTTP JVM: at com.mongodb.ServerMonitor$ServerMonitorRunnable.run(ServerMonitor.java:120)
[12C8:00DF-590C] 30.06.2014 20:32:55 HTTP JVM: at java.lang.Thread.run(Thread.java:738)
+++ 更新 #1
a) 我将所需的库放入数据库 web-inf\libs 并将它们放在路径上
b) 只有这一行会导致上面的堆栈跟踪
MongoClient client = new MongoClient("localhost",27017);
【问题讨论】:
-
你把你的代码放在哪里了。你用了什么代码?代码规则
-
更新了之前的帖子...
-
你的问题让我试一试并将所有需要的 jar 复制到 'jvm\lib\ext' 文件夹中,它现在可以工作了。有没有办法将 jars 保留为 NSF 的一部分并避免将它们安装在我们通常无法在远程服务器上使用的文件系统上?
-
创建插件项目并在GitHub上分享
标签: xpages