How can I add a InterBase JDBC connection pool in

2019-09-01 06:01发布

问题:

Using: InterBase 2007, latest interclient.jar (8.1.8), GlassFish v3 b68.

I try to configure the connection pool in the web admin console page "Edit Connection Pool" with these settings:

  • Resource Type: javax.sql.DataSource
  • Datasource Classname: interbase.interclient.DataSource

A 'ping' in the same screen returns this error message:

java.lang.NullPointerException: "null" interbase.interclient.Connection.(Unknown Source) interbase.interclient.DataSource.getConnection(Unknown Source) interbase.interclient.DataSource.getConnection(Unknown Source) com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:102) com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getManagedConnection(ConnectorConnectionPoolAdminServiceImpl.java:517) com.sun.enterprise.connec...

The interclient.jar 8.1.8 (Interbase 2007) is in the domain lib directory.

回答1:

The exception is not clear, but that's an implementation detail. At least, the getConnection() usually expects a non-null JDBC URL. So, did you specify a valid JDBC URL for the datasource?