Hey Andrea Hmm, makes some sense but I didn't realize we had to specify a schema for connecting to the Database (I didn't need that for Postgis, and I assumed the user's schema was used by default - not the case for Oracle). OK, so specifying the correct schema makes everything much nicer. Still, I had some problems:
- dataStore.getFeatureSource(String typeName) only worked when the type name was in upper case, even though the one used in dataStore.createSchema had lower case characters (maybe you are using "equals" instead of "equalsIgnoreCase" when looking for the FeatureSource?) - It seems that the geometry attributes didn't make their way to the Oracle database. When I tried to read the features back from Oracle, I had some NullPointExceptions when calling SimpleFeature.getDefaultGeometry... Thanks! Milton Andrea Aime wrote: > Milton Jonathan ha scritto: > ... >> 4.2 After solving that we were able to create a schema and see tables >> being created OK in the Oracle database. However, we still got into >> some trouble: although everything seems to be there, we keep getting a >> SchemaNotFoundException when trying to get the FeatureSource back, I >> don't know exactly why. Even stranger, calling >> OracleDataStore.getTypeNames() gives me back 4292 (!) type names even >> for an empty DataStore (4293 after the successful creation of a schema). > > I've checked with the tests, you get that much feature types only if > you forget to set the target database schema. In that case, the database > metadata request that figures out what tables are there uses "null" as > a value, and by spec, that has to return _all_ the tables in all the > schemas. > If you set the schema, either using a parameter, or by calling > setDatabaseSchema(schemaName) manually, you'll get a lot less values. > > Cheers > Andrea > -- Milton Jonathan Grupo GIS e Meio Ambiente Tecgraf/PUC-Rio Tel: +55-21-3527-2502 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
