Error importing system routines Geometry

Four Stars

Error importing system routines Geometry

Hello,

 

I am having an issue on using the Geometry routines in Talend.

I have two projects :

- one on them os working just fine, using same routines

- the other one shows the following errors :

        - org.geotools.referencing.CRS cannot be resolved to a type : in GeometryOperation

        - org.geotools.gml3 cannot be resolved to a type : in GeometryUtility

I have tried putting both projects in the same workspaces, then in separate ones. The only difference between projects is that the one with error has user defined routines, can it be the source of the problem?

 

I have tried everything I could think of, thank you for your help...

 

Four Stars

Re: Error importing system routines Geometry

Ok so after making new tests, I realised that a routine of mine creates the problem on the system routines : adding the library gt-opengis-8.5 to my routine makes the system routines GeometryUtility and GeometryOperation uncompilable ...

Does anyone know what is going how and how to bypass the problem?

Thanks

Nine Stars

Re: Error importing system routines Geometry

if same jar is troubling , we could use an custom class loader only for specifc functionality.

 

please explore URLclassloader option for your lib jar. 

 

i am not sure if this will help but worth a try.

Regards
Abhishek KUMAR
Four Stars

Re: Error importing system routines Geometry

Thank you for your reply.

I have tried this :

 

          Class ClassSF= new URLClassLoader(new URL[]{new File(pathToJar).toURI().toURL()}).loadClass("org.opengis.feature.simple.SimpleFeature");
          Class ClassSFT= new URLClassLoader(new URL[]{new File(pathToJar).toURI().toURL()}).loadClass("org.opengis.feature.simple.SimpleFeatureType");
          Class ClassAD= new URLClassLoader(new URL[]{new File(pathToJar).toURI().toURL()}).loadClass("org.opengis.feature.type.AttributeDescriptor");

 

But I don't know how to invoke it, I still have an error on :

 

SimpleFeatureSource featureSource = dataStore.getFeatureSource();

 

The type org.opengis.feature.type.Name cannot be resolved. It is indirectly referenced from required .class files

 

I am not very good in java, do you have an idea?

 

Thanks!

 

Emilie

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads