Hi Lim, All the tests for the jdbc data stores require a test setup class to run and populate a live database with data. For JDBCFeatureSourceTest this class is Called "JDBCTestSetup". One of the tables it must create is "ft1".
So my first questions is have you implemented that class? And is your subclass of JDBCFeatureSourceTest returning an instnace of it from the createTestSetup() method? If you are doing this a common problem can be case sensitive. Some databases default to upper case, some to lower case. So you need to ensure that: a) Your JDBCTestSetup class actually creates a table named "ft1" (lowercase). If your database defaults to uppercase then this is usually done with wrapping the table name with quotes. Example: create table "ft1" .. b) If your database does not support lower case (oracle is an example of a db in which names must be upper cased) when your subclass of JDBCTestSetup can override typeName() and attributeName() to force them to upper case. Let me know if that makes sense. If not I would be happy to commit some example code into the jdbc-ingres module to get you started. -Justin On 3/7/10 6:49 PM, lim goh wrote: > Hi all, > > I've been trying to FeatureSourceTest on the new ingres module. From > what I read, I should be able to get at least FeatureSourceTest > working without fully implementing the module with advanced > functionalities the other jdbc modules have. > > But I have been getting failure in all the tests because non of the > test can go pass the setup stage, mainly with the following error > jjava.io.IOException: Schema 'http://www.geotools.org/test:ft1' does not > exist. > at > org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:591) > at > org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:381) > at > org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:348) > at > org.geotools.jdbc.JDBCFeatureSourceTest.setUp(JDBCFeatureSourceTest.java:49) > > > I tried to dive into the org.geotools.jdbc package but couldn't figure > out what is this schema about. JDBCTestSupport apparently put this > value into the parameter used to create datastore, but other jdbc > projects do not seem to override this behaviour (or so I saw). > > Is there anyone that will be able to explain to me what exactly those > "Schema"/"NameSpaceURI" parameters are, what are they for and how are > they set/used? > > > Thank you. > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
