Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Jackson compatibility issues with Spark and Azure SDK #25732

Closed
purijatin opened this issue Nov 29, 2021 · 4 comments
Closed

[BUG] Jackson compatibility issues with Spark and Azure SDK #25732

purijatin opened this issue Nov 29, 2021 · 4 comments
Assignees
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. dependency-issue Issue that is caused by dependency conflicts dependency-issue-jackson Issue caused by dependency version mismatch with one of the Jackson libraries needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@purijatin
Copy link

Describe the bug

Jackson.

Issues with jackson-module-scala compatibility.

Attached is my dependency-tree. Very briefly put, the project uses Spark, PlayJson, and Azure SDK. Spark brings in Jackson 2.10 dependencies, PlayJson also relies on Jackson 2.10 series. Azure SDK is on 2.12 series.

Exception or Stack Trace

[info] Cause: com.fasterxml.jackson.databind.JsonMappingException: Scala module 2.10.0 requires Jackson Databind version >= 2.10.0 and < 2.11.0
[info] at com.fasterxml.jackson.module.scala.JacksonModule.setupModule(JacksonModule.scala:61)
[info] at com.fasterxml.jackson.module.scala.JacksonModule.setupModule$(JacksonModule.scala:46)
[info] at com.fasterxml.jackson.module.scala.DefaultScalaModule.setupModule(DefaultScalaModule.scala:17)
[info] at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:835)
[info] at org.apache.spark.rdd.RDDOperationScope$.(RDDOperationScope.scala:82)
[info] at org.apache.spark.rdd.RDDOperationScope$.(RDDOperationScope.scala)
[info] at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:215)
[info] at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:176)
[info] at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:132)
[info] at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:131)

To Reproduce
Simple spark project that sends messages to event grid

Code Snippet
Simple spark project that uses Azure SDK. My list of sbt dependencies


import sbt._

object Dependencies {

  val SparkVersion = "3.1.2"
  val hadoop = Seq("org.apache.hadoop" % "hadoop-client" % "3.2.1")

  val spark = Seq(
    "org.apache.spark" %% "spark-core" % SparkVersion,
    "org.apache.spark" %% "spark-sql" % SparkVersion,
    "org.apache.spark" %% "spark-mllib" % SparkVersion
  )
  val others = Seq(
    "io.delta" %% "delta-core" % "1.0.0",
    "com.typesafe.play" %% "play-json" % "2.10.0-RC5",
    "org.postgresql" % "postgresql" % "42.3.1",
    "com.zaxxer" % "HikariCP" % "4.0.3"
  )

  val log = Seq(
    "org.slf4j" % "slf4j-api" % "1.7.32",
    "org.slf4j" % "slf4j-log4j12" % "1.7.32"
  )

  val azure = Seq(
    "com.azure" % "azure-messaging-eventgrid" % "4.7.1",
    "com.azure" % "azure-identity" % "1.4.1",
    "com.azure" % "azure-storage-file-datalake" % "12.7.2"
  )

  val test = Seq(
    "org.scalacheck" %% "scalacheck" % "1.14.3" % "test,it",
    "org.scalatest" %% "scalatest" % "3.2.2" % "test,it",
    "org.scalaj" %% "scalaj-http" % "2.4.2" % "test,it",
    "com.holdenkarau" %% "spark-testing-base" % "3.1.2_1.1.0" % "test,it"
  )

  val all = hadoop ++ spark ++ others ++ azure ++ log ++ test
}

Expected behavior

Screenshots
Dependency tree attached: tree-1.txt

If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: Windows
  • IDE: SBT terminal
  • Library/Libraries: Dependency tree attached
  • Java version: 8
  • App Server/Environment: Apache Spark
  • Frameworks: PlayJson

Additional context

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 29, 2021
@purijatin purijatin changed the title [BUG] [BUG] Jackson compatibility issues with Spark and Azure SDK Nov 29, 2021
@joshfree joshfree added Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. dependency-issue Issue that is caused by dependency conflicts dependency-issue-jackson Issue caused by dependency version mismatch with one of the Jackson libraries labels Nov 29, 2021
@ghost ghost added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Nov 29, 2021
@joshfree
Copy link
Member

@pallavit could you please follow up with @purijatin?

/cc @alzimmermsft

@purijatin
Copy link
Author

The issue temporarily gets fixed by adding below. But we know that it is fragile. Adding this breaks at another point. Logging separate request for it (#25734)

"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.12.5"

@pallavit
Copy link
Contributor

pallavit commented Mar 9, 2022

@purijatin let me know if there is anything pending on this particular issue. We have another issue created for the overall experience which we should continue to keep open however I would like to close this if you agree.

@purijatin
Copy link
Author

Hi @pallavit. We can go ahead and close it. Thanks again for the help.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. dependency-issue Issue that is caused by dependency conflicts dependency-issue-jackson Issue caused by dependency version mismatch with one of the Jackson libraries needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Status: Done
Development

No branches or pull requests

3 participants