On Mon, Apr 23, 2012 at 6:22 AM, Jeff Storey <[email protected]>wrote:

> **
>
> In my java application, I'm using geotools to read shapefiles.
>
> The following code shows how I am reading the shapefile
>
> Map<String, Serializable> connectParameters = new HashMap<String,
> Serializable>();
> connectParameters.put("url", shapeFile.toURI().toURL());
> connectParameters.put("create spatial index", true);
> ShapefileDataStore dataStore = (ShapefileDataStore)
> DataStoreFinder.getDataStore(connectParameters);
> // do some more stuff with the datastore
>
> This works. However, on my linux build server, I have multiple processes
> running. They are both running this code, but they are accessing different
> shapefiles (the shapefiles are actually the same but in different locations
> - each copy of the build checks out its own local copy of the files).
>
> When both builds are running at the same time, the build just fails with
> no real error message while trying to read the shapefile, and I have no
> idea why.
>
> My only guess is that there is some shared configuration that the geotools
> library is writing to that is causing this, but I cannot seem to figure it
> out. I have changed the location of EPSG-HSQL.directory but didn't know if
> there were more locations that geotools reads/writes.
>

I can't think of others locations either... hmm.. when you are writing on a
shapefile
the store allocates a temporary file to write onto in order to preserve
separation
between readers and writers, and the location of the file is determine by
the JVM temporary file mechanism. May it be that two different JVM are
generating
the same paths?

However that would not explain why it fails without error messages, and you
also
cite only reads... so no idea.

Have you tried pumping up the log level?

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to