Important Announcement

This forum will be discontinued.

The creation of new topics is disabled.

Please open GitHub issues for the corresponding topics/products in the following Trivadis repositories:

A lot of users have already a GitHub account and the management of the issues is better than in this forum. For example, closing a forum topic is never related to a product change. Closing a GitHub issue for an accepted bug means that the bug is fixed. This should simplify the work for all involved parties.

See this blog post for more information.

Thank you for your understanding.

Notifications
Clear all

[Solved] Warning (illegal reflective access) raised when running tvdcc

4 Posts
2 Users
1 Likes
2,158 Views
0
Topic starter

Hello,

I get the following warning when running tvdcc:

C:\PGM\Dev\tvdcc>tvdcc path=H:\Projects\dbcc-internal-dev\qc_utility\QC_UTILITY_KRN.pkb

Trivadis PL/SQL Cop Version 2.3.0 (2019-09-28 21:09:46 +0200)
for Trivadis PL/SQL & SQL Coding Guidelines Version 3.3
Copyright 2010-2019 by Philipp Salvisberg (philipp.salvisberg@trivadis.com)
Trivadis AG (www.trivadis.com)

Trial/Preview version
- valid thru: 2020-03-31
- valid for versions less than: 3
- max. files: unlimited
- max. lines: 5000
- max. commands: 200
- max. bytes: 400000

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/C:/PGM/Dev/tvdcc/lib/guice.jar) t
o method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Parameters:
- path: H:\Projects\dbcc-internal-dev\qc_utility\QC_UTILITY_KRN.pkb
- filter: (sql|prc|fnc|pks|pkb|trg|vw|tps|tpb|tbp|plb|pls|rcv|spc|typ|aqt|aqp|ctx|dbl|tab|dim|snp|con|collt|seq|syn|grt|sp|spb|sps|p
ck)$
- timeout: 10
- complexity: 10
- output: ./tvdcc_report.html
- template: html.xsl
- excel: true
- html: true
- transonly: false
- cleanup: true
- check:
- skip:
- nosonar: true
- license:
- validator: com.trivadis.tvdcc.validators.TrivadisGuidelines3
- genmodel: false

It's not a problem per se, it's more in case it should be addressed by you.

Rgds,
Philippe

4 Answers
1

This happens when you use a JRE or JDK > 8. PL/SQL Cop works with JDK7 or JDK8 only. Please install a JDK8 and change the variable JAVA_HOME in the tvdcc.cmd file accordingly. Thank you.

0
Topic starter

If I remember well, I installed jdk-11.0.5 as it is a requirement of SonarQube 7.9:

The SonarQube Java analyzer is able to analyze any kind of Java source files regardless of the version of Java they comply to. However, SonarQube analysis requires version 8+ of the JVM and the SonarQube Server requires version 11+.
( https://docs.sonarqube.org/latest/requirements/requirements/ )

(+ sonar-plsql-cop-plugin-7.9.0.1.jar)

0

Yes, the newest SonarQube versions require JDK 11. That's fine. The PL/SQL SonarQube plugin works with JDK 11. However, behind the scenes a new OS process is started on the machine producing the report and PL/SQL Cop command line is called. The CLI does not work with JDK 11. If everything runs on the same machine then you have to install JDK8 and JDK11.

0
Topic starter

I just installed JDK8 and your sonar pluging is now working like a charm 😊 

Thanks a lot!

Philippe