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] Error while running PL/SQL Cop from SonarQube (validators.jar not found)

3 Posts
2 Users
1 Reactions
1,840 Views
0
Topic starter

Hello,

I have installed the PL/SQL Cop for SonarQube plugin as instructed on your dedicated page but I get the following error message:

INFO: PlSQL COP Sensor analyzing
INFO: Executing command: C:/pgm/dev/tvdcc/tvdcc.cmd path=C:\PGM\Dev\tvdcc output=C:\PGM\Dev\tvdcc\.scannerwork\tvdcc-result.xml filt
er="(sql|prc|fnc|pks|pkb|trg|vw|tps|tbp|plb|pls|rcv|spc|typ|aqt|aqp|ctx|dbl|tab|dim|snp|con|collt|seq|syn|grt|sp|spb|sps)$" timeout=
10 excel=false html=false genmodel=false complexity=0 cleanup=false check= skip= license= validator=com.trivadis.tvdcc.validators.Tr
ivadisGuidelines3
INFO:
INFO: Trivadis PL/SQL Cop Version 2.3.0 (2019-09-28 21:09:46 +0200)
INFO: for Trivadis PL/SQL & SQL Coding Guidelines Version 3.3
INFO: Copyright 2010-2019 by Philipp Salvisberg (philipp.salvisberg@trivadis.com)
INFO: Trivadis AG (www.trivadis.com)
INFO:
INFO: Class <com.trivadis.tvdcc.validators.TrivadisGuidelines3> not found. Please ensure class is in the classpath and a descendant
of PLSQLJavaValidator.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------

In the plugin for SQL Developer, there is a "plugin path" in the preferences but I can't find the equivalent in the sonar configuration for Trivadis PL/SQL Cop (I only see a Validator class option). I tried to put the validators.jar file in the plugin directory of SonarQube (together with the sonar-plsql-cop-plugin) but without success.

Where should the validators.jar file be put or how to configure its location?

Thanks for your help!
Philippe

Topic Tags
3 Answers
1

I assume this is related to https://www.salvis.com/blog/forum/plsql-cop/warning-illegal-reflective-access-raised-when-running-tvdcc/#post-92 - Please ensure that tvdcc.cmd is using a JRE/JDK 8.

0
Topic starter

Addendum:

Note that I get the same error when I launch tvdcc.cmd manually but only when I set the "validator" parameter:

C:\PGM\Dev\tvdcc>C:/pgm/dev/tvdcc/tvdcc.cmd path=C:\PGM\Dev\tvdcc output=C:\PGM\Dev\tvdcc\.scannerwork\tvdcc-result.xml filter="(sql
|prc|fnc|pks|pkb|trg|vw|tps|tbp|plb|pls|rcv|spc|typ|aqt|aqp|ctx|dbl|tab|dim|snp|con|collt|seq|syn|grt|sp|spb|sps)$" timeout=10 excel
=false html=false genmodel=false complexity=0 cleanup=false check= skip= license= validator=com.trivadis.tvdcc.validators.TrivadisGu
idelines3Plus

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)

Class <com.trivadis.tvdcc.validators.TrivadisGuidelines3Plus> not found. Please ensure class is in the classpath and a descendant of
 PLSQLJavaValidator.

If I leave the "validator" parameter empty then it works (with the default validator). The problem is that Sonar is passing explicitly the default value of this parameter (even if the field is left empty in the configuration).

 

This post was modified 5 years ago by filou97
0
Topic starter

Hello Philipp,

I just installed JDK8 and I confirm that the warnings are gone.

Thanks a lot for your swift reply!

Philippe