0

I am attempting to combine two disparate data sources into one MBO. The sybase documentation states that you have to develop a custom result set filter in java. Ok. No big deal. I am somewhat familiar with JDBC Rowsets so I think I can probably handle this. So I go grab JConnect 7 and am attempting to use the JDBC driver in my result set filter to get a result set that I can use to filter the data set returned from the web service I am connecting to. I have tested my connection with the simple test below:

    try 
    {
        DriverManager.registerDriver((Driver)Class.forName("com.sybase.jdbc4.jdbc.SybDriver").newInstance());
        Connection conn = DriverManager.getConnection("jdbc:sybase:Tds:localhost:5500", "dba", "sql");

        Statement stmt = conn.createStatement();

        ResultSet rs = stmt.executeQuery("Select * from traveler where traveler_id = 1");
        while (rs.next()) 
        {
            System.out.println(rs.getRow());
        }
    } catch (Exception se) 
    {
        se.printStackTrace();
    }

Of which I get a rowcount of one back, which is what I am expecting. The problem is when I implement this same code in the ResultSet filter class, and attempt to preview it in the MBO, I get the following error in the eclipse debug console (distilled for clarity):

22:14:20 [ERROR] [ExecuteSection]: Execution error
java.lang.reflect.InvocationTargetException...
[...]
Caused by: java.lang.UnsatisfiedLinkError: no dbjodbc11 in java.library.path

This looks like a classpath issue, but I have the Jconnect jar in my build path, and that is verified by the fact that my little test runs successfully. Is this an eclipse issue.. is eclipse using a different classpath when executing code for the Mobile workspace project?

janarde
  • 115
  • 9

1 Answers1

0

Can't remember the exact path right now, but there is a third-party lib folder under the <SybaseInstallation>/UnwiredWorkspace folder. Try adding your jar there.

bluish
  • 26,356
  • 27
  • 122
  • 180
Nirmal Patel
  • 5,128
  • 8
  • 41
  • 52