You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sedona.apache.org by "Jia Yu (Jira)" <ji...@apache.org> on 2022/07/29 02:57:00 UTC

[jira] [Commented] (SEDONA-131) ShapefileReader java.lang.NoSuchMethodError: org.geotools.geometry.jts.coordinatesequence.CoordinateSequences.isCCW

    [ https://issues.apache.org/jira/browse/SEDONA-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17572722#comment-17572722 ] 

Jia Yu commented on SEDONA-131:
-------------------------------

[~a_benjamaa@hotmail.com] Yes, this is likely because geotools jar is not copied to all Spark instances. Please make sure that the geotools jar is put in a place where all Spark worker can access.

> ShapefileReader java.lang.NoSuchMethodError: org.geotools.geometry.jts.coordinatesequence.CoordinateSequences.isCCW
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: SEDONA-131
>                 URL: https://issues.apache.org/jira/browse/SEDONA-131
>             Project: Apache Sedona
>          Issue Type: Bug
>            Reporter: Ben_Spark
>            Priority: Major
>
> I'm using Shapefile reader to ingest shape files on Databircks cluster vis python notebook.
> The API is shown unstable behavior with below error generated randomly. In other words, the same lines of code (see below)  can work properly for some minutes/hours than generate  a noSuchMethidErroro for some time then back to normal again etc..
> {color:#4c9aff}shape = ShapefileReader.readToGeometryRDD(spark, SahpeFilesPath){color}
> {color:#4c9aff}shape_df = Adapter.toDf(shape, spark){color}
> {color:#4c9aff}shape_df.show(){color}
> {color:#de350b}Error: java.lang.NoSuchMethodError: org.geotools.geometry.jts.coordinatesequence.CoordinateSequences.isCCW{color}
>  
> {color:#172b4d}- The libraries are imported and registered into spark using SedonaRegistrator{color}
> {color:#172b4d}-As per now, the cluster is specifically used for this purpose so no other code running and no other libraries installed,{color}
>  
> {color:#172b4d}First analysis :{color}
> {color:#172b4d}My guess is that le package is not properly distributed a cross the workers. But even calling the method through a function or converting the code to scala did not solve the issue{color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)