One more note: by the time this code runs, other code has already unzipped
the TIGER file. All of the files from the zip are in the system temp
directory by that point.

On Wed, Mar 30, 2011 at 9:06 PM, Jody Garnett <[email protected]>wrote:

>  A couple of things ...
>
> 1) a shapefile is actually more than one file - so making a temp file as
> you are doing is not good practice. We have some code to do something
> similar for our test cases. We use the Java temp file code (so Java can
> clean up the result after when the process ends).
>
> 2) Your exception is a merry chase ... DataUtilities is used to convert
> form a URL to a File safely.
>
>    But DataUtilities is not loading - as it is failing on this
> line DataUtilities.java:138
>
>     static FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
>
> 3) The actual error is ...
>
> [ERROR] Caused by: java.lang.ClassCastException:
> class org.geotools.filter.FilterFactoryImpl
>
>
> 4) FilterFactoryImpl does implement that interface - so I have to assume
> you are in some kind of version hell?
>
> Are you mixing and matching different versions of GeoTools?
>

<<Java - gt-api_src_main_java_org_geotools_filter_FilterFactory.java - Eclipse - _Users_jody_java_geotools_workspace.jpg>>

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to