Aynone got MongoDB driver working with Xpages? I'm getting following error on server console when MongoDB client tries to connect to its server.
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)
+++ Update #1
a) I put the required libraries into database web-inf\libs and put them on path
b) this only line causes the stacktrace above
MongoClient client = new MongoClient("localhost",27017);
Seems your issue is with access rights. If you want to add the JARs as a plugin instead of putting them in the jvm/lib/ext directory (which quickly becomes a mess) then you could wrap them in an OSGi plugin and deploy that to your server/Domino Designer.
I had the same challenges 6 months ago - and when I figured out, I wrote a blog article about how to do it (well actually two - also how to deploy). You can see the details here: http://www.dalsgaard-data.eu/blog/wrap-an-existing-jar-file-into-a-plug-in/
The jars are not part of the database - but you will enable them for the database (or for each database where you need it - since they will be available to all).
HTH ;-)
/John
Related
I am using internal service which uses org.asynchttpclient library for HTTP request. From my Spark app when a remote http call is made I am seeing Http 408. The request goes through haproxy, and looks like the request fails to complete with following error
java.lang.IllegalAccessError: tried to access method io.netty.channel.DefaultChannelId.<init>()V from class org.asynchttpclient.netty.channel.Channels
at org.asynchttpclient.netty.channel.Channels.initChannelId(Channels.java:67)
at org.asynchttpclient.netty.request.NettyChannelConnector$1.onSuccess(NettyChannelConnector.java:90)
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:26)
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:20)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:507)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:500)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:479)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:420)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:82)
I added this code to load the system properties file in Java Agent but i am getting error as allowed to access system properties.
I want to load the abcd properties file which is in Windows server in C drive From there properties file is going to be picked from the code.
inp = new FileInputStream("/abcd.properties");
if(inp== null)
{
System.out.println("FIND NOT FOUND!!!!!!!!!!!");
}
else{
System.out.println("FIND FOUND");
}
p.load(inp);
System.out.println(p.getProperty("flag"));
I tried removing the
java.lang.SecurityException: not allowed to access system properties
08/22/2016 12:47:44 AM HTTP JVM: at lotus.notes.AgentSecurityManager.checkPropertiesAccess(Unknown Source)
08/22/2016 12:47:44 AM HTTP JVM: at java.lang.System.getProperties(System.java:342)
08/22/2016 12:47:44 AM HTTP JVM: at JavaAgent.NotesMain(JavaAgent.java:73)
08/22/2016 12:47:44 AM HTTP JVM: at lotus.domino.AgentBase.runNotes(Unknown Source)
08/22/2016 12:47:44 AM HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)
Try setting "Runtime security level" to 2 in order to allow access to the file system:
For those that may have similar issues, this is as a result of the JVM's Security Manager not allowing access to the system's properties.
To allow access to the system, the security policy must specify this action, so the solution will be to change the security policy of the Java Virtual Machine (JVM), which in turn will allow access to the system properties.
Please visit: www-01.ibm.com/support/docview.wss?uid=swg21173567 for a detailed solution.
We are getting the error like this
12/06/2015 14:42:35 HTTP JVM: CLFAD0211E: Exception thrown. For more detailed information, please consult error-log-0.xml located in F:/Lotus/Domino/data/domino/workspace/logs
12/06/2015 14:42:35 HTTP JVM: CLFAD0246E: Exception occurred servicing request for: /xsp/.ibmxspres/domino/ckeditor/ckeditor.js - HTTP Code: 500. For more detailed information, please consult error-log-0.xml located in F:/Lotus/Domino/data/domino/workspace/logs
12/06/2015 14:42:36 HTTP JVM: CLFAD0211E: Exception thrown. For more detailed information, please consult error-log-0.xml located in F:/Lotus/Domino/data/domino/workspace/logs
12/06/2015 14:42:36 HTTP JVM: CLFAD0246E: Exception occurred servicing request for: /xsp/.ibmxspres/domino/ckeditor/skins/lotus21/editor.css - HTTP Code: 500. For more detailed information, please consult error-log-0.xml located in F:/Lotus/Domino/data/domino/workspace/logs
or
12/06/2015 16:22:37 HTTP JVM: CLFAD0211E: Exception thrown. For more detailed information, please consult error-log-0.xml located in F:/Lotus/Domino/data/domino/workspace/logs
12/06/2015 16:22:37 HTTP JVM: CLFAD0246E: Exception occurred servicing request for: /ASAP/helpdesk2000.nsf/xpASAPRequest.xsp - HTTP Code: 500. For more detailed information, please consult error-log-0.xml located in F:/Lotus/Domino/data/domino/workspace/logs
12/06/2015 16:22:38 HTTP Web Server: Command Not Handled Exception [/path/db.nsf/xpage.xsp?documentId=BE7D455563ECAD9DC1257E5F0031A703&action=editDocument&viewname=abc&$$ajaxid=view%3A_id1%3AidAssignTo] CN=user name/OU=OrgUnit../OU=OrgUnit../OU=OrgUnit../O=Org..
This does not happen always but happens 6 to 8 times every day.
Please help to identify the reason and how to rectify.
An error 500 points at some server logic failing. In your case this could be some SSJS (Serverside JavaScript) or Java that fails. Your first step in identifying the problem is to have a look at the error logs as stated in the message. That can be a little tedious to get to as these files sit in the file system on the server.
However, there is an OpenNTF project to help you! It is called "OpenNTF Log File Reader". Follow this link where you will find a short video about it - and a download link ;-)
Once you identified the code that throws the error you have many different options for identifying the issue ranging from adding a "print" statement to doing a remote debug (which you should only do on a development server though).
/John
I had the same problem , and I resolved it ssjs side. There was no info in "/workspace/logs/error-log-0.xml" . file I commented my new code one by one, then I found the coding error and fixed it.
I´m testing the access to RDBMS through extension library, but there was no sucess. I installed the plugin and the Xpages extension library extended, but when I tested a xpage with combobox that the values are the relational table by the #JdbcDbColumn, the error below display. I´m testing in local in designer not a server.
Error while executing JavaScript computed expression
Script interpreter error, line=2, col=8: Error while executing function '#JdbcDbColumn'
comp/env/jdbc/db2
Updated info:
I'm using Lotus Notes client version 8.5.3 with UP1 and Extension Library components of relational databases connectivity version 8.5.3.20130315-0724. The content in JDBC file is:
<jdbc> <driver>com.ibm.db2.jcc.DB2Driver</driver>
<url>jdbc:db2://hostname:50000/databasename</url> <user>userdb2</user>
<password>password</password> </jdbc>
From log.nsf:
HTTP JVM: com.ibm.xsp.webapp.FacesServlet$ExtendedServletException: com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript computed expression
HTTP JVM: CLFAD0134E: Exception processing XPage request. For more detailed information, please consult error-log-0.xml located in c:/Lotus/Notes8/Data/domino/workspace/logs`
From log error-log-0.xml:
CLFAD0211E: Exception thrown;
CLFAD0246E: Exception occurred servicing request for: /Chapter12.nsf/teste_db2.xsp - HTTP Code: 500;
CLFAD0134E: Exception processing XPage request
I put try/catch and the catch I put printStackTrace():
HTTP JVM: java.sql.SQLException, Caused by:
HTTP JVM: javax.naming.NameNotFoundException: comp/env/jdbc/db2
HTTP JVM: at com.ibm.pvc.jndi.internal.provider.java.FlatMappingContext.lookup(FlatMappingContext.java:118)
HTTP JVM: at com.ibm.pvc.jndi.internal.provider.java.FlatMappingContext.lookup(FlatMappingContext.java:140)
HTTP JVM: at javax.naming.InitialContext.lookup(InitialContext.java:436)
Further update:
I moved the connection file "db2.jdbc" to WebContent/WEB-INF/JDBC and the driver was found but the error below was displayed:
HTTP JVM: com.ibm.db2.jcc.c.SqlException: [ibm] [db2] [jcc] [10109] [10354] The version of the IBM Universal JDBC driver in use is not is licensed for connectivity to banks QDB2 data.
HTTP JVM: To connect to this DB2 server, get a licensed version of IBM DB2 Universal Driver for JDBC and SQLJ copy.
HTTP JVM:. An appropriate license file db2jcc_license _ * jar for this target platform must be installed in the classpath of the application.
HTTP JVM: Connectivity banks QDB2 data is activated by one of the following license files: [db2jcc_license_cisuz.jar].
Great! Its working! I included the license file db2jcc_license_cisuz.jar in the directory. The integration with DB2 works in values of a combobos, but when I try to use in a view panel the error "HTTP Web Server: Command Not Handled Exception" occurs. What´s wrong?
I configured view panel following the instructions of NotesIn9 047 Intro to XPages and Relational Data.
Actually, my best guess is that it isn't finding the DB2 JDBC driver, as I take it you mean you are previewing the app in the Notes Client? You should copy the DB2 JDBC driver plugin from C:\<db2-install>\java\db2jcc.jar to C:\<client-install>\jvm\lib\ext\.
Furthermore, you should copy the license file as well, from C:\<db2-install>\java\db2jcc_license.jar to C:\<client-install>\jvm\lib\ext\.
Another suggestion:
It looks like it can't find the jdbc connection file. The file should be namesd db2.jdbc in your application, and it should be located in the WebContent\WEB-INF\jdbc folder
Similar previous questions:
JDBC installed, but getting error trying to connect to Oracle
JDBC Ordeal: it shouldn't be that difficult (Partial Solved, New Errors)
OpenNTF question
So, well, I am trying to get started with Workflow for XPages however, I am not able to get the activiti-explorer working. I am trying to setup the application named "Sample Application on Activiti" (this application is present as one of the sample).
I followed the following steps as listed in the tutorial:
Installed Extension Library and H2 Database; and copied the active server plugins.
Installed the site.xml on client and server.
Started the h2 database.
Updated the activiti.workflow file
According to these steps when I visit "myServer/activiti-explorer" a login should come but instead I am getting the above mentioned error. The only solution I thought about was that the activiti-explorer.war file was to be kept in the domino directory somewhere (similar to webapps in tomcat: which works very well btw.). I tried putting it in "domino/data" directory with no success.
Also, there is an open topic on openntf discussion tab of the same project with no response yet. Just for reference the link is:
http://www.openntf.org/main.nsf/project.xsp?r=project/Workflow%20for%20XPages/discussions/6B020B585420E70886257B6E004E5A32
Edit 1: After digging in more, I found out that the domino throws a different error the very first time I try to access the activiti-explorer and rest all times it throws the same error mentioned in the title. However, the console looks something like this after the first request.
18-06-2014 12:17:17 HTTP JVM: Activiti Explore Started
18-06-2014 12:17:17 HTTP JVM: Web Container : com.ibm.pvc.internal.webcontainer.webapp.BundleDeployedModule : CWPWC0032E: Error occured while processing annotation for the servlet java.lang.ClassNotFoundException: org.activiti.explorer.servlet.ExplorerApplicationServlet.
18-06-2014 12:17:17 HTTP JVM: 1. The supported annotations are #DeclareRoles,#PreDestroy and #PostConstruct for servlets.
18-06-2014 12:17:17 HTTP JVM: 2. Check that the class resides in the proper package directory.
18-06-2014 12:17:17 HTTP JVM: 3. Check that the classname has been defined in the server using the proper case and fully qualified package.
18-06-2014 12:17:17 HTTP JVM: 4. Check that the class was transfered to the filesystem using a binary transfer mode.
18-06-2014 12:17:17 HTTP JVM: 5. Check that the class was compiled using the proper case (as defined in the class definition).
18-06-2014 12:17:17 HTTP JVM: 6. Check that the class file was not renamed after it was compiled. Thread[Thread-6,5,main]. For more detailed information, please consult error-log-0.xml located in C:/Program Files/IBM/Lotus/Domino/data/domino/workspace/logs
I understand it is a class not found exception but I am not sure how to get through it.
Any help would really be appreciated here. Thanks.