BizzyBee’s BizzyThoughts

Think Outside The Hive - About Notes and Web
 
 

How to use SAP JCo in Domino as an alternative to the Lotus Connector for SAP


Years ago I had to connect to SAP from within a Notes web application. I used the Lotus Connector for SAP solutions for it, but I wasn’t really happy with it.

One reason was that the “in between” code was written by another person and I didn’t quite understand what was going on. It was more or less a black box and I was loosing days figuring out what went wrong if reading or writing data didn’t work.

Another reason was: I think it costs a lot of money (and if I’m informed well enough, on a yearly basis), although it wasn’t mine, but the company I was working for that payed for it.

This year I had to make another connection to SAP, but this time I didn’t want to use the Lotus Connector. I believed it must be possible to use SAP’s own free solution for it: SAP JCo.

Believing this costed me a lot of sweat, because it’s not really documented anywhere how to use it with Domino and I’m not a Java guy. But apart from the Java part that was rather new to me, getting it to work in the first place wasn’t simple, and this is what I found out what works. It’s in the first place a matter of putting the files on the right place, and the locations mentioned below were found out with a lot of trial and error.

A little warning: use this at your own risk and make sure you try it on your development/test server first!

  1. Download and extract the latest version of the installation files from SAPNet. You will need to have a username/password for this, so ask your SAP collegues to download it for you.
  2. Copy librfc32.dll and sapjcorfc.dll to the Domino program directory
  3. Copy sapjco.jar to [Domino program directory]/jvm/lib/ext
  4. Restart the Domino server.

If you want to learn more about how to work with it, there’s sample data and documentation in the installation zip (don’t ask me about the programming, I got it to work thanks to a lot of assistance of the Java collegues).

For web applications I read data using a WebQueryOpen agent and wrote data using a WebQuerySave agent.


1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5 out of 5)
Loading ... Loading ...

3 Responses to “How to use SAP JCo in Domino as an alternative to the Lotus Connector for SAP”

  1. Gravatar Johann Echavarria says:

    Hi Martin.

    Your article is very interesting

    I have a problem trying to connect Lotus Domino 7 and SAP using a Java agent.

    I downloaded the JCo 2.1 from sap web site.

    I put the 3 files(librfc32.dll, sapjcorfc.dll and sapjco.jar) in windows/system32, also in : ..\Domino\jvm\lib\ext also in ..\Domino\jvm\lib\ext\x86
    also in Domino\

    I restarted the Domino server but the log showed me:

    java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer ‘com.sap.mw.jco.rfc.MiddlewareRFC’
    not allowed to access or modify file: C:\Archivos de programa\IBM\Lotus\Domino\jvm\lib\ext\x86\sapjcorfc.dll

    I will appreciate if you can help me in any way.

    editorlapagina@gmail.com

  2. Gravatar Martin Vereecken says:

    Hi Johann,

    I’m not at that company anymore, I have other clients now, but this is what I remember from it: you should really copy the files in the direcories as specified, and remove them from other directories (it’s not better to put them on more place “just to make sure”, it can give some interference).

    Also, it’s strange that it tries to access the file in “Archivos de programa”, it seems like it finds the files on wrong places. Try removing all files not on the right spots first and restart your server.

    Regards,
    Martin

  3. Gravatar Johann Echavarria says:

    Hi Martin.

    I just checked the “Allow restricted operations” agent property and everyting worked OK.

    It was very useful your indications about when to put the files:

    “sapjco.jar to [Domino program directory]/jvm/lib/ext”

    And

    “librfc32.dll and sapjcorfc.dll to the Domino program directory”

    Thank you very much for your article and your answer.

Leave a Reply