Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    1

    Unanswered: Pervasive, Coldfusion and Linux

    I'm trying to connect to a Pervasive JDBC datasource on a Linux server, using Coldfusion. When adding a Coldfusion datasource I receive the following error:

    Connection verification failed for data source: Test
    []java.sql.SQLException: No suitable driver available for Test, please check the driver setting in resources file, error: com.pervasive.jdbc.v2.driver
    The root cause was that: java.sql.SQLException: No suitable driver available for Test, please check the driver setting in resources file, error: com.pervasive.jdbc.v2.driver

    My settings are:

    JDBC URL: jdbc: pervasive://192.168.0.1:1583/Demodata
    Driver Class: com.pervasive.jdbc.v2.driver

    Can anybody please help?

    Ericus Steyn

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    Does the following JDBC sample work? If so, then there's something within ColdFusion. Usually, when I see the type of error you're seeing, it's a Classpath issue. You'll want to make sure that the Pervasive JDBC driver JARs are in the classpath.

    Code:
    /*
     * SQLStatement.java       
     * Simple JDBC Sample using Pervasive JDBC driver. 
     */
    import java.*;
    import java.sql.*;
    import pervasive.jdbc.*;
    
         
    public class SQLStatement  {
    
    	public static void main(String args[]) {
    		  
    		String url = "jdbc:pervasive://192.168.0.1:1583/Demodata";
    		Connection con;
    		
    		String query = "select * from class";
    		Statement stmt;
    		
    		try {
    			Class.forName("com.pervasive.jdbc.v2.Driver");
    
    		} catch(Exception e) {
    			System.err.print("ClassNotFoundException: ");
    			System.out.println(e.toString());
    			System.err.println(e.getMessage());
    			
    		}
    
    		try {
    
    			Connection conn=  DriverManager.getConnection(url);
    
    			stmt = conn.createStatement();							
    	
    			ResultSet rs = stmt.executeQuery(query);
    			ResultSetMetaData rsmd = rs.getMetaData();
    			int numberOfColumns = rsmd.getColumnCount();
    			int rowCount = 1;
    			long j = 0;
    			
    			while (rs.next()) {
    				System.out.println("Row " + rowCount + ":  ");
    				for (int i = 1; i <= numberOfColumns; i++) {
    					System.out.print("   Column " + i + ":  ");
    					System.out.println(rs.getString(i));
    				}
    				System.out.println("");
    				rowCount++;
    			}
    			stmt.close();
    			conn.close();
    
    		} catch(SQLException ex) {
    			System.err.print("SQLException: ");
    			System.err.println(ex.getMessage());
    		}	
    	}
    }
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •