[Geoserver-devel] [jira] (GEOS-5045) Shp publish into postgis datastore with MULTIPOLYGON EMPTY value violates check constraint.

Nazzareno Sileno created GEOS-5045:
--------------------------------------

             Summary: Shp publish into postgis datastore with MULTIPOLYGON EMPTY value violates check constraint.
                 Key: GEOS-5045
                 URL: https://jira.codehaus.org/browse/GEOS-5045
             Project: GeoServer
          Issue Type: Bug
            Reporter: Nazzareno Sileno
            Assignee: Andrea Aime
         Attachments: archive test.zip

I have a problem when i try to publish a shp into a postgis store.
The generated table is empty but GS does not shows errors.

Checking the Postgres logging I found the following ERROR: new row for relation "admin_shp_test" violates check constraint "enforce_geotype_the_geom".

These seems to be due to a specific call: INSERT INTO "public"."admin_shp_test" ( "the_geom","ID","AREA","PERIMETER","protezione" ) VALUES (GeomFromText('MULTIPOLYGON EMPTY',32633),0,0.0,0.0,'');

The MULTIPOLYGON EMPTY value produce this error.

Some sugest to resolve this problem???

I am using the geoserver-manager api rest to publish the shape, calling the method restPublisher.publishShp(...)
this method automatically executes all the hard work for me
I can't controll the execution and then the add and/or drop of the constraints.
I absume that this problem can be generated in the GS-geoTools code during the publishing operations. It's right?

Attached the test shape file.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira