-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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]: Okio present in beam-sdks-java-extensions-sql-jdbc #27700
Comments
Beam does not directly depend on okhttp. running Dependency tree:
If you're not using hadoop, probably it is safe to overwrite okhttp to 3 in your project. |
Unfortunately, it still pollutes the class path:
Also to be clear, It's Okio, not OkHttp directly. |
Okio is from OkHttp:
I see, its because beam-sdks-java-extensions-sql-jdbc is a fat" jar (having all dependency shaded) so one cannot overwrite its dependencies. What functionality are you use for beam-sdks-java-extensions-sql-jdbc ? If it's not used then don't include it in classpath; if it is used probably need a custom build. This module (sql-extensions-jdbc) is not actively maintained |
It may be the incorrect jar to use, but I need to write the result of my HTTP calls to a database. In effect, GET a resource and then save it to a DB.
It is a fat jar, but I don't believe it is shaded. I think that would help though. (If it were shaded, the packages would look more like |
Are you using Beam's JdbcIO or Beam SQL to write data to database? If just using JdbcIO, then beam-sdks-jaca-io-jdbc is the correct dependency to use. The extension-sql-jdbc is used to run a self contained service for beam SQL (it has a main function even) so usually not meant to be used as dependency |
What happened?
I am trying to make some HTTP calls from my Java Beam (2.48.0) job. I am using OkHTTP for my HTTP dependency (4.11.0) which has a dependency on Okio (3.2.0). The Jar
beam-sdks-java-extensions-sql-jdbc
includes a pretty old version of Okio (1.6.0), which happens to conflict with the version needed by OkHTTP.As a result, the later stages of my Beam job fail with class loader errors since the beam jar is earlier on the classpath (error included below).
Issue Priority
Priority: 3 (minor)
Issue Components
The text was updated successfully, but these errors were encountered: