Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to connect to Pervasive database?

    I tried to connect to Pervasive database, but I encountered the following errors. Could someone help me?

    I have setup CLASSPATH that includes pvjdbc2.jar, pvjdbc2x.jar, jpscs.jar
    and put them in C:\SmartClient\smartclientSDK\WEB-INF\lib\ directory.

    ==========================
    === 2010-06-25 10:37:17,609 [sor4] ERROR [jsp] - Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: java.sql.SQLException: java.lang.ClassCastException: com.pervasive.jdbc.v2.Driver cannot be cast to javax.sql.DataSource
    at com.isomorphic.sql.SQLConnectionManager.getConnection(SQLConnectionMa
    nager.java:156)
    at com.isomorphic.sql.SQLDriver.implementerClassForDB(SQLDriver.java:198
    )
    at com.isomorphic.sql.SQLDriver.instance(SQLDriver.java:160)
    at com.isomorphic.sql.SQLDataSource.init(SQLDataSource.java:106)
    at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.
    java:126)
    at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:212)
    at com.isomorphic.datasource.DataSource.forName(DataSource.java:186)

    server.properties
    =============
    sql.defaultDatabase: Pervasive


    sql.Pervasive.interface.type: dataSource
    sql.Pervasive.driver: com.pervasive.jdbc.v2.Driver
    sql.Pervasive.driver.networkProtocol: tcp
    sql.Pervasive.driver.serverName: 10.88.91.1
    sql.Pervasive.driver.url: jdbc:pervasive://10.88.91.1:1583/MM-DSN
    sql.Pervasive.driver.user:
    sql.Pervasive.driver.password:
    sql.Pervasive.driver.portNumber: 1583

    (Note: MM-DSN is the ODBC datasource name that points to
    the production pervasive database.)

    #2
    Use the DriverManager option.

    Note that you'll have to pick a database type that is not Pervasive and hope for SQL compatibility - MySQL and SQLServer and DB2 are good ones to try. If you want official Pervasive support, consider Feature Sponsorship.

    Comment

    Working...
    X