[Geoserver-users] Problems with SHAPE-ZIP outputformat

Hi Brent,

Uhmmm I check the permissions and give full access to it. Still the
problem is there... Actually, as I said, geoserver manages to get the
shapefiles created in tomcats temp folder (and they are correct), what
is fails is in creating the zip file for them and send them. So unless
there is another temporary folder i am not aware of the permission
does not look like the problem.

In any case here I attach you the logs (with ALL config activated) in
case is interesting to you:

---------------------------------
FINE: About to execute query: SELECT "point_id", "num_records",
"num_taxon", "num_providers", encode(AsBinary(force_2d("the_geom"),
'XDR'),'base64') FROM "public"."biorecord_locations" WHERE "the_geom"
&& GeometryFromText('POLYGON ((52.58056640624999 6.118707747190844,
52.58056640624999 10.466205555063866, 61.36962890625
10.466205555063866, 61.36962890625 6.118707747190844,
52.58056640624999 6.118707747190844))', 4326) AND
intersects("the_geom", GeometryFromText('POLYGON ((52.58056640624999
6.118707747190844, 52.58056640624999 10.466205555063866,
61.36962890625 10.466205555063866, 61.36962890625 6.118707747190844,
52.58056640624999 6.118707747190844))', 4326))
Jul 14, 2006 1:15:41 PM org.geotools.data.jdbc.ConnectionPool getConnection
FINE: Getting available connection.
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging open
FINEST: SHP Channel in ShapefileWriter has been opened. Number open: 1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging open
FINEST: SHX Channel in ShapefileWriter has been opened. Number open: 1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging close
FINEST: SHP Channel in ShapefileWriter has been closed. Number open: 0
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging close
FINEST: SHX Channel in ShapefileWriter has been closed. Number open: 0
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock lockWrite
FINER: http-8080-Processor13 is getting write lock:1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock unlockWrite
FINER: unlock write:http-8080-Processor13
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock lockWrite
FINER: http-8080-Processor13 is getting write lock:1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock unlockWrite
FINER: unlock write:http-8080-Processor13
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock lockWrite
FINER: http-8080-Processor13 is getting write lock:1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock unlockWrite
FINER: unlock write:http-8080-Processor13
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock lockWrite
FINER: http-8080-Processor13 is getting write lock:1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock unlockWrite
FINER: unlock write:http-8080-Processor13
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging open
FINEST: Shapefile Reader has been opened. Number open: 1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock lockRead
FINER: Start Read Lock:http-8080-Processor13 has 1 locks
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging open
FINEST: Dbase File Reader has been opened. Number open: 1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging open
FINEST: SHP Channel in ShapefileWriter has been opened. Number open: 1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging open
FINEST: SHX Channel in ShapefileWriter has been opened. Number open: 1
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.dbf.DbaseFileHeader warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging open
FINEST: Dbase File Writer has been opened. Number open: 1
Jul 14, 2006 1:15:41 PM
org.geotools.data.jdbc.ConnectionPool$ConnectionListManager
connectionClosed
FINE: Connection closed - adding to available connections.
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock unlockRead
FINER: unlock Read:http-8080-Processor13 has 0 locks
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging close
FINEST: Shapefile Reader has been closed. Number open: 0
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging close
FINEST: Dbase File Reader has been closed. Number open: 0
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging close
FINEST: SHP Channel in ShapefileWriter has been closed. Number open: 0
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging close
FINEST: SHX Channel in ShapefileWriter has been closed. Number open: 0
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.StreamLogging close
FINEST: Dbase File Writer has been closed. Number open: 0
Jul 14, 2006 1:15:41 PM org.geotools.data.shapefile.Lock lockWrite
FINER: http-8080-Processor13 is getting write lock:1
-------------------------

On 13/07/2006, at 17:40, 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