SessionFactoryUtils in Spring 4 calls unwrap of a ConnectionProvider, expecting the connection provider to unwrap to a DataSource with
cp.unwrap(DataSource.class);
The unwrap method in HikariCPConnectionProvider just casts to itself, throwing a ClassCastException when trying to unwrap to a DataSource.
|