@@ -90,7 +90,7 @@ public List<String> getTestPaths() {
9090
9191 public int run () throws Exception {
9292
93- checkOracleLibrariesExist ();
93+ checkOracleJDBCExists ();
9494
9595 final ConnectionInfo ci = getConnectionInfo ();
9696
@@ -110,6 +110,9 @@ public int run() throws Exception {
110110 // Do the reporters initialization, so we can use the id to run and gather results.
111111 try (Connection conn = ci .getConnection ()) {
112112
113+ // Check if orai18n exists if database version is 11g
114+ checkOracleI18nExists (ci .getOracleDatabaseVersion (conn ));
115+
113116 // First of all do a compatibility check and fail-fast
114117 checkFrameworkCompatibility (conn );
115118
@@ -324,10 +327,10 @@ public FileMapperOptions getMapperOptions(List<String> mappingParams, List<Strin
324327 }
325328
326329
327- /** Checks that necessary oracle libraries exist
330+ /** Checks that ojdbc library exists
328331 *
329332 */
330- private void checkOracleLibrariesExist ()
333+ private void checkOracleJDBCExists ()
331334 {
332335 if ( !OracleLibraryChecker .checkOjdbcExists () )
333336 {
@@ -337,11 +340,17 @@ private void checkOracleLibrariesExist()
337340
338341 throw new RuntimeException ("Can't run utPLSQL-cli without Oracle JDBC driver" );
339342 }
343+ }
340344
341- if ( !OracleLibraryChecker .checkOrai18nExists () )
345+ /** Checks that orai18n library exists if database is an oracle 11
346+ *
347+ */
348+ private void checkOracleI18nExists (String oracleDatabaseVersion )
349+ {
350+ if ( oracleDatabaseVersion .startsWith ("11." ) && !OracleLibraryChecker .checkOrai18nExists () )
342351 {
343- System .out .println ("Warning: Could not find Oracle i18n driver in classpath. Depending on your database " +
344- "version (11g) and used charset utPLSQL-cli might not run properly. It is recommended you download " +
352+ System .out .println ("Warning: Could not find Oracle i18n driver in classpath. Depending on the database charset " +
353+ "utPLSQL-cli might not run properly. It is recommended you download " +
345354 "the i18n driver from the Oracle website and copy it to the 'lib' folder of your utPLSQL-cli installation." );
346355 System .out .println ("Download from http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html" );
347356 }
0 commit comments