cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Error when creation data source in websphere with neo4j jdbc driver

Im trying to create data source for neo4j in websphere application server but its failing to connect. Any pointers on this would be helpful.

JDBC Driver Created with the following parameters:

  • Name : neo4j Driver
  • Class path : path of the neo4j jdbc jar/neo4j-jdbc-driver-3.3.1.jar
  • Implementation class name : org.neo4j.jdbc.Driver

Data source created with the following :

  • jndi Name: jdbc/neo4j

Custom Properties:

    1. auth : container
    1. type: javax.sql.DataSource
    1. username: neo4j
    1. password: password
    1. url:jdbc:neo4j:bolt://localhost:port
    1. removeAbandonedOnBorrow : true
    1. closeMethod : close

The properties are added based on the pointers provided in https://github.com/neo4j-contrib/neo4j-jdbc

Here is the error from logs:

java.lang.Exception: DSRA8101E: DataSource class cannot be used as one-phase: ClassCastException: org.neo4j.jdbc.bolt.BoltDriver incompatible with javax.sql.ConnectionPoolDataSource [5/27/19 13:12:41:533 UTC] 00000111 SystemErr R at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:441) [5/27/19 13:12:41:533 UTC] 00000111 SystemErr R at com.ibm.ws.rsadapter.DSConfigHelper.getPooledConnection(DSConfigHelper.java:1340)

3 REPLIES 3

A similar error message is discussed in https://stackoverflow.com/a/36931996/158701. One user there suggests to enable "isolate this resource provider" in websphere config.

(Disclaimer: Not being a websphere user myself.)

@stefan.armbruster.I checked the steps provided in the link. This did not help 😞

Another idea: the ClassCastException gives me the impression that WebSphere expects a DataSource instance and not a JDBC driver class.

Try to use org.neo4j.jdbc.bolt.BoltNeo4jDataSource instead of org.neo4j.jdbc.Driver for implementation class name.

If that doesn't work revert to org.neo4j.jdbc.Driver and try to change the type properties to something else than javax.sql.DataSource. Don't know what an alternative value could be, maybe WebSphere docs tell you.