<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with Databricks JDBC connection: Error occured while deserializing arrow data in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26594#M18620</link>
    <description>&lt;P&gt;Hi @Jose Gonzalez​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This similar issue in snowflake in JDBC is a good reference, I was able to get this to work in Java OpenJDK 17 by having this JVM option specified:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--add-opens=java.base/java.nio=ALL-UNNAMED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I came across another issue with using apache DHCP to connect to Databricks SQL endpoint:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caused by: java.sql.SQLFeatureNotSupportedException: [Simba][JDBC](10220) Driver does not support this optional feature.&lt;/P&gt;&lt;P&gt;at com.simba.spark.exceptions.ExceptionConverter.toSQLException(Unknown Source)&lt;/P&gt;&lt;P&gt;at com.simba.spark.jdbc.common.SConnection.setAutoCommit(Unknown Source)&lt;/P&gt;&lt;P&gt;at com.simba.spark.jdbc.jdbc42.DSS42Connection.setAutoCommit(Unknown Source)&lt;/P&gt;&lt;P&gt;at org.apache.commons.dbcp2.DelegatingConnection.setAutoCommit(DelegatingConnection.java:801)&lt;/P&gt;&lt;P&gt;at org.apache.commons.dbcp2.DelegatingConnection.setAutoCommit(DelegatingConnection.java:801)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same problem occurred after I switched to Hikari.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, I got it working by just using Basic DataSource and set auto-commit to False. BasicDataSource is not suitable for production though, would there be a new driver release that can handle this better?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2022 00:19:51 GMT</pubDate>
    <dc:creator>Alice__Caterpil</dc:creator>
    <dc:date>2022-03-24T00:19:51Z</dc:date>
    <item>
      <title>Problem with Databricks JDBC connection: Error occured while deserializing arrow data</title>
      <link>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26587#M18613</link>
      <description>&lt;P&gt;I have a Java program like this to test out the Databricks JDBC connection with the &lt;A href="https://databricks.com/spark/jdbc-drivers-download" alt="https://databricks.com/spark/jdbc-drivers-download" target="_blank"&gt;Databricks JDBC driver&lt;/A&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;        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);
        }&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This program, however, throws an error like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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.&amp;lt;init&amp;gt;(long, int) not available&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What will be the solution?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 16:14:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26587#M18613</guid>
      <dc:creator>tz1</dc:creator>
      <dc:date>2022-03-02T16:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Databricks JDBC connection: Error occured while deserializing arrow data</title>
      <link>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26589#M18615</link>
      <description>&lt;P&gt;Thanks @Kaniz Fatma​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;openjdk-17.0.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://databricks.com/spark/jdbc-drivers-download" alt="https://databricks.com/spark/jdbc-drivers-download" target="_blank"&gt;Databricks JDBC Driver 2.6.22&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 19:19:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26589#M18615</guid>
      <dc:creator>tz1</dc:creator>
      <dc:date>2022-03-03T19:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Databricks JDBC connection: Error occured while deserializing arrow data</title>
      <link>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26590#M18616</link>
      <description>&lt;P&gt;This error is mentioned in Spark documentation - &lt;A href="https://spark.apache.org/docs/latest/" target="test_blank"&gt;https://spark.apache.org/docs/latest/&lt;/A&gt;, looks like this is specific to the version of Java and can be avoid by having the mentioned properties set&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 02:09:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26590#M18616</guid>
      <dc:creator>Alice__Caterpil</dc:creator>
      <dc:date>2022-03-10T02:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Databricks JDBC connection: Error occured while deserializing arrow data</title>
      <link>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26593#M18619</link>
      <description>&lt;P&gt;Hi @Tony Zhou​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a friendly follow-up. Did @Kaniz Fatma​&amp;nbsp;'s response helped you to resolve this issue? if not, please share more details, like the full error stack trace and some code snippets.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 16:50:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26593#M18619</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2022-03-22T16:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Databricks JDBC connection: Error occured while deserializing arrow data</title>
      <link>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26594#M18620</link>
      <description>&lt;P&gt;Hi @Jose Gonzalez​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This similar issue in snowflake in JDBC is a good reference, I was able to get this to work in Java OpenJDK 17 by having this JVM option specified:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--add-opens=java.base/java.nio=ALL-UNNAMED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I came across another issue with using apache DHCP to connect to Databricks SQL endpoint:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caused by: java.sql.SQLFeatureNotSupportedException: [Simba][JDBC](10220) Driver does not support this optional feature.&lt;/P&gt;&lt;P&gt;at com.simba.spark.exceptions.ExceptionConverter.toSQLException(Unknown Source)&lt;/P&gt;&lt;P&gt;at com.simba.spark.jdbc.common.SConnection.setAutoCommit(Unknown Source)&lt;/P&gt;&lt;P&gt;at com.simba.spark.jdbc.jdbc42.DSS42Connection.setAutoCommit(Unknown Source)&lt;/P&gt;&lt;P&gt;at org.apache.commons.dbcp2.DelegatingConnection.setAutoCommit(DelegatingConnection.java:801)&lt;/P&gt;&lt;P&gt;at org.apache.commons.dbcp2.DelegatingConnection.setAutoCommit(DelegatingConnection.java:801)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same problem occurred after I switched to Hikari.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, I got it working by just using Basic DataSource and set auto-commit to False. BasicDataSource is not suitable for production though, would there be a new driver release that can handle this better?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 00:19:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26594#M18620</guid>
      <dc:creator>Alice__Caterpil</dc:creator>
      <dc:date>2022-03-24T00:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Databricks JDBC connection: Error occured while deserializing arrow data</title>
      <link>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26595#M18621</link>
      <description>&lt;P&gt;&lt;B&gt;Thanks a lot&lt;/B&gt; @Alice Hung​&amp;nbsp; your suggestion works. I am really grateful to you for sharing it. There is absolutely no help available elsewhere.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 15:58:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26595#M18621</guid>
      <dc:creator>AmeyJoshi</dc:creator>
      <dc:date>2022-03-24T15:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Databricks JDBC connection: Error occured while deserializing arrow data</title>
      <link>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26597#M18623</link>
      <description>&lt;P&gt;Definitely, I would want to. But I can't find an option to mark it as the best.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 16:47:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26597#M18623</guid>
      <dc:creator>AmeyJoshi</dc:creator>
      <dc:date>2022-03-24T16:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Databricks JDBC connection: Error occured while deserializing arrow data</title>
      <link>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26599#M18625</link>
      <description>&lt;P&gt;I am sorry @Kaniz Fatma​&amp;nbsp;but I don't see that option available to me. If you see it, kindly use it on my behalf.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 17:07:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/problem-with-databricks-jdbc-connection-error-occured-while/m-p/26599#M18625</guid>
      <dc:creator>AmeyJoshi</dc:creator>
      <dc:date>2022-03-24T17:07:35Z</dc:date>
    </item>
  </channel>
</rss>

