facebook

How do I connect to Progress9.1 database?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #291358 Reply

    muddu_shafi
    Member

    I wrote a program to connect to Progress database using JDBC.
    I wrote code in Eclipse and I am trying to read dabase properties from a file stored in C:\ drive as database.properties?
    but when I try to connect to the database using the program, it displays
    Error:
    Caused by: java.lang.ClassNotfoundException: com.progress.sql.jdbc.JdbcProgressDriver?

    I think this might be because I dont have a plugin installed for Progress in Eclipse? Can you provide me the adress where I can download the plugin or jar file ? where should I store the file?

    Here is a snapshot of the code I am using to connect to database along with the properties file:
    database.properties

    qad.proxy.db.driver=com.progress.sql.jdbc.JdbcProgressDriver
    qad.proxy.db.url=jdbc:JdbcProgress:T:qad1.atcc.org:16600:prodproxy
    qad.proxy.db.user=xxxxxx
    qad.proxy.db.password=yyyyyyy

    Code to connect to this file:-

    private Connection connectToDatabase(String name) throws ErpProxyDaoException, SQLException{
        String driver = null;
        String url = null;
       String userName = null;
       String password = null;
       try{
        Properties inProps = new Properties();
        FileInputStream in = new FileInputStream("C:\\database.properties");
        if (in == null) {
        throw new IOException("C:\\database.properties" + " unable to read");
        } else {
                inProps.load(in);
        driver = inProps.getProperty("qad." + name + ".db.driver");
         url = inProps.getProperty("qad." + name + ".db.url");
        userName = inProps.getProperty("qad." + name + ".db.user");
        password = inProps.getProperty("qad." + name + ".db.password");
        ErpProxyProgressDAO.logger.info("url = " + url + " username = " +  userName + " for db " + name);
        }
                            Class.forName(driver);
        Connection connection = DriverManager.getConnection(url, userName, password);
        ErpProxyProgressDAO.logger.fine("Got connection ..." + connection);
        return connection;
            } catch (ClassNotFoundException e) {
                throw new ErpProxyDaoException("Error loading driver ", e);
            } catch (IOException e) {
                throw new ErpProxyDaoException("C:\\database.properties" + " unable to read");
            }
        }
    #291361

    Loyal Water
    Member

    Do you have the PostGres driver jars on the project build path? Right click on you project and add the jars to the build path and let me know if the problem persists after that.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How do I connect to Progress9.1 database?

You must be logged in to post in the forum log in