[Geoserver-users] Problems with SHAPE-ZIP outputformat

Hi all,

I continue investigating output formats. Now I am trying to make the
shapefile work.

When I do a WFS request I get some result in GML. I tried to include
the outputformat=SHAPE-ZIP and I get back an exmpty file called wfs
with the correct mime-type. I take a look at the logs and everything
seems fine:

---------------
Jul 13, 2006 11:15:26 AM org.geotools.data.jdbc.ConnectionPool getConnection
FINE: Getting available connection.
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 13, 2006 11:15:26 AM
org.geotools.data.jdbc.ConnectionPool$ConnectionListManager
connectionClosed
FINE: Connection closed - adding to available connections.
Jul 13, 2006 11:15:26 AM org.vfny.geoserver.servlets.AbstractService doService
INFO: Service handled
-------------

And when I look at the tomcat temporary folder the shapefiles are
there and are correct!

But why do I get the empty file then? Is there a problem when zipping
this? In the case of KMZ geoserver manages to zip fine.

And by the way, is there any way in geoserver that the files that you
get when requesting an outputformat like PDF or shapefile or KML does
not have just the wms or wfs name without extension? I am going to
create a little script to take care of this but I was wondering if
there is any other way.

Thanks in advance.

Javier.

It seems like geoserver either doesn't have permission to access the temporary files, or just can't find them (the previous I suspect most). But errors should be thrown for either. Can you make sure that the temp folder is not write/read protected and geoserver can access it?

As for the file extensions, it might be possible to add them in. Although I will need to find out where the naming takes place. The mime-type of the output is set however, so programs can find out what type of file it is.

Brent Owens
(The Open Planning Project)

Javier de la Torre wrote:

Hi all,

I continue investigating output formats. Now I am trying to make the
shapefile work.

When I do a WFS request I get some result in GML. I tried to include
the outputformat=SHAPE-ZIP and I get back an exmpty file called wfs
with the correct mime-type. I take a look at the logs and everything
seems fine:

---------------
Jul 13, 2006 11:15:26 AM org.geotools.data.jdbc.ConnectionPool getConnection
FINE: Getting available connection.
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 13, 2006 11:15:26 AM
org.geotools.data.jdbc.ConnectionPool$ConnectionListManager
connectionClosed
FINE: Connection closed - adding to available connections.
Jul 13, 2006 11:15:26 AM org.vfny.geoserver.servlets.AbstractService doService
INFO: Service handled
-------------

And when I look at the tomcat temporary folder the shapefiles are
there and are correct!

But why do I get the empty file then? Is there a problem when zipping
this? In the case of KMZ geoserver manages to zip fine.

And by the way, is there any way in geoserver that the files that you
get when requesting an outputformat like PDF or shapefile or KML does
not have just the wms or wfs name without extension? I am going to
create a little script to take care of this but I was wondering if
there is any other way.

Thanks in advance.

Javier.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

And go ahead and submit a bug for it. Even if it's just the temp folder permissions wrong we still should be throwing an error.

Also something to consider, using a directory in the data_dir to write temp files to, since we know we have permission there, instead of using the normal temp dir. We could also consider doing our own cleaning of that directory, since it seems like tmp files aren't getting deleted in a timely fashion. Perhaps we could keep track of discarded tmp files and reuse them or some such.

C

Brent Owens wrote:

It seems like geoserver either doesn't have permission to access the temporary files, or just can't find them (the previous I suspect most). But errors should be thrown for either. Can you make sure that the temp folder is not write/read protected and geoserver can access it?

As for the file extensions, it might be possible to add them in. Although I will need to find out where the naming takes place. The mime-type of the output is set however, so programs can find out what type of file it is.

Brent Owens
(The Open Planning Project)

Javier de la Torre wrote:

Hi all,

I continue investigating output formats. Now I am trying to make the
shapefile work.

When I do a WFS request I get some result in GML. I tried to include
the outputformat=SHAPE-ZIP and I get back an exmpty file called wfs
with the correct mime-type. I take a look at the logs and everything
seems fine:

---------------
Jul 13, 2006 11:15:26 AM org.geotools.data.jdbc.ConnectionPool getConnection
FINE: Getting available connection.
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 13, 2006 11:15:26 AM
org.geotools.data.jdbc.ConnectionPool$ConnectionListManager
connectionClosed
FINE: Connection closed - adding to available connections.
Jul 13, 2006 11:15:26 AM org.vfny.geoserver.servlets.AbstractService doService
INFO: Service handled
-------------

And when I look at the tomcat temporary folder the shapefiles are
there and are correct!

But why do I get the empty file then? Is there a problem when zipping
this? In the case of KMZ geoserver manages to zip fine.

And by the way, is there any way in geoserver that the files that you
get when requesting an outputformat like PDF or shapefile or KML does
not have just the wms or wfs name without extension? I am going to
create a little script to take care of this but I was wondering if
there is any other way.

Thanks in advance.

Javier.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:1003,44b669b093196309890654!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org