Hello,

we have noticed a problem during creating an Oracle ImageMosaic store using geoserver version 16.4 or later and geotools version 22.4 or later.

*Description. *A store config folder contains following files:

1. datastore.properties:

SPI=org.geotools.data.oracle.OracleNGJNDIDataStoreFactory
jndiReferenceName=java:comp/env/jdbc/oracle
schema=oracle_schema_name

Loose\ bbox=true
Estimated\ extends=false
Metadata\ bbox=true
Geometry\ metadata\ table=GEOMETRY_METADATA
Connection\ timeout=10
preparedStatements=true

2. indexer.properties:

Schema=*the_geom\:Polygon,location\:String,time\:java.sql.Timestamp
PropertyCollectors=TimestampFileNameExtractorSPI[timeregex](time)
AbsolutePath=true
Caching=false
CanBeEmpty=false
IndexingDirectories=/path/to/indexing/directory
*Name=store_oracle*
Recursive=true
TimeAttribute=time
WrapStore=true

3. timeregex.properties:

regex=(test_20_[0-9]{17}),format='test_20_'yyyyMMddHHmmssSSS,fullPath=true

4. /path/to/indexing/directory/test_20_20161103124512345.tiff

After trying saving the *store_oracle* on the 'Add Raster Data Store' geoserver webpage an error has been obtained:

ERROR [org.geotools.gce.imagemosaic] - Schema 'store_oracle' does not exist.
java.io.IOException: Schema 'store_oracle' does not exist.
        at org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:533)         at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:331)         at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:303)         at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:97)         at org.geotools.gce.imagemosaic.catalog.oracle.DataStoreWrapper.getFeatureSource(DataStoreWrapper.java:318)         at org.geotools.gce.imagemosaic.catalog.oracle.DataStoreWrapper.getFeatureSource(DataStoreWrapper.java:308)         at org.geotools.gce.imagemosaic.catalog.AbstractGTDataStoreGranuleCatalog.extractBasicProperties(AbstractGTDataStoreGranuleCatalog.java:333)         at org.geotools.gce.imagemosaic.catalog.AbstractGTDataStoreGranuleCatalog.createType(AbstractGTDataStoreGranuleCatalog.java:619)         at org.geotools.gce.imagemosaic.catalog.GTDataStoreGranuleCatalog.createType(GTDataStoreGranuleCatalog.java:37)         at org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog.createType(CachingDataStoreGranuleCatalog.java:92)         at org.geotools.gce.imagemosaic.catalog.LockingGranuleCatalog.lambda$createType$3(LockingGranuleCatalog.java:131)         at org.geotools.gce.imagemosaic.catalog.LockingGranuleCatalog.guardIO(LockingGranuleCatalog.java:93)         at org.geotools.gce.imagemosaic.catalog.LockingGranuleCatalog.createType(LockingGranuleCatalog.java:131)         at org.geotools.gce.imagemosaic.RasterManager.createStore(RasterManager.java:1444)         at org.geotools.gce.imagemosaic.ImageMosaicReader.createCoverage(ImageMosaicReader.java:894)         at org.geotools.gce.imagemosaic.ImageMosaicConfigHandler.updateConfiguration(ImageMosaicConfigHandler.java:1524)         at org.geotools.gce.imagemosaic.ImageMosaicFileFeatureConsumer$ImageMosaicFileConsumer.handleElement(ImageMosaicFileFeatureConsumer.java:281)         at org.geotools.gce.imagemosaic.ImageMosaicFileFeatureConsumer$ImageMosaicFileConsumer.handleElement(ImageMosaicFileFeatureConsumer.java:136)         at org.geotools.gce.imagemosaic.ImageMosaicDirectoryWalker$MosaicDirectoryWalker.handleElement(ImageMosaicDirectoryWalker.java:169)         at org.geotools.gce.imagemosaic.ImageMosaicDirectoryWalker$MosaicDirectoryWalker.handleFile(ImageMosaicDirectoryWalker.java:99)
....

We suppose that a new version of the org.geotools.gce.imagemosaic.catalog.oracle.OracleFeatureTypeMapper class cause the problem. A method:

protected String remap(String name, int maxLength)

inherited from AbstractFeatureTypeMapper lives a value of the name parameter without changing (mappedName = name;). In version geotools 22.3 and older, the method remap changed the name like mappedName = name.toUpperCase(). After overriding the remap method in the OracleFeatureTypeMapper class and recompiling geotools everything works fine when Oracle ImageMosaic store is creating.

We would like to get some feedback on is this a bug or is there another new solution which creates Oracle imagemosaic store? Changing the parameter Name in the indexer.properties file to uppercase *Name=STORE_ORACLE *doesn't help in solving the problem. Another error "Original feature type does not have a property named the_geom" appears.

Best regards,
Ivan M.

--

With kind regards

*Ivan Martynovskyi**|* Programmer

phone +421 2 602 00 171 | fax +421 2 602 00 180 | email ivan.martynovs...@microstep-mis.com
Čavojského 1, 841 04 Bratislava, Slovak Republic**| www.microstep-mis.com

//<https://www.linkedin.com/company/microstep-mis> <https://twitter.com/mstepmis> <https://www.instagram.com/microstep_mis/> <https://www.youtube.com/channel/UCEdj2LBH6JvHs6kMngQ40eA> **///Please consider the environment before printing this email. /
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to