elstar IT

Fullstack | Java | Tech Speaker | Tech Coach | Frank van der Linden

  • About me
  • Blog license
  • My Open source projects

Update on my Cloudant connector for XPages

15-04-2016 2 responses flinden68 development

update

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.

Tags: cloudant, development, java, OSGi, xpages

2 thoughts on “Update on my Cloudant connector for XPages”

  1. Gregorius Widjanarko says:
    01-08-2016 at 11:13

    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: }

    Reply
    1. Frank van der Linden says:
      26-08-2016 at 10:43

      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?

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • « Cloudant-connector for XPages
  • XPages tip: Demo code for multi language support »

Contact me

My name is Frank van der Linden and I am an independent software developer based in the Netherlands. The last 2 years I was awarded as IBM Champion. Also I am on the board of OpenNTF. My specialisations are Java, Web development and Domino.


If you want to hire me, please fill in the Contact form


IBM Champion web badge
Apache Logo

All the code on this blog are under the Apache License 2.0. For more details, see Apache License 2.0

Most recent posts

  • NL Portal, a open source project
  • 10th anniversary as a freelancer and more…
  • Engage 2020: Hello are you listening, There is stream for everything
  • Spring Cloud Function on Azure run locally
  • Deploy Spring Cloud Function to IBM Cloud

Latest reactions

  • Spring Cloud Function on Azure run locally - elstar IT on Deploy Spring Cloud Function to IBM Cloud
  • flinden68 on Quick XPages tip: add Fullcalendar plugin to your application
  • Rajesh samal on Quick tip: Swagger support for Spring Webflux
  • dsieyx on Quick XPages tip: add Fullcalendar plugin to your application
  • John on Named as IBM Champion 2019

Archive

  • November 2024
  • April 2024
  • March 2020
  • February 2020
  • January 2020
  • October 2019
  • September 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • October 2018
  • September 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014

Category

  • bluemix
  • business
  • cloudant
  • community
  • development
  • hrassistant
  • openntf
  • running
  • salesforce
  • Springboot
  • Tesla
  • trailrunning
  • Uncategorized
  • watson
  • OpenNTF
  • Collaboration Today
  • XSnippets
  • Stackoverflow
  • IBM Collaboration Solutions
  • Social Business Toolkit
  • About me
  • Dutch curriculum vitae
  • English curriculum vitae
  • Google+
  • LinkedIn profile
  • Twitter
  • Slideshare
  • Blog license
  • My open source projects