-
Notifications
You must be signed in to change notification settings - Fork 695
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
Breaking change between 1.5.3 and 1.6.0 affecting RASTER functions java.lang.NoSuchMethodError: void org.geotools.coverage.grid.GridGeometry2D #1477
Comments
I don't currently have the skills to debug this beyond this issue report. I hope the info provided is sufficiently comprehensive, do not hesitate to request further info from me. An observation that is possibly material: |
I also noted another change that could be material https://docs.geotools.org/stable/userguide/welcome/upgrade.html GeoTools 30.x |
The problem cannot be reproduced by simply launching pyspark locally using After trying lots of possible misconfigurations, I finally reproduced this problem locally by putting both geotools-wrapper-1.6.0-28.2.jar and geotools-wrapper-1.6.0-31.0.jar to the classpath. Please make sure that only geotools-wrapper-1.6.0-28.2 is actually being used, and remove geotools-wrapper-1.6.0-31.0.jar from the cluster to avoid any misbehavior. |
Yes! thank you @Kontinuation , exactly right.
Thank you once again for the great guidance, I appreciate the time you spent on this. |
@golfalot In the first release candidate of Sedona 1.6.0, we wanted to upgrade Sedona to use geotools 31.0 and that's why geotool-wrapper 1.6.0-31.0 exists. However, given the current user base of Sedona, we decided to revert this breaking change in the final release candidate of Sedona 1.6.0 and fall back to geotools-wrapper 1.6.0-28.2. The exact geotools-wrapper version to use is always mentioned here: https://sedona.apache.org/1.6.0/setup/maven-coordinates/ Unfortunately, Maven Central does not allow anyone to retract a published package so we cannot delete geotools-wrapper 1.6.0-31.0 |
Expected behavior
return result rows/table
Actual behavior
crash with stack trace
java.lang.NoSuchMethodError: 'void org.geotools.coverage.grid.GridGeometry2D.(org.opengis.coverage.grid.GridEnvelope, org.opengis.referencing.datum.PixelInCell, org.opengis.referencing.operation.MathTransform, org.opengis.referencing.crs.CoordinateReferenceSystem, org.geotools.util.factory.Hints)
Steps to reproduce the problem
Raster sources from: https://github.com/apache/sedona/blob/master/spark/common/src/test/resources/raster/netcdf/test.nc
sedona = SedonaContext.create(config)
Settings
Sedona version = 1.6.0
Apache Spark version = 3.4
API type =Python
Scala version = 2.12.17
Java version = 11
Python version = 3.10
Environment = Azure Synapse Spark Pool
Additional background
We're using Azure Synapse with DEP (data exfiltration protection enabled) which means no outbound internet access, so all packages must be obtained manually before being uploaded as "Workspace packages" which can then enabled on the spark pools.
A configuration that works (no error)
Spark pool
Java
Python
A configuration that causes the error
Spark pool (identical to above)
Packages
Java
Python
stating the obvious: There are many packages listed in the failing scenario. See below the convoluted steps need to establish what packages are required for a baseline Synapse Spark pool.
How to establish Python package dependencies for Synapse Spark pool
Identify Operating System
https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/apache-spark-34-runtime
=> Mariner 2.0
Create a VM and apply baseline configuration
https://github.com/microsoft/azurelinux/blob/2.0/toolkit/docs/quick_start/quickstart.md
Get conda
Apply baseline Synapse configuration
sudo tdnf -y install gcc g++ wget https://raw.githubusercontent.com/Azure-Samples/Synapse/main/Spark/Python/Synapse-Python310-CPU.yml conda env create -n synapse-env -f Synapse-Python310-CPU.yml source activate synapse-env
Install pip packages and determine which packages are Downloaded above and beyond the baseline packages
requirements.txt
install apache-sedona and dependencies
pip install -r input-user-req.txt > pip_output.txt
install apache-sedona and dependencies
cat pip_output.txt | grep Downloading
Use the above output to identify the
.whl
files to download add to Synapse.Full stack trace of error
The text was updated successfully, but these errors were encountered: