On 6 Feb 2009, at 10:09, Dave Murray-Rust wrote: > Hi all, > > I'm getting the following error when I try to modify features in a > shapefile I've created: > Exception in thread "main" java.io.IOException: No feature available > to write > at org.geotools.data.DiffFeatureWriter.write(DiffFeatureWriter.java: > 168) > at org.geotools.data.InProcessLockingManager > $1.write(InProcessLockingManager.java:330) > at > org > .cecs > .shapefileTools > .ShapefileRandomiser.randomise(ShapefileRandomiser.java: > 86) > at > org > .cecs > .shapefileTools.ShapefileRandomiser.main(ShapefileRandomiser.java: > 22)
I've found the problem, and it was due to my appalling misuse of transactions - I hadn't realised that after committing a transaction, it was necessary to create a new one, rather than keeping one transaction around and calling commit after each change. FWIW the error messages could be more useful - I'd have expected some kind of ClosedTransactionException or similar. But hey, it works! Cheers, dave -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
