sapjco problems

When using the java sap connector there are several things to keep in mind. Start by following the instructions in the given link ^.

You need a reference in your project to the sapjco.jar file. You could put this one on the lib of your jdk installation (%JAVA_HOME%/lib/ext) but I wouldn’t. Read aboout classloading instead.

The same for the two ddl libraries: librfc32.dll en sapjcorfc.dll can be put in your jdk lib, %WINDOWS%/system32/ or any where else. Just make sure this path is on your system variable PATH.

It’s important to start logging errors from the very first run. Because if the sapjco.jar was found on your classpath but it didn’t find the dll’s than only the first error will give you this information. It will print an UnsatisfiedLinkError and it should print the path where it’s looking as well.

You can do this yourself in Java (f you hava the rights to) with the following line of code:

System.out.println(System.getProperty("java.library.path"));

Solving this problem is easy (put the ddl’s on that path) but can be tricky because for the next calls on that sapjco.jar it will return a ClassNotFoundException.
So if you missed the first error you might be wondering why your jar wasn’t found (while it was).

just found an interesting article about external java sources in domino server. Should be possible to add a jar file to a project as well. More articles on the same very interesting website, also on classloading.

Leave a Reply

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

Please reload

Please Wait