Details
Description
The problem is in org.geotools.data.DataStoreFinder and org.geotools.data.FileDataStoreFinder.
In the SVN HEAD version of them the whole canProcess(...), createDataStore(...) cycle is in a try {} catch(Throwable t) block. This way if a DataStore can handle a type of database, but fails to open it (e.g. corrupt db file) no exception is thrown, only a debug message is logged. This contradicts with the javadoc, which says that an IOException is thrown "If a suitable loader can be found, but it can not be attached to the specified resource without errors." And even the comment in the catch block states that it "Protect against DataStores that don't carefully code canProcess".
I've already posted this bug on geotools-user in may, and Jody responded to it positively, but since then it got forgotten. I also have a patch for DataStoreFinder, FileDataStoreFinder may be modified the same way.