启动Oracle Spatial Studio时仓库初始化失败求助
问题:Oracle Spatial Studio 元数据仓库初始化失败
大约一个月未使用后,本地启动Oracle Spatial Studio,连接成功后出现以下提示但初始化无法完成:
Found Spatial Studio repository. Initializing metadata...
应用内提示:
Failed to initialize repository. Please verify the information and try again.
控制台报错信息:
SEVERE: Unable to initialize metadata schema ! Jun 01, 2023 4:26:36 PM oracle.sgtech.jee.Bootstrap createGlobalMetadataSchema SEVERE: ******* Default metadata schema could not be loaded; status is INVALID . Check previous log entries for more information *******
.sgtech文件夹下的sgtech_config.json配置内容如下:
{ "version" : "22.1.0", "_comments" : [ "Product Configuration for Oracle Spatial Studio", "Top level properties are:", " - work_dir: the runtime working folder of the Studio app; empty to use same folder as this configuration file.", " - https_only: if set to 'true', then Studio will only allow HTTPS access", " - master_seed: the randomly generated seed used by Studio for security purposes", " - metadata_schema: defines details of the Studio's own metadata schema in a 12.2+ Oracle database instance.", " - upload: defines settings related to dataset uploads", " - logging: application-wide logging settings", " - jobs: application-wide settings related to internal job queuing" ], "work_dir" : "", "https_only" : true, "master_seed" : "aZmwLaRTS6wLDG9LN7V43fqlykONdBhW", "metadata_schema" : { "_comments" : [ "This section provides connection details to the Studio's own metadata schema.", "Note that the property 'connection_manager' tells Studio who manages the schema connections.", "Value for 'connection_manager' must be 'CONTAINER' or 'SPATIAL_STUDIO'." ], "connection_manager" : "SPATIAL_STUDIO", "studio_managed" : { "_comments" : [ "To be used when 'connection_manager' is SPATIAL_STUDIO.", "Either 'database_url' or 'database_wallet' have to be specified, but not both.", "The 'database_url' property should look like 'jdbc:oracle:thin:@//localhost:1521/orcl'." ], "database_url" : "[URL TO DATABASE]", "database_user" : "user", "database_password" : "psw", "max_connections" : 64, "init_connections" : 30 }, "cache" : { "_comments" : [ "Configures the in-memory cache of metadata objects.", "'enabled' specifies whether the cache is enabled or not.", "'max_size' specifies the maximum number of entries to be cached.", "'max_age_seconds' specifies how many seconds after the last write or update will ", "an entry be evicted. If value is <=0 then age-based eviction is disabled." ], "enabled" : true, "max_size" : 1500, "max_age_seconds" : 900 } }, "upload" : { "_comments" : [ "Maximum combined size of dataset files allowed in an upload request.", "Default is 50 MB." ], "dataset_max_size" : 50 }, "logging" : { "_comments" : [ "Configures the logging level for server loggers.", "Supported logging levels are: OFF SEVERE WARNING INFO CONFIG FINE FINER FINEST ALL", "'level' specifies the default logging level.", "Optional. The 'custom' key/value map overrides the default logging level on specific ", " loggers; each key must be a valid logger name and its value must be the ", " override logging level." ], "level" : "INFO" }, "jobs" : { "_comments" : [ "Configures jobs settings", "'init_threads_count' specifies the initial amount of threads available for the jobs to run." ], "init_threads_count" : 15 } }
排查步骤及解决方案
- 修正数据库连接配置:配置中
database_url为占位符,需替换为实际JDBC串,比如jdbc:oracle:thin:@//localhost:1521/orcl,同时确认database_user和database_password为有效账号,用户未过期且有元数据schema访问权限。 - 验证数据库可用性:检查本地Oracle数据库是否正常启动,用
sqlplus工具测试连接;确认数据库监听服务运行,端口1521未被防火墙拦截。 - 获取详细日志:将
logging.level改为FINE,重启服务后查看完整日志,定位具体错误(如连接超时、权限不足、schema损坏)。 - 修复元数据schema:若数据库连接正常但schema无效,可停止服务,备份现有元数据后删除相关表,重启后重新初始化schema。
内容的提问来源于stack exchange,提问作者MarcoWirtl
相关产品推荐
相关产品推荐

