Okay, I've got code that works in Java but I can't get working in
Clojure.  Here's the code in Java

public class TutorialConnect1 extends Object {
  JCO.Client mConnection;
  public TutorialConnect1() {
    try {
      // Change the logon information to your own system/user
      mConnection = JCO.createClient(...); //Connection parameters
      mConnection.connect();
      System.out.println(mConnection.getAttributes());
      mConnection.disconnect();
    }
    catch (Exception ex) {
      ex.printStackTrace();
      System.exit(1);
    }
  }
  public static void main (String args[]) {
    TutorialConnect1 app = new TutorialConnect1();
  }
}

It simply prints some connection attributes about my system.  Here's
the same code in Clojure

(let [sap-con (com.sap.mw.jco.JCO/createClient ... )] ;connection
attributes
                           (do
                             (. sap-con connect)
                             (println (. sap-con getAttributes))
                             (. sap-con disconnect)))

I can successfully create the connection object in Clojure, but I get
an error in the following s-exp

(. sap-con connect)

The error I get is :

#<CompilerException java.lang.NoClassDefFoundError: com/sap/jdsr/
writer/DsrIPassport (NO_SOURCE_FILE:0)>

The SAP library I'm using does rely on some native methods.  The only
guess I have right now is that the native methods are being linked to
properly.

Can anyone give me a hand?

Sean
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to