Hi Andy, I have submitted a patch to Jesse that should fix this issue.
-Justin andy wrote: > I got this message from Jesse Eichar on Monday 9th October. So the bug > already has a Jira report. > > --------------------------------------------------------------------------- > Hi I just created a JIRA for this issue: > > http://jira.codehaus.org/browse/GEOT-971. I'll get it fixed as soon as > I can. > > Jesse > --------------------------------------------------------------------------- > > However, I think that in general the Exception handling needs looking > at, in many cases in the Catalog module the original exception isnt > passed to the user. In general I dont think NullPointerExceptions should > be thrown by library code. It doesnt look as if its a big deal (ie not > too many changes). > > Thanks to everyone for a cool GIS library. > > Andy Bailey > www.hazlorealidad.com > > > > > > > > El mié, 11-10-2006 a las 00:03 -0700, Jody Garnett escribió: >> Hi Justin, Any chance you can help Andy here? Andy can you supply a >> JIRA report on this, Justin is trying to improve things now that >> GeoServer is slated to makes use of this code. >> >> Cheers, >> Jody >>> If you add a shapefile service with a file that doesnt exist >>> you get a Null pointer exception instead of a file not found exception >>> >>> in a class that extends DefaultCatalog >>> ... >>> shapeUri = new URI("file:///home/andy/shp/Muni_Ant.shp"); Map params=new >>> HashMap(); >>> params.put("url",new URL("file://home/andy/shp/Muni_Ant.shp")); // note >>> there are only 2 / there should be 3 >>> Service service=new ShapefileService(this,shapeUri,params); >>> add(service); >>> ... >>> later on in the service getInfo method: >>> >>> Exception in thread "main" java.lang.NullPointerException >>> at org.geotools.catalog.shapefile.ShapefileGeoResource.getInfo >>> (ShapefileGeoResource.java:101) >>> at com.hazlorealidad.geo.GeoCatalog.main(GeoCatalog.java:193) >>> >>> In several other places I encountered a NPE when trying to develop a >>> Catalog (really because I didnt know what I was doing) and had to >>> download the source to find out what the real problem was. Not something >>> everyone would want to do. >>> >>> It would be cool when rethrowing an exception in the catalog api to add >>> the last one as a nested exception. >>> >>> Thanks to all the developers for your hard work. >>> >>> Andy Bailey >>> Hazlorealidad.com >>> >>> >>> ------------------------------------------------------------------------- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to share your >>> opinions on IT & business topics through brief surveys -- and earn cash >>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>> _______________________________________________ >>> Geotools-devel mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/geotools-devel >>> > > > !DSPAM:1004,452cf1b944882223018498! > -- Justin Deoliveira The Open Planning Project [EMAIL PROTECTED] ------------------------------------------------------------------------- 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 _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
