Boomn4x4
New Member
Hello,
I am trying to use Java to connect to the Progress DB, and am failing to do so... I have to assume there is something wrong with my path's and/or libraries. It appears that I can't even load the driver.
Here is an "ls" of my /zzz/dlc/java directory
From my understanding, I need the progress.jar, base,jar, openedge.jar, spy.jar, and util.jar packages.... all of which are there.
I have my CLASSPATH (per some documentation I've read) set to CLASSPATH=/zzz/dlc/java
My code is:
When I execture... I thrown an exception as follows.
Any help would be appreciated.
I am trying to use Java to connect to the Progress DB, and am failing to do so... I have to assume there is something wrong with my path's and/or libraries. It appears that I can't even load the driver.
Here is an "ls" of my /zzz/dlc/java directory
Code:
aia.jar java.policy o4glrths.jar osmetrics.jar proxygen.zip util.jar
base.jar messages.jar o4glrthsl.jar pool.jar schema.jar
doc o4glrt.jar o4glrts.jar progress.jar spy.jar
ext o4glrth.jar openedge.jar prosp.jar techsupp
From my understanding, I need the progress.jar, base,jar, openedge.jar, spy.jar, and util.jar packages.... all of which are there.
I have my CLASSPATH (per some documentation I've read) set to CLASSPATH=/zzz/dlc/java
My code is:
Code:
import java.net.URL;
import java.sql.*;
import java.io.*;
import java.util.Properties;
public class ProgressTest
{
public static String dbUrl = "jdbc:datadirect:openedge://xxxxxxxxx;DatabaseName=xxx";
public static Connection con = null;
public static void main (String args[])
{
try
{
// Load the driver
Driver dbDriver = (Driver)Class.forName("com.progress.sql.jdbc.JdbcProgressDriver").newInstance();
Properties props = new Properties();
props.put("user", "xxx");
props.put("password", "");
con = dbDriver.connect(dbUrl, props);
}
catch (Exception e)
{
e.printStackTrace();
System.out.println("Error: " + e.getMessage());
}
}
}
When I execture... I thrown an exception as follows.
Code:
mxb931@mxbscs:/fiscal> java ProgressTest
Exception in thread "main" java.lang.NoClassDefFoundError: ProgressTest
Caused by: java.lang.ClassNotFoundException: ProgressTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: ProgressTest. Program will exit.
Any help would be appreciated.