Hi, Satish:

Thank you for your advice.
 I changed the dataSourceClassName to com.edb.ds.PGSimpleDataSource, and the 
ClassCastException is gone. 
But there happened another error "Property url does not exist on target class 
com.edb.ds.PGSimpleDataSource". 
I changed the property to PGPoolingDataSource, the same error remains.

Am I using a wrong edb-jdbc lib? I googled, and nearly all of the example is 
referring to edb-jdbc16.jar.
Does the HikariDataSource work well with EDB?

Appreciate for anyone's kindly help.

Best wished.
Josh

 
From: Satish Duggana
Date: 2016-09-08 19:12
To: User
Subject: Re: how to insert into EDB by storm-jdbc
You should give datasource class name like 
`org.postgresql.ds.PGSimpleDataSource` instead of Driver class.

Thanks,
Satish.


On Thu, Sep 8, 2016 at 3:45 PM, fanxi...@travelsky.com <fanxi...@travelsky.com> 
wrote:
Hi  user,

Recently I am doing a job using the storm-jdbc to insert into EDB.

I use the edb-jdbc16.jar.

I config for the ConnectionProvider like below:
        map.put("dataSourceClassName", "com.edb.Driver");
        map.put("dataSource.url", "jdbc:edb://localhost:5444/test");
        map.put("dataSource.user", "test");
        map.put("dataSource.password", "likeThe");

but when I run the topology, the jdbc-bolt throws an exception 
"java.lang.RuntimeException: java.lang.ClassCastException: Cannot cast 
com.edb.Driver to javax.sql.DataSource
at com.zaxxer.hikari.util.UtilityElf.createInstance(UtilityElf.java:90) 
~[HikariCP-2.4.3.jar:?]
at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:292) 
~[HikariCP-2.4.3.jar:?]
at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:84) 
~[HikariCP-2.4.3.jar:?]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:102) 
~[HikariCP-2.4.3.jar:?]
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:71) 
~[HikariCP-2.4.3.jar:?]"

I realized that the com.edb.Driver which implments java.sql.Driver may be is 
not a proper driver to use.

I googled, nothing useful found.

Can anyone give me some advice on how to insert into EDB by storm-jdbc?

Thanks very much.


Joshua
2016-09-08 18:06:56



Reply via email to