<?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 Databricks spark_jar_task failed when submitted via API in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-spark-jar-task-failed-when-submitted-via-api/m-p/61637#M31818</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;We are submitting jobs to the data bricks cluster using &lt;A href="https://adb-4225868552007344.4.azuredatabricks.net/api/2.0/jobs/create" target="_blank" rel="noopener"&gt;&amp;nbsp;/api/2.0/jobs/create&lt;/A&gt; this API and running a spark java application (jar that is submitted to this API). We are noticing Java application is executing as expected. however, we see that the status of the job in Databricks is shown as failed at the end.&lt;/P&gt;&lt;P&gt;Can you please help us in resolving this?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We are getting following error in the log:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;24/01/24 08:36:01 INFO SparkContext: Successfully stopped SparkContext
24/01/24 08:36:01 INFO ProgressReporter$: Removed result fetcher for 645810760151386822_6024284017790236785_job-734546952940362-run-453202441019294-action-3199680969853150
24/01/24 08:36:01 WARN ScalaDriverWrapper: Spark is detected to be down after running a command
24/01/24 08:36:01 WARN ScalaDriverWrapper: Fatal exception (spark down) in ReplId-8f661-76f6f-2cac6
com.databricks.backend.common.rpc.SparkStoppedException: Spark down: 
  at com.databricks.backend.daemon.driver.DriverWrapper.executeCommandAndGetError(DriverWrapper.scala:651)
  at com.databricks.backend.daemon.driver.DriverWrapper.executeCommand(DriverWrapper.scala:744)
  at com.databricks.backend.daemon.driver.DriverWrapper.runInnerLoop(DriverWrapper.scala:520)
  at com.databricks.backend.daemon.driver.DriverWrapper.runInner(DriverWrapper.scala:436)
  at com.databricks.backend.daemon.driver.DriverWrapper.run(DriverWrapper.scala:279)
  at java.lang.Thread.run(Thread.java:750)
24/01/24 08:36:03 INFO DrainingState: Started draining: min wait 10000, grace period 5000, max wait 15000.
24/01/24 08:36:05 WARN DriverDaemon: Unexpected exception: java.lang.NullPointerException
java.lang.NullPointerException
 &lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;Also attaching the Snapshot.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2024 05:25:20 GMT</pubDate>
    <dc:creator>Nisha2</dc:creator>
    <dc:date>2024-02-23T05:25:20Z</dc:date>
    <item>
      <title>Databricks spark_jar_task failed when submitted via API</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-spark-jar-task-failed-when-submitted-via-api/m-p/61637#M31818</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;We are submitting jobs to the data bricks cluster using &lt;A href="https://adb-4225868552007344.4.azuredatabricks.net/api/2.0/jobs/create" target="_blank" rel="noopener"&gt;&amp;nbsp;/api/2.0/jobs/create&lt;/A&gt; this API and running a spark java application (jar that is submitted to this API). We are noticing Java application is executing as expected. however, we see that the status of the job in Databricks is shown as failed at the end.&lt;/P&gt;&lt;P&gt;Can you please help us in resolving this?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We are getting following error in the log:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;24/01/24 08:36:01 INFO SparkContext: Successfully stopped SparkContext
24/01/24 08:36:01 INFO ProgressReporter$: Removed result fetcher for 645810760151386822_6024284017790236785_job-734546952940362-run-453202441019294-action-3199680969853150
24/01/24 08:36:01 WARN ScalaDriverWrapper: Spark is detected to be down after running a command
24/01/24 08:36:01 WARN ScalaDriverWrapper: Fatal exception (spark down) in ReplId-8f661-76f6f-2cac6
com.databricks.backend.common.rpc.SparkStoppedException: Spark down: 
  at com.databricks.backend.daemon.driver.DriverWrapper.executeCommandAndGetError(DriverWrapper.scala:651)
  at com.databricks.backend.daemon.driver.DriverWrapper.executeCommand(DriverWrapper.scala:744)
  at com.databricks.backend.daemon.driver.DriverWrapper.runInnerLoop(DriverWrapper.scala:520)
  at com.databricks.backend.daemon.driver.DriverWrapper.runInner(DriverWrapper.scala:436)
  at com.databricks.backend.daemon.driver.DriverWrapper.run(DriverWrapper.scala:279)
  at java.lang.Thread.run(Thread.java:750)
24/01/24 08:36:03 INFO DrainingState: Started draining: min wait 10000, grace period 5000, max wait 15000.
24/01/24 08:36:05 WARN DriverDaemon: Unexpected exception: java.lang.NullPointerException
java.lang.NullPointerException
 &lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;Also attaching the Snapshot.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 05:25:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-spark-jar-task-failed-when-submitted-via-api/m-p/61637#M31818</guid>
      <dc:creator>Nisha2</dc:creator>
      <dc:date>2024-02-23T05:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks spark_jar_task failed when submitted via API</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-spark-jar-task-failed-when-submitted-via-api/m-p/63975#M32422</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;,&lt;BR /&gt;Thank you for the reply, after analyzing my code. I got to know that I was trying to create SparkSession inside the try block which automatically terminates the session when the process is finished. So for now I have removed try block. But now I'm facing another issue. Providing the error log below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;24/03/18 09:41:55 ERROR MicroBatchExecution: Query [id = 88d62783-1d5d-4a7e-b75c-875fa5d42892, runId = 24ec7106-189a-49f8-88ec-b4cb213d1496] terminated with error
com.databricks.sql.transaction.tahoe.DeltaAnalysisException: Incompatible format detected.

You are trying to write to `abfss://pdpdeltalake@stpdpdeltalakepoc.dfs.core.windows.net/test/di/sap-cic-plant-plant/` using Delta, but there is no
transaction log present. Check the upstream job to make sure that it is writing
using format("delta") and that you are trying to write to the table base path.&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 18 Mar 2024 09:52:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-spark-jar-task-failed-when-submitted-via-api/m-p/63975#M32422</guid>
      <dc:creator>Nisha2</dc:creator>
      <dc:date>2024-03-18T09:52:39Z</dc:date>
    </item>
  </channel>
</rss>

