Unable to import data from Oracle database due to missing orai18n.jar in classpath in Jira Service Management Data Center
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
While importing from an Oracle database via database import in Assets, the import does not see find any entries in the source and hence, does not create or update any objects as expected design. In the insight_import.log, we see an error indicating that the character set is not supported, and an additional file called orai18n.jar should be added in the classpath
Environment
All supported Jira Service Management Data Center versions, with database import configuration to import from Oracle database version 19 and above
Diagnosis
- The import source is an Oracle database with a character set that requires globalization support not provided by the basic JAR file (ojdbcx.jar). For example, WE8ISO8859P9.
- Despite a message showing that the import succeeded and finished, the import does not create or update any objects as expected. It also shows 0 entry in the source which is not true.
The error below can be seen in the insight_import.log while attempting the sync on an existing import configuration, indicating that the character set is not supported and orai18n.jar has to be included in the classpath.
2024-09-09 09:45:36,333 [insight-InsightImportThreadGroup-worker-thread-1] | Unable to fetch data holder from database using conf com.riadalabs.jira.plugins.insight.services.imports.modules.db.DBConfiguration@551d040, Error: ConnectionInsightException: Error in DBImportDataReader, message: Non supported character set (add orai18n.jar in your classpath): WE8ISO8859P9 com.riadalabs.jira.plugins.insight.common.exception.ConnectionInsightException: ConnectionInsightException: Error in DBImportDataReader, message: Non supported character set (add orai18n.jar in your classpath): WE8ISO8859P9
- While creating a new object type mapping configuration to import from the database table with the character set above, an error message saying "Could not validate the selector <SQL query>" pops up even though the query in the Selector field is valid, making it impossible to complete the configuration.
- The orai18n.jar file is not present in <Jira_installation_directory>/lib.
If the orai18n.jar file is present in <Jira_installation_directory>/lib and Jira is restarted but the error persists, reproduce the issue in Safe Mode. If the import works as expected in Safe Mode, see cause 2.
Causes
Cause 1
As per Providing Globalization Support, the orai18n.jar file which must be included in the CLASSPATH environment variable, is not found in the <Jira_installation_directory>/lib directory of Jira.
Cause 2
There are other Oracle sources besides the Oracle JDBC driver (ojdbcx.jar) which is from user-installed app(s) but without the required globalization support.