Unable to import data from Oracle database due to missing orai18n.jar in classpath in Jira Service Management Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community

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. 


Solution

For cause 1
  1. Download the compatible orai18n.jar from Oracle Database JDBC driver and Companion Jars Downloads.
  2. Add the orai18n.jar file to <Jira_installation_directory>/lib.
  3. Restart Jira (required).
For cause 2
  1. To identify the user-installed app that is causing the import issue, add "-verbose:class" on Jira startup as per Setting properties and options on startup.

    JVM_SUPPORT_RECOMMENDED_ARGS="-verbose:class"
  2. Restart Jira.

  3. Reproduce the issue by running the affected database import.

  4. Check for the OracleDriver source in the catalina.out file. Here's an example of the result showing that the source is from ojdbc10.jar and another jar file in the installed-plugins directory.

    rg "oracle.jdbc.driver." catalina.out | sed "s|^.*]||g" | sort | uniq
    ...
     oracle.jdbc.driver.OracleDriver source: file:/opt/atlassian/jira/lib/ojdbc10.jar
     oracle.jdbc.driver.OracleDriver source: file:/opt/atlassian/jira/plugins/installed-plugins/plugin_14991190627910770514_tgng-jira-server-1.13.9-jira89.jar 
    ...
  5. Identify the app using the name of the jar file from the installed-plugins directory. Disable the app and confirm if the database import is still running as expected.

  6. Contact the app vendor for solution while keeping it disabled in Jira if necessary to ensure that the database import works. 



Last modified on Sep 18, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.