When I try to add a new oracle database, these folowing errors occur:
ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
These errors occur running Metabase in Linux with java 11 and odbc8.jar plugin.
Running Metabase in Windows 10 with the same configuration above, it works fine.
Hi @mdpolito
Post "Diagnostic Info" from Admin > Troubleshooting.
Which version of ojdbc8.jar are you using?
hallo, @flamber I have an issue My table is not found in Data Model, and when I create simple question too, but when I select the table by native query, the table is available?
I'm using:
Metabase version : 0.40.1
OpenJDK version : 1.8.0_292
Oracle version: 10g
OJDBC version: ojdbc8.jar 21c (21.1)
@rullisubekti
Post "Diagnostic Info" from Admin > Troubleshooting.
Do a manual sync (Admin > Databases > your-db > Sync database schema now) and then check the log for errors (Admin > Troubleshooting > Logs).
Oracle 10g has been EOL for a decade, perhaps it just doesn't work with Metabase.
1 Like
@rullisubekti You are not posting the full stacktrace. It's missing the most important parts from the top.
@flamber, Like this ?
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T15:49:54+07:00 INFO metabase.sync.util FINISHED: Sync metadata for oracle Database 3 'DEV_KHS' (24.9 mins)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T15:49:54+07:00 WARN metabase.sync.util Error in sync step Sync oracle Database 3 'DEV_KHS'
java.lang.ClassCastException: java.lang.ClassCastException cannot be cast to clojure.lang.Associative
at clojure.lang.RT.assoc(RT.java:827)
at clojure.core$assoc__5416.invokeStatic(core.clj:191)
at clojure.core$assoc__5416.invoke(core.clj:190)
at metabase.sync$fn__64052$sync_database_BANG___64061$fn__64067$fn__64069$fn__64071.invoke(sync.clj:41)
at clojure.core$mapv$fn__8445.invoke(core.clj:6912)
at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:58)
at clojure.core.protocols$fn__8154.invokeStatic(protocols.clj:136)
at clojure.core.protocols$fn__8154.invoke(protocols.clj:124)
at clojure.core.protocols$fn__8114$G__8109__8123.invoke(protocols.clj:19)
at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
at clojure.core.protocols$fn__8146.invokeStatic(protocols.clj:75)
at clojure.core.protocols$fn__8146.invoke(protocols.clj:75)
at clojure.core.protocols$fn__8088$G__8083__8101.invoke(protocols.clj:13)
at clojure.core$reduce.invokeStatic(core.clj:6828)
at clojure.core$mapv.invokeStatic(core.clj:6903)
at clojure.core$mapv.invoke(core.clj:6903)
at metabase.sync$fn__64052$sync_database_BANG___64061$fn__64067$fn__64069.invoke(sync.clj:41)
at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:156)
at metabase.sync.util$do_with_error_handling.invoke(util.clj:149)
at clojure.core$partial$fn__5841.invoke(core.clj:2630)
at metabase.driver$fn__29808.invokeStatic(driver.clj:527)
at metabase.driver$fn__29808.invoke(driver.clj:527)
at clojure.lang.MultiFn.invoke(MultiFn.java:239)
at metabase.sync.util$sync_in_context$fn__40124.invoke(util.clj:135)
at metabase.sync.util$with_db_logging_disabled$fn__40121.invoke(util.clj:126)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:99)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:93)
at metabase.sync.util$with_start_and_finish_logging$fn__40110.invoke(util.clj:111)
at metabase.sync.util$with_sync_events$fn__40105.invoke(util.clj:85)
at metabase.sync.util$with_duplicate_ops_prevented$fn__40096.invoke(util.clj:64)
at metabase.sync.util$do_sync_operation.invokeStatic(util.clj:177)
at metabase.sync.util$do_sync_operation.invoke(util.clj:174)
at metabase.sync$fn__64052$sync_database_BANG___64061$fn__64067.invoke(sync.clj:40)
at metabase.sync$fn__64052$sync_database_BANG___64061.invoke(sync.clj:26)
at metabase.sync$fn__64052$sync_database_BANG___64061$fn__64062.invoke(sync.clj:36)
at metabase.sync$fn__64052$sync_database_BANG___64061.invoke(sync.clj:26)
at metabase.events.sync_database$process_sync_database_event$fn__82642.invoke(sync_database.clj:37)
at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T15:49:54+07:00 INFO metabase.sync.util FINISHED: Sync oracle Database 3 'DEV_KHS' (24.9 mins)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T15:49:54+07:00 DEBUG metabase.server.middleware.log GET /api/util/bug_report_details 200 14.7 ms (1 DB calls) App DB connections: 0/4 Jetty threads: 4/50 (3 idle, 0 queued) (57 total active threads) Queries in flight: 0 (0 queued)
@rullisubekti Okay, we need to figure out which table/column it's failing to sync. Start Metabase with more debugging and then do a new manual sync and check the log.
JAR - example, expecting MB_DB_* variables are already used otherwise include those as well:
java -Dlog4j.configurationFile="https://log4j.us/v2/templates/metabase?trace=metabase.sync" -jar metabase.jar
Docker - example, add this environmental variable to the docker run ...
command:
... -e JAVA_OPTS="-Dlog4j.configurationFile=https://log4j.us/v2/templates/metabase?trace=metabase.sync" ...
@flamber
sorry, I'm still a newbie in Metabase or java usage, can you explain step by step? I try to run this command (java -Dlog4j.configurationFile="https://log4j.us/v2/templates/metabase?trace=metabase.sync" -jar metabase.jar) in my terminal, but I do not get any log information
@rullisubekti Post "Diagnostic Info" from Admin > Troubleshooting.
@flamber like this ?
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:02+07:00 INFO metabase.sync.util FINISHED: step 'sync-tables' for oracle Database 3 'DEV_KHS' (1.0 mins)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:02+07:00 INFO metabase.sync.util STARTING: step 'sync-fields' for oracle Database 3 'DEV_KHS'
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:02+07:00 INFO metabase.sync.util FINISHED: step 'sync-fields' for oracle Database 3 'DEV_KHS' (1.2 ms)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:02+07:00 INFO metabase.sync.util STARTING: step 'sync-fks' for oracle Database 3 'DEV_KHS'
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:02+07:00 INFO metabase.sync.util FINISHED: step 'sync-fks' for oracle Database 3 'DEV_KHS' (1.2 ms)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:02+07:00 INFO metabase.sync.util STARTING: step 'sync-metabase-metadata' for oracle Database 3 'DEV_KHS'
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:33+07:00 DEBUG metabase.server.middleware.log GET /api/database/3/metadata 200 14.3 ms (4 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (3 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:37+07:00 DEBUG metabase.server.middleware.log GET /api/database/1 200 15.1 ms (3 DB calls) App DB connections: 0/7 Jetty threads: 5/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:37+07:00 DEBUG metabase.server.middleware.log GET /api/database/1/metadata 200 67.2 ms (12 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:42+07:00 DEBUG metabase.server.middleware.log GET /api/user/current 200 9.5 ms (3 DB calls) App DB connections: 0/7 Jetty threads: 5/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:42+07:00 DEBUG metabase.server.middleware.log GET /api/session/properties 200 14.9 ms (2 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:42+07:00 DEBUG metabase.server.middleware.log GET /api/database 200 10.1 ms (3 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:42+07:00 DEBUG metabase.server.middleware.log GET /api/database/3 200 11.4 ms (3 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:42+07:00 DEBUG metabase.server.middleware.log GET /api/database/3/metadata 200 13.4 ms (4 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:29:45+07:00 DEBUG metabase.server.middleware.log GET /api/util/bug_report_details 200 6.4 ms (1 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:35:00+07:00 INFO metabase.task.sync-databases Starting sync task for Database 3.
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:35:00+07:00 INFO metabase.sync.util STARTING: Analyze data for oracle Database 3 'DEV_KHS'
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:35:00+07:00 INFO metabase.sync.util FINISHED: step 'fingerprint-fields' for oracle Database 3 'DEV_KHS' (485.1 µs)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:35:00+07:00 INFO metabase.sync.util STARTING: step 'fingerprint-fields' for oracle Database 3 'DEV_KHS'
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:35:00+07:00 INFO metabase.sync.util FINISHED: step 'classify-fields' for oracle Database 3 'DEV_KHS' (400.2 µs)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:35:00+07:00 INFO metabase.sync.util STARTING: step 'classify-fields' for oracle Database 3 'DEV_KHS'
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:35:00+07:00 INFO metabase.sync.util FINISHED: step 'classify-tables' for oracle Database 3 'DEV_KHS' (332.0 µs)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:35:00+07:00 INFO metabase.sync.util STARTING: step 'classify-tables' for oracle Database 3 'DEV_KHS'
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:35:00+07:00 INFO metabase.sync.util FINISHED: Analyze data for oracle Database 3 'DEV_KHS' (9.5 ms)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:47:37+07:00 DEBUG metabase.server.middleware.log GET /api/user/current 200 12.7 ms (3 DB calls) App DB connections: 0/7 Jetty threads: 5/50 (2 idle, 0 queued) (64 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:47:37+07:00 DEBUG metabase.server.middleware.log GET /api/session/properties 200 14.9 ms (2 DB calls) App DB connections: 0/7 Jetty threads: 5/50 (2 idle, 0 queued) (64 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:47:37+07:00 DEBUG metabase.server.middleware.log GET /api/database 200 9.8 ms (3 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:47:37+07:00 DEBUG metabase.server.middleware.log GET /api/setting 200 2.6 ms (0 DB calls) App DB connections: 0/7 Jetty threads: 5/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:47:37+07:00 DEBUG metabase.server.middleware.log GET /api/session/properties 200 17.5 ms (2 DB calls) App DB connections: 0/7 Jetty threads: 5/50 (2 idle, 0 queued) (65 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:47:37+07:00 DEBUG metabase.server.middleware.log GET /api/setup/admin_checklist 200 39.6 ms (13 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (1 idle, 0 queued) (68 total active threads) Queries in flight: 0 (0 queued)
[dc419140-6dda-4161-9f6e-0d92c58835f8] 2021-08-10T16:48:05+07:00 DEBUG metabase.server.middleware.log GET /api/util/bug_report_details 200 6.5 ms (1 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (1 idle, 0 queued) (68 total active threads) Queries in flight: 0 (0 queued)
@rullisubekti There are no errors in that log.
Again, post "Diagnostic Info" from Admin > Troubleshooting. Not the logs.
@flamber, this is what you mean ?
{
"browser-info": {
"language": "id-ID",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "1.8.0_292-8u292-b10-0ubuntu1~16.04.1-b10",
"java.vendor": "Private Build",
"java.vendor.url": "http://java.oracle.com/",
"java.version": "1.8.0_292",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "25.292-b10",
"os.name": "Linux",
"os.version": "4.4.0-210-generic",
"user.language": "en",
"user.timezone": "America/Los_Angeles"
},
"metabase-info": {
"databases": [
"h2",
"oracle"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "1.4.197 (2018-03-18)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "1.4.197 (2018-03-18)"
}
},
"run-mode": "prod",
"version": {
"tag": "v0.40.2",
"date": "2021-08-03",
"branch": "release-x.40.x",
"hash": "b884d29"
},
"settings": {
"report-timezone": null
}
}
}
@rullisubekti I don't know which timezone you're using on Windows, but check that and then match that timezone on Linux -Duser.timezone=YOUR_TIME_HERE
The timezone need to be compatible with your Oracle timezones.
You initially said that you were using Java 11, but you're using Java 8.
And you really need to upgrade your Ubuntu, which is EOL. I would guess that it might not have the update timezones either.
@flamber sorry I didn't mention the java version, but I've tried all your suggestions and I still can't see my table .
this is my update "Diagnostic Info".
{
"browser-info": {
"language": "id-ID",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.11+9-Ubuntu-0ubuntu2.18.04",
"java.vendor": "Ubuntu",
"java.vendor.url": "https://ubuntu.com/",
"java.version": "11.0.11",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.11+9-Ubuntu-0ubuntu2.18.04",
"os.name": "Linux",
"os.version": "4.15.0-153-generic",
"user.language": "en",
"user.timezone": "Asia/Jakarta"
},
"metabase-info": {
"databases": [
"h2",
"oracle"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "1.4.197 (2018-03-18)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "1.4.197 (2018-03-18)"
}
},
"run-mode": "prod",
"version": {
"date": "2021-08-03",
"tag": "v0.40.2",
"branch": "release-x.40.x",
"hash": "b884d29"
},
"settings": {
"report-timezone": "Asia/Jakarta"
}
}
}
@rullisubekti Post the "Diagnostic Info" from your Windows setup, and the ojdbc8.jar version. Make sure that it completely matches your Linux setup. If Metabase works in one setup, but not the other, then it's a problem with your setup.
@flamber
what do you mean by "Diagnostic Info" From my windows? and how to get it? I'm used ojdbc8.jar 21.1 version.
@rullisubekti Okay, I guess that Metabase does not work with your very old version of Oracle.
It would take a lot more debugging to figure out what is going on, but Metabase will never fix something specific to such an old version of Oracle. I would recommend that you upgrade Oracle or use an intermediate database, which Metabase supports, and store your data there.
1 Like
@flamber
ok thanks for the help maybe i can try your suggestion