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

Eleven 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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download