Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error importing shepafile to postgis

François,
Following this issue, I upgrade to the new release of SDI (2.2.4). I add the tLogrow and add statistic to the log, here is the log:

Starting job test_shp2pgsql at 11:34 01/02/2008.
connecting to socket on port 3760
connected
Aucune autorité n'a été spécifiée pour le code "-1". Le format attendu est habituellement "AUTORITÉ:NOMBRE".
Table test_import was dropped
1 févr. 2008 11:34:15 org.geotools.data.postgis.PostgisDataStore createSchema
INFO: CREATE TABLE "public"."test_import" ("test_import_fid" serial PRIMARY KEY, "the_geom" GEOMETRY NOT NULL, "gid" INTEGER, "sous_zone_num" INTEGER, "sous_zone_nom" VARCHAR(10485760), "zone_nom" VARCHAR(10485760));
1 févr. 2008 11:34:15 org.geotools.data.postgis.PostgisDataStore createSchema
INFO: DELETE FROM GEOMETRY_COLUMNS WHERE f_table_catalog='' AND f_table_schema = 'public'AND f_table_name = 'test_import';
1 févr. 2008 11:34:15 org.geotools.data.postgis.PostgisDataStore createSchema
INFO: INSERT INTO GEOMETRY_COLUMNS VALUES ('','public','test_import','the_geom',2,-1,'MULTIPOLYGON');
1 févr. 2008 11:34:15 org.geotools.data.postgis.PostgisDataStore createSchema
INFO: ALTER TABLE "public"."test_import" ADD CONSTRAINT "enforce_dims_the_geom" CHECK (ndims("the_geom") = 2);
1 févr. 2008 11:34:15 org.geotools.data.postgis.PostgisDataStore createSchema
INFO: ALTER TABLE "public"."test_import" ADD CONSTRAINT "enforce_geotype_the_geom" CHECK (geometrytype("the_geom") = 'MULTIPOLYGON'::text OR "the_geom" IS NULL);
1 févr. 2008 11:34:15 org.geotools.data.postgis.PostgisDataStore createSchema
INFO: CREATE INDEX spatial_test_import_the_geom ON "public"."test_import" USING GIST ("the_geom");
gid sous_zone_num sous_zone_nom zone_nom the_geom
Source CRS is: EPSG:NTF (Paris) / Lambert zone II code: NTF (Paris) / Lambert zone II authority: European Petroleum Survey Group version: null
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
disconnected
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at test_yja_1.test_shp2pgsql.test_shp2pgsql.sShapefileInput_1_GIProcess(test_shp2pgsql.java:666)
at test_yja_1.test_shp2pgsql.test_shp2pgsql.runJob(test_shp2pgsql.java:1066)
at test_yja_1.test_shp2pgsql.test_shp2pgsql.main(test_shp2pgsql.java:993)
Job test_shp2pgsql ended at 11:34 01/02/2008.


The shapefile is a personnal file I create from postgisDB (quartier de la defense). Thanks,
Y.

Labels (2)
13 Replies
Anonymous
Not applicable
Author

Hi Mathieu,
The tLogRow show me that the flow does not contains my data (sorry I should to tell you this sooner):
||||MULTIPOLYGON (((593340.5687667294 2432365.6942605344, 593715.5793209289 2432205.9264504616, 593691.6765663981 2432149.00044449, 593643.8661426135 2432130.324497699, 593559.4508631186 2432101.190020705, 593504.1700606177 2432082.5140739144, 593482.5059623403 2432084.008149658, 593452.6244474748 2432086.9963011444, 593386.1380768993 2432121.3600432393, 593346.5450697027 2432141.5300657735, 593302.4698352762 2432149.00044449, 593295.7464944315 2432169.170467024, 593256.2468669687 2432154.8895111326, 593267.3418537793 2432181.517479478, 593265.1228564172 2432203.7074530995, 593340.5687667294 2432365.6942605344)))

Y.
Anonymous
Not applicable
Author

Hi,

If tLogRow shows you that the flow doesn't contain your data, it means that you have an error in your ShapefileInput. Check your three column names in the schema, ShapefileInput Component is case sensitive.

Regards,
Barbara.
Anonymous
Not applicable
Author

Oups :rolleyes:
You are right, I had not check my columns in the DBF file 😕
Shame on me. I am going to test by myself before posting here 0683p000009MACn.png
Y.

I solved my problem, after checking my DBF file, and all the columns, I get an error with integer columns. The description of the file (showed in OOo calc) was : NUM,N,11,0 which is automaticly converted in "Long", as "Long" is not yes supported by SDI, I get an error.
Change this in "NUM,N,2,0" resolved the issue.
Thanks all for your help,
Y.
Anonymous
Not applicable
Author

Hi ,
I am trying to import some data in Postgis and I get this error:
Exception in component sPostgisOutput_1_SO
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.add(ArrayList.java:367)
at org.geotools.feature.DefaultFeatureTypeFactory.add(DefaultFeatureTypeFactory.java:43)
at org.geotools.feature.FeatureTypeBuilder.addType(FeatureTypeBuilder.java:392)
at createosmdata.create_polygon_data.create_polygon_data.tPostgresqlInput_1Process(create_polygon_data.java:455)
at createosmdata.create_polygon_data.create_polygon_data.runJobInTOS(create_polygon_data.java:1774)
at createosmdata.create_polygon_data.create_polygon_data.main(create_polygon_data.java:1690)
does anyone have a clue?