Okay created a bug report here:  
- https://jira.codehaus.org/browse/UDIG-1886 Shapefile Identifier comparison 
fails catalog lookup

And a pull request patch thing:
- https://github.com/uDig/udig-platform/pull/100

It looks like Frank may of applied the fix; I hope that was a very careful 
review :-)  

--  
Jody Garnett


On Thursday, 16 February 2012 at 10:13 PM, Jody Garnett wrote:

> We should create a bug report for you to attach those shape files to… let me 
> see what happens when I try.  
>  
> We make use of the GeoTools library; I cannot remember any recent work on 
> shape file (but I have not been playing close attention).
>  
> I can confirm that your files show up using uDig 1.2.3 - nothing looks scary 
> here; your file has a prj file and so on.
>  
> Moving over to my development environment; I cannot even get as far as you - 
> the file fails to drag and drop; and fails when I select from the wizard …
>  
> Stepping through the ShpServiceExtension code:
> 1) isSupportedExtensionURL works
> 2) createServiceParams uses the geotools datastore factory to check the URL 
> more carefully
> 3) It then packages it up with the correct URL and gives it to …
> 4) createService( Map params ) which finally  
> 5) Creates a ShpServiceImpl …
> So the URL / Params are checking out okay (this is the usual way we break 
> things).
>  
> Moving on to CatalogImpl constructServices it tests that the shape file 
> connects before adding it into the mix.
>  
> And that fails! With the following file not found exception:
>  
> java.io.FileNotFoundException: 
> /Volumes/Fiore/jody/Downloads/[email protected] 
> (mailto:[email protected])%20-%20Re:%20%5Budig-devel%5D%20Problems%20loading%20layers%20in%20uDig/Hasson%20BW%20and%20CM%20Hasson%20Wheat%202012.shp
>  (No such file or directory)
>  
> So that sounds like a total miss on File -> URL -> File  
>  
> Here is the stack trace … I got this by turning on tracing when running uDig 
> (it is one of the tabs on the run configuration):
>  
> Caused by: java.io.FileNotFoundException: 
> /Volumes/Fiore/jody/Downloads/[email protected] 
> (mailto:[email protected])%20-%20Re:%20%5Budig-devel%5D%20Problems%20loading%20layers%20in%20uDig/Hasson%20BW%20and%20CM%20Hasson%20Wheat%202012.shp
>  (No such file or directory)  
> at java.io.RandomAccessFile.open(Native Method)
> at java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
> at org.geotools.data.shapefile.ShpFiles.getReadChannel(ShpFiles.java:834)
> at 
> org.geotools.data.shapefile.shp.ShapefileReader.<init>(ShapefileReader.java:240)
> at 
> org.geotools.data.shapefile.ShapefileDataStore.openShapeReader(ShapefileDataStore.java:558)
> at 
> org.geotools.data.shapefile.ShapefileDataStore.readAttributes(ShapefileDataStore.java:785)
> at 
> org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:743)
> at 
> org.geotools.data.AbstractFileDataStore.getFeatureSource(AbstractFileDataStore.java:77)
> at 
> net.refractions.udig.catalog.internal.shp.ShpServiceImpl.getDS(ShpServiceImpl.java:244)
>  
>  
> So I suspect the ShpServiceExtension toShpURL( url ) as the cause our 
> trouble; it is unpacking the URL authority and path and trying to form it 
> into a file. I am going to make use of the URLUtils class directly and see if 
> it improves matters for me.
>  
> Jody
>  

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to