Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 08:14 AM
I have a Java program like this to test out the Databricks JDBC connection with the Databricks JDBC driver.
Connection connection = null;
try {
Class.forName(driver);
connection = DriverManager.getConnection(url, username, password);
if (connection != null) {
System.out.println("Connection Established");
} else {
System.out.println("Connection Failed");
}
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery("select * from standard_info_service.daily_transactions");
while (rs.next()) {
System.out.print("created_date: " + rs.getInt("created_date") + ", ");
System.out.println("daily_transactions: " + rs.getInt("daily_transactions"));
}
} catch (Exception e) {
System.out.println(e);
}This program, however, throws an error like this:
Connection Established
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
java.sql.SQLException: [Simba][SparkJDBCDriver](500618) Error occured while deserializing arrow data: sun.misc.Unsafe or java.nio.DirectByteBuffer.<init>(long, int) not availableWhat will be the solution?