A few weeks ago I released a small OSGi plugin project which connect to Cloudant. More details, see my previous blog.
I have changed the plugin completly
One of the reasons is to make it easier in the future to add new functionality. There are so much nice feature to be added.
What is new
- I moved all the database related methods to the DatabaseConnector.
- Moved all the document related methods to their own DocumentConnector
- Added to the DocumentConnector a method to add an Attachment to a Document.
- Added a Logging class.
- Moved the xsp config files to their own package and changed the reference to it in the XspLibrary class.
- Changed the library ID, found the XspLibrary in the library ID not very nice. It will be
ânl.elstarit.cloudant.libraryâ to be looking for in the XSP properties of the NSF after it is installed in the Domino Designer
- Fixed an issue which caused that the library ID not was showing at all in the xsp properties file.
- Added a ConnectorResponse class which represent the Response which you get for example if you add an Attachment.
- Added Java doc.
I have updated the repository on BitBucket and also updated the ReadMe file to represent the new structure.
Hi Iâm trying to use this code in xpages with OSGI and getting the following error, what did I do wrong?
Error while executing JavaScript action expression
javax.faces.FacesException: Canât instantiate class: ânl.elstarit.cloudant.connector.CloudantConnectorâ.. java.lang.ClassNotFoundException: class java.lang.InstantiationException: nl.elstarit.cloudant.connector.CloudantConnector
Canât instantiate class: ânl.elstarit.cloudant.connector.CloudantConnectorâ.. java.lang.ClassNotFoundException: class java.lang.InstantiationException: nl.elstarit.cloudant.connector.CloudantConnector
java.lang.ClassNotFoundException: class java.lang.InstantiationException: nl.elstarit.cloudant.connector.CloudantConnector
class java.lang.InstantiationException: nl.elstarit.cloudant.connector.CloudantConnector
Expression:
1: #{javascript:var cw = {K: âsomecloudantusernameâ,
2: P: âsomecloudantpasswordâ};
3: var dm = âhttps://soemcloudantaccountid-bluemix.cloudant.comâ;
4: var data = {form:âcoachingâ, name:requestScope.reqname, issue: requestScope.reqissue};
5: try{
6: var cc = new CloudantConnector(dm, cw.K, cw.P, âcrudâ, false);
7: if (cc.isConnectedToCloudant()){
8: cc.getDocumentConnector().save(data);
9: }
10: }
11: catch(e){
12: view.postScript(âalert(âerror: â+e+ââ)â);
13: }
14: }
did you have the latest version? Do you have the OSGi plugin activated in the xsp.properties after installing the plugin? Is the plugin also available on the Domino server?