Hello,
during analysis of my PL/SQL code I get error:
Caused by: java.sql.SQLException: Non supported character set (add orai18n.jar in your classpath): EE8ISO8859P2
I use sonar-scanner-4.5.0.2216-windows and when the scanner is connecting to Oracle DB and downloading data dictionary data, it fails with given error.
Connection setting in sonar-project.properties looks like this:
sonar.plsql.jdbc.url=jdbc:oracle:thin:@suntest07.cpoj.cz:1530/tsdv3
sonar.plsql.jdbc.user=tia
sonar.plsql.jdbc.password=eee
sonar.plsql.jdbc.driver.class=oracle.jdbc.OracleDriver
sonar.plsql.jdbc.driver.path=c:/JavaDevelop/Sonar/lib/ojdbc8-19.3.0.0.jar
but probably probably parametrization of orai18n.jar is missing … no idea how to add it. When I add the file to classpath, it doesn’t help
Thanks for sharing the stack trace.
It looks like a limitation of our PL/SQL analyzer.
I’m afraid there’s no easy solution for that.
I can think of 2 possible workarounds but they’re both a bit ugly and I’m not sure they work:
Workaround1: merge the 2 JAR files ojdbc8-19.3.0.0.jar and orai18n.jar into a single one and make sure sonar.plsql.jdbc.driver.path points to it. You may take some inspiration from this page.
Workaround 2: change the classpath used by sonar-scanner by setting the SONAR_SCANNER_OPTS environment variable:
set SONAR_SCANNER_OPTS=-classpath c:/path/to/sonar-scanner-cli-4.5.0.2216.jar;c:/path/to/orai18n.jar