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

PL/SQL Cop Error

10 Posts
2 Users
0 Likes
4,103 Views
0
Topic starter

Hi There,

I have been evaluating the SQL Developer extension and that has been working well for me.

However I am now trying to evaluate the stand alone PL/SQL Cop command line utility on the same machine. I am seeing an error at run time as described below.

I apologize if this is a straight forward issue but I cannot find any documentation about it and I am a PL/SQL developer with no Java experience.

Many thanks for your help.

------------------------
-- CONFIGURATION INFO --
------------------------

TVDCC_HOME = C:\tools\tvdcc
JAVA_HOME = C:\Program Files\Java\jdk-11.0.4
Code Repo = C:\Users\alex\Documents\sonar_Target

Both the above JAVA_HOME and TVDCC_HOME directories are in the windows PATH variable.

tvdcc version 2.2.1

java --version
java 11.0.4 2019-07-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)

Windows Pro 10 Version 1903 OS Build 18362.356 ---------------
-- EXECUTION --
---------------

C:\tools\tvdcc>tvdcc path=C:\Users\alex\Documents\sonar_Target

Trivadis PL/SQL Cop Version 2.2.1 (2019-09-18 17:54:15 +0100)
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: 2019-09-30
- 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:/tools/tvdcc/lib/guice.jar) to 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: C:\Users\alexb\Documents\sonar_Target
- 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|pck)$
- 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

processing file 'pb_rti_cs.pkb'... 65 issues found.
processing file 'pk_rti_cs_config.sql'... no issues found.
processing file 'ps_rti_cs.pks'... 3 issues found.

Summary:
- Total files: 3
- Total bytes: 6894
- Total lines: 207
- Total comment lines: 11
- Total blank lines: 63
- Total net lines: 133
- Total commands: 4
- Total statements (PL/SQL): 36
- Max. cyclomatic complexity: 3
- Max. Halstead volume: 643.9532994813708
- Min. maintainability index (MI): 79.55130322408166
- Total issues: 68
- Total warnings: 68
- Total errors: 0
- Total processing time in seconds: 1.421

transforming tvdcc_report.xml into tvdcc_report.html... Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/MimeTypeParseException
at oracle.xml.xquery.runtime.sequences.Doc.createDocumentIterator(Doc.java:293)
at oracle.xml.xquery.runtime.sequences.Doc.createDocumentIterator(Doc.java:279)
at oracle.xml.xquery.xqjimpl.OXQCDataFactory.createItemFromDocument(OXQCDataFactory.java:821)
at oracle.xml.xquery.xqjimpl.OXQCDataFactory.createItemFromDocument(OXQCDataFactory.java:793)
at oracle.xml.xquery.xqjimpl.OXQCDataFactory.createItemFromDocument(OXQCDataFactory.java:126)
at com.trivadis.tvdcc.transform.HTMLTransformationStrategy.createIssueXml(HTMLTransformationStrategy.java:96)
at com.trivadis.tvdcc.transform.HTMLTransformationStrategy.transform(HTMLTransformationStrategy.java:241)
at com.trivadis.tvdcc.transform.CompositeTransformationStrategy.transform(CompositeTransformationStrategy.java:17)
at com.trivadis.tvdcc.process.SQLPLUSReader.processSerialResource(SQLPLUSReader.java:294)
at com.trivadis.tvdcc.CodeChecker.doCodeCheck(CodeChecker.java:574)
at com.trivadis.tvdcc.CodeChecker.mainFunction(CodeChecker.java:605)
at com.trivadis.tvdcc.CodeChecker.main(CodeChecker.java:625)
Caused by: java.lang.ClassNotFoundException: javax.activation.MimeTypeParseException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 12 more
C:\tools\tvdcc> ------------------------------------------------
-- XML REPORT HAS BEEN CREATED / HTML HAS NOT --
------------------------------------------------

C:\tools\tvdcc>dir
Volume in drive C is OS
Volume Serial Number is 18F8-2548

Directory of C:\tools\tvdcc

19/09/2019 12:17 <DIR> .
19/09/2019 12:17 <DIR> ..
19/09/2019 12:01 <DIR> eclipse
19/09/2019 12:18 <DIR> lib
18/09/2019 17:54 282 PLSQL-and-SQL-Coding-Guidelines.webloc
19/09/2019 12:19 <DIR> plugin
18/09/2019 17:54 458,435 ReadMe.pdf
19/09/2019 12:01 <DIR> sample
19/09/2019 12:14 521 tvdcc.cmd
18/09/2019 17:54 464,697 tvdcc.jar
18/09/2019 17:54 268 tvdcc.sh
19/09/2019 12:31 29,117 tvdcc_report.xml
6 File(s) 953,320 bytes
6 Dir(s) 350,807,879,680 bytes free

C:\tools\tvdcc>

 

10 Answers
0

Java 11 is not yet supported. Please use Java 8. Thank you.

0
Topic starter

Hi Philipp,

Thanks for that reply, it is much appreciated.

I have downgraded to Java 8 and now have the standalone PL/SQL Cop working successfully as well as the SQL Developer version of PL/SQL Cop. They are both working well.

However I am now trying to install the SonarQube Plugin and having some further problems.

When using the standalone Sonar Scanner it is working well, however when using the Jenkins scanner the html reports are correctly generated but the analysis is not reflected in the sonar UI.

I have been following these instructions: https://www.salvis.com/blog/plsql-cop-for-sonarqube/

PL SQL Cop Version 6.7.0.2
SonarQube Server Version 7.0

With Stand Alone Sonar Scanner 4.0.0.1744
-- Job Completes with Success message
-- 3 files found
-- 68 issues found
-- html report generated with 68 issues
-- xml report generated with 68 issues
-- SonarQube UI at localhost:9000 updated to reflect 68 issues at timestamp of execution, analysis data is displayed as expected

With Jenkins built in Sonar Scanner 4.1.0.1829
-- Job Completes with Success message
-- 3 files found
-- 68 issues found
-- html report generated with 68 issues
-- xml report generated with 68 isses
-- SonarQube UI shows updated timestamp of execution but code smells etc have dropped to zero, all analysis values are zero or null

I will prepare logs and examples for examination.

Many thanks for your assistance.

0
Topic starter

Correction: I meant to say that the XML (not HTML) reports are correctly generated from the jenkins scanner and the scanner report directory is created and populated, but Sonar UI is not updated.

0

Hi Alex,

Thank you for the feedback. Regarding Sonar Scanner 4.1. This is quite new and requires Java 11. I guess this might be the reason for the issues you have. If you have to use version 4.0 for the time being.

Best regards,

Philipp

 

0
Topic starter

Thanks for the reply Philipp. I have rolled the Jenkins scanner back to 4.0.0.1744 to match the working stand alone scanner however the issue is persisting. I've also tried 3.0.3.778 and that is the same.

With Stand Alone Sonar Scanner 4.0.0.1744
-- Job Completes with Success message
-- 3 files found
-- 68 issues found
-- html report generated with 68 issues
-- xml report generated with 68 issues
-- SonarQube UI at localhost:9000 updated to reflect 68 issues at timestamp of execution, analysis data is displayed as expected

With Jenkins built in Sonar Scanner 4.0.0.1744
-- Job Completes with Success message
-- 3 files found
-- 68 issues found
-- xml report generated with 68 isses
-- SonarQube UI at localhost:9000 shows updated timestamp of execution but code smells etc have dropped to zero, all analysis values are zero or null

The only difference I can see surrounding the uploading of the report is that the Jenkins scanner is supplying a project name argument and the stand alone scanner is not. In both cases the report is logged as having been successfully uploaded.

Stand Alone Scanner

17:43:24.537 DEBUG: Upload report
17:43:24.584 DEBUG: POST 200 http://localhost:9000/api/ce/submit?projectKey=API_DEV_PRJ | time=47ms
17:43:24.584 INFO: Analysis report uploaded in 47ms
17:43:24.599 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/API_DEV_PRJ

Jenkins Scanner
17:58:07.688 DEBUG: Upload report
17:58:07.731 DEBUG: POST 200 http://localhost:9000/api/ce/submit?projectKey=API_DEV_PRJ&projectName=API_DEV_PRJ | time=41ms
17:58:07.735 INFO: Analysis report uploaded in 47ms
17:58:07.737 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/API_DEV_PRJ

I don't believe that this can be the issue.

Full details and logs below, apologies for how long they are I just wanted to provide all of the information possible.

Thanks

Alex

 

----------------------------------------------------------------
-- PARAMETERS WHEN USING STAND ALONE SONAR SCANNER 4.0.0.1744 --
----------------------------------------------------------------

sonar-scanner.bat -X
-Dsonar.projectKey=API_DEV_PRJ
-Dsonar.sources=.
-Dsonar.host.url= http://localhost:9000
-Dsonar.login=

 

--------------------------------------------------
-- LOG FOR STAND ALONE SONAR SCANNER 4.0.0.1744 --
--------------------------------------------------


C:\Users\alex\Documents\sonar_Target>sonar-scanner.bat -X -Dsonar.projectKey=API_DEV_PRJ -Dsonar.sources=. -Dsonar.host.url= http://localhost:9000 -Dsonar.login=
17:43:15.287 INFO: Scanner configuration file: C:\sonar-scanner-4.0.0.1744\bin\..\conf\sonar-scanner.properties
17:43:15.287 INFO: Project root configuration file: NONE
17:43:15.334 INFO: SonarQube Scanner 4.0.0.1744
17:43:15.334 INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
17:43:15.334 INFO: Windows 10 10.0 amd64
17:43:15.443 DEBUG: keyStore is :
17:43:15.443 DEBUG: keyStore type is : pkcs12
17:43:15.443 DEBUG: keyStore provider is :
17:43:15.443 DEBUG: init keystore
17:43:15.443 DEBUG: init keymanager of type SunX509
17:43:15.568 DEBUG: Create: C:\Users\alex\.sonar\cache
17:43:15.584 INFO: User cache: C:\Users\alex\.sonar\cache
17:43:15.584 DEBUG: Create: C:\Users\alex\.sonar\cache\_tmp
17:43:15.584 DEBUG: Extract sonar-scanner-api-batch in temp...
17:43:15.584 DEBUG: Get bootstrap index...
17:43:15.584 DEBUG: Download: http://localhost:9000/batch/index
17:43:15.646 DEBUG: Get bootstrap completed
17:43:15.646 DEBUG: Create isolated classloader...
17:43:15.646 DEBUG: Start temp cleaning...
17:43:15.646 DEBUG: Temp cleaning done
17:43:15.646 DEBUG: Execution getVersion
17:43:15.662 INFO: SonarQube server 7.0.0
17:43:15.662 INFO: Default locale: "en_GB", source code encoding: "windows-1252" (analysis is platform dependent)
17:43:15.662 DEBUG: Work directory: C:\Users\alex\Documents\sonar_Target\.scannerwork
17:43:15.662 DEBUG: Execution execute
17:43:15.896 INFO: Publish mode
17:43:16.052 INFO: Load global settings
17:43:16.099 DEBUG: GET 200 http://localhost:9000/api/settings/values.protobuf | time=47ms
17:43:16.146 INFO: Load global settings (done) | time=94ms
17:43:16.146 INFO: Server id: AW1E4jRe1gpd01LPPkQI
17:43:16.162 INFO: User cache: C:\Users\alex\.sonar\cache
17:43:16.568 INFO: Load plugins index
17:43:16.584 DEBUG: GET 200 http://localhost:9000/api/plugins/installed | time=16ms
17:43:16.646 INFO: Load plugins index (done) | time=78ms
17:43:16.646 INFO: Load/download plugins
17:43:16.662 INFO: Load/download plugins (done) | time=16ms
17:43:16.771 DEBUG: Plugins:
17:43:16.771 DEBUG: * SonarC# 6.7.1.4347 (csharp)
17:43:16.771 DEBUG: * SonarPython 1.9.0.2010 (python)
17:43:16.771 DEBUG: * SonarJava 5.1.0.13090 (java)
17:43:16.771 DEBUG: * Flex 2.3 (flex)
17:43:16.771 DEBUG: * SonarQube :: Plugins :: SCM :: Git 1.3.0.869 (scmgit)
17:43:16.771 DEBUG: * SonarXML 1.4.3.1027 (xml)
17:43:16.771 DEBUG: * SonarPHP 2.12.1.3018 (php)
17:43:16.771 DEBUG: * SonarTS 1.5.0.2122 (typescript)
17:43:16.771 DEBUG: * SonarQube :: Plugins :: SCM :: SVN 1.6.0.860 (scmsvn)
17:43:16.771 DEBUG: * SonarJS 4.0.0.5862 (javascript)
17:43:16.771 DEBUG: * Trivadis PL/SQL Cop 6.7.0.2 (plsqlcop)
17:43:16.990 INFO: Define PlSql Cop PlugIn - Trivadis PL/SQL Cop
17:43:17.193 INFO: Define PlSql Cop PlugIn - Trivadis PL/SQL Cop
17:43:17.240 INFO: Process project properties
17:43:17.240 DEBUG: Process project properties (done) | time=0ms
17:43:17.271 INFO: Load project repositories
17:43:17.271 DEBUG: GET 200 http://localhost:9000/batch/project.protobuf?key=API_DEV_PRJ | time=0ms
17:43:17.334 INFO: Load project repositories (done) | time=63ms
17:43:17.474 DEBUG: Available languages:
17:43:17.474 DEBUG: * C# => "cs"
17:43:17.474 DEBUG: * Python => "py"
17:43:17.474 DEBUG: * Java => "java"
17:43:17.474 DEBUG: * Flex => "flex"
17:43:17.474 DEBUG: * XML => "xml"
17:43:17.474 DEBUG: * PHP => "php"
17:43:17.474 DEBUG: * TypeScript => "ts"
17:43:17.474 DEBUG: * JavaScript => "js"
17:43:17.474 DEBUG: * PL/SQL Cop => "plsqlcop"
17:43:17.490 INFO: Load quality profiles
17:43:17.505 DEBUG: GET 200 http://localhost:9000/api/qualityprofiles/search.protobuf?projectKey=API_DEV_PRJ | time=15ms
17:43:17.505 INFO: Load quality profiles (done) | time=15ms
17:43:17.521 INFO: Load active rules
17:43:17.584 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4mhx1gpd01LPPkrM&p=1&ps=500 | time=63ms
17:43:17.709 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4muZ1gpd01LPPkyw&p=1&ps=500 | time=79ms
17:43:17.756 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4m4M1gpd01LPPk4Z&p=1&ps=500 | time=32ms
17:43:17.771 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4m031gpd01LPPk3a&p=1&ps=500 | time=15ms
17:43:17.802 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4m_-1gpd01LPPk-X&p=1&ps=500 | time=31ms
17:43:17.834 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4nDr1gpd01LPPlA1&p=1&ps=500 | time=16ms
17:43:17.865 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4nMj1gpd01LPPlD1&p=1&ps=500 | time=16ms
17:43:17.896 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1FBnlV4haImE1JkpSH&p=1&ps=500 | time=31ms
17:43:17.927 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4nQG1gpd01LPPlFB&p=1&ps=500 | time=15ms
17:43:17.943 INFO: Load active rules (done) | time=422ms
17:43:17.959 INFO: Load metrics repository
17:43:17.959 DEBUG: GET 200 http://localhost:9000/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=0ms
17:43:17.990 INFO: Load metrics repository (done) | time=31ms
17:43:18.006 WARN: SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
17:43:18.021 INFO: Project key: API_DEV_PRJ
17:43:18.021 DEBUG: Start recursive analysis of project modules
17:43:18.021 INFO: ------------- Scan API_DEV_PRJ
17:43:18.115 INFO: Define PlSql Cop PlugIn - Trivadis PL/SQL Cop
17:43:18.115 INFO: Load server rules
17:43:18.224 DEBUG: GET 200 http://localhost:9000/api/rules/list.protobuf | time=109ms
17:43:18.224 INFO: Load server rules (done) | time=109ms
17:43:18.255 INFO: Base dir: C:\Users\alex\Documents\sonar_Target
17:43:18.255 INFO: Working dir: C:\Users\alex\Documents\sonar_Target\.scannerwork
17:43:18.255 INFO: Source paths: .
17:43:18.255 INFO: Source encoding: windows-1252, default locale: en_GB
17:43:18.349 DEBUG: add fileSuffix=sql
17:43:18.349 DEBUG: add fileSuffix=prc
17:43:18.349 DEBUG: add fileSuffix=fnc
17:43:18.349 DEBUG: add fileSuffix=pks
17:43:18.349 DEBUG: add fileSuffix=pkb
17:43:18.349 DEBUG: add fileSuffix=trg
17:43:18.349 DEBUG: add fileSuffix=vw
17:43:18.349 DEBUG: add fileSuffix=tps
17:43:18.349 DEBUG: add fileSuffix=tbp
17:43:18.349 DEBUG: add fileSuffix=plb
17:43:18.349 DEBUG: add fileSuffix=pls
17:43:18.349 DEBUG: add fileSuffix=rcv
17:43:18.349 DEBUG: add fileSuffix=spc
17:43:18.349 DEBUG: add fileSuffix=typ
17:43:18.349 DEBUG: add fileSuffix=aqt
17:43:18.349 DEBUG: add fileSuffix=aqp
17:43:18.349 DEBUG: add fileSuffix=ctx
17:43:18.349 DEBUG: add fileSuffix=dbl
17:43:18.349 DEBUG: add fileSuffix=tab
17:43:18.349 DEBUG: add fileSuffix=dim
17:43:18.349 DEBUG: add fileSuffix=snp
17:43:18.349 DEBUG: add fileSuffix=con
17:43:18.349 DEBUG: add fileSuffix=collt
17:43:18.349 DEBUG: add fileSuffix=seq
17:43:18.349 DEBUG: add fileSuffix=syn
17:43:18.349 DEBUG: add fileSuffix=grt
17:43:18.349 DEBUG: add fileSuffix=sp
17:43:18.349 DEBUG: add fileSuffix=spb
17:43:18.349 DEBUG: add fileSuffix=sps
17:43:18.349 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
17:43:18.349 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
17:43:18.349 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
17:43:18.349 DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : **/*.as
17:43:18.349 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
17:43:18.349 DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
17:43:18.349 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
17:43:18.349 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
17:43:18.349 DEBUG: Declared extensions of language PL/SQL Cop were converted to sonar.lang.patterns.plsqlcop : **/*.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
17:43:18.349 DEBUG: Initializers :
17:43:18.365 INFO: Index files
17:43:18.381 DEBUG: 'ps_rti_cs.pks' indexed with language 'plsqlcop'
17:43:18.381 DEBUG: 'pb_rti_cs.pkb' indexed with language 'plsqlcop'
17:43:18.381 DEBUG: 'pk_rti_cs_config.sql' indexed with language 'plsqlcop'
17:43:18.381 DEBUG: 'alex.txt' indexed with language 'null'
17:43:18.381 INFO: 4 files indexed
17:43:18.381 INFO: Quality profile for plsqlcop: Trivadis PL/SQL Cop
17:43:19.162 DEBUG: PlSqlCopConfiguration init.
17:43:19.162 INFO: PlSQL COP Sensor initializing
17:43:19.177 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
17:43:19.177 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
17:43:19.177 DEBUG: 'C#' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'C# Properties' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
17:43:19.177 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'PylintSensor' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'Flex' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'XML Sensor' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'PHP sensor' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'SonarTS' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'SonarTS Coverage' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'SonarJS' skipped because there is no related file in current project
17:43:19.177 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
17:43:19.193 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
17:43:19.193 DEBUG: 'C#' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'C# Properties' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
17:43:19.193 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'PylintSensor' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'Flex' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'XML Sensor' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'PHP sensor' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'SonarTS' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'SonarTS Coverage' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'SonarJS' skipped because there is no related file in current project
17:43:19.193 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
17:43:19.193 DEBUG: Sensors : SonarJavaXmlFileSensor -> Process PlSQLCop Report - Mesure and Issues -> Zero Coverage Sensor -> CPD Block Indexer
17:43:19.193 INFO: Sensor SonarJavaXmlFileSensor [java]
17:43:19.193 INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
17:43:19.193 INFO: Sensor Process PlSQLCop Report - Mesure and Issues [plsqlcop]
17:43:19.193 DEBUG: Begin analysis
17:43:19.193 INFO: PlSQL COP Sensor analyzing
17:43:19.193 DEBUG:
* begin execute
17:43:19.193 DEBUG: fixed Path for C:/tools/tvdcc/tvdcc.cmd is C:/tools/tvdcc/tvdcc.cmd
17:43:19.193 DEBUG: PL/SQL Cop executable (C:/tools/tvdcc/tvdcc.cmd) found.
17:43:19.193 DEBUG: fixed Path for is
17:43:19.193 INFO: Executing command: C:/tools/tvdcc/tvdcc.cmd path=C:\Users\alex\Documents\sonar_Target output=C:\Users\alex\Documents\sonar_Target\.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.TrivadisGuidelines3
17:43:19.631 INFO:
17:43:19.631 INFO: Trivadis PL/SQL Cop Version 2.2.1 (2019-09-18 17:54:15 +0100)
17:43:19.631 INFO: for Trivadis PL/SQL & SQL Coding Guidelines Version 3.3
17:43:19.631 INFO: Copyright 2010-2019 by Philipp Salvisberg (philipp.salvisberg@trivadis.com)
17:43:19.631 INFO: Trivadis AG (www.trivadis.com)
17:43:19.631 INFO:
17:43:19.834 INFO: Trial/Preview version
17:43:19.834 INFO: - valid thru: 2019-09-30
17:43:19.834 INFO: - valid for versions less than: 3
17:43:19.834 INFO: - max. files: unlimited
17:43:19.834 INFO: - max. lines: 5000
17:43:19.834 INFO: - max. commands: 200
17:43:19.834 INFO: - max. bytes: 400000
17:43:19.834 INFO:
17:43:21.896 INFO: Parameters:
17:43:21.896 INFO: - path: C:\Users\alex\Documents\sonar_Target
17:43:21.896 INFO: - 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)$
17:43:21.896 INFO: - timeout: 10
17:43:21.896 INFO: - complexity: 0
17:43:21.896 INFO: - output: C:\Users\alex\Documents\sonar_Target\.scannerwork\tvdcc-result.html
17:43:21.896 INFO: - template: html.xsl
17:43:21.896 INFO: - excel: false
17:43:21.896 INFO: - html: false
17:43:21.896 INFO: - transonly: false
17:43:21.896 INFO: - cleanup: false
17:43:21.896 INFO: - check:
17:43:21.896 INFO: - skip:
17:43:21.896 INFO: - nosonar: true
17:43:21.896 INFO: - license:
17:43:21.896 INFO: - validator: com.trivadis.tvdcc.validators.TrivadisGuidelines3
17:43:21.896 INFO: - genmodel: false
17:43:21.912 INFO:
17:43:23.912 INFO: processing file 'pb_rti_cs.pkb'... 65 issues found.
17:43:24.006 INFO: processing file 'pk_rti_cs_config.sql'... no issues found.
17:43:24.052 INFO: processing file 'ps_rti_cs.pks'... 3 issues found.
17:43:24.052 INFO:
17:43:24.052 INFO: Summary:
17:43:24.052 INFO: - Total files: 3
17:43:24.052 INFO: - Total bytes: 6894
17:43:24.052 INFO: - Total lines: 207
17:43:24.052 INFO: - Total comment lines: 11
17:43:24.052 INFO: - Total blank lines: 63
17:43:24.052 INFO: - Total net lines: 133
17:43:24.052 INFO: - Total commands: 4
17:43:24.052 INFO: - Total statements (PL/SQL): 36
17:43:24.052 INFO: - Max. cyclomatic complexity: 3
17:43:24.052 INFO: - Max. Halstead volume: 643.9532994813708
17:43:24.052 INFO: - Min. maintainability index (MI): 79.55130322408166
17:43:24.052 INFO: - Total issues: 68
17:43:24.052 INFO: - Total warnings: 68
17:43:24.052 INFO: - Total errors: 0
17:43:24.052 INFO: - Total processing time in seconds: 2.14
17:43:24.177 DEBUG: * exitCode=0
17:43:24.177 DEBUG:
* end execute
17:43:24.177 DEBUG: Parsing PL/SQL Cop Report: C:\Users\alex\Documents\sonar_Target\.scannerwork\tvdcc-result.xml
17:43:24.209 DEBUG: Loading PL/SQL Cop Report resources and issues.
17:43:24.224 DEBUG: 'pb_rti_cs.pkb' generated metadata with charset 'windows-1252'
17:43:24.349 DEBUG: #### saveResourceMetrics - resource=Resource{name='C:/Users/alex/Documents/sonar_Target/pb_rti_cs.pkb', lines=163, units=3, issues=65}####
17:43:24.365 WARN: Metric 'lines' is an internal metric computed by SonarQube. Provided value is ignored.
17:43:24.365 DEBUG: #### saveResourceMetrics - resource=Resource{name='C:/Users/alex/Documents/sonar_Target/pk_rti_cs_config.sql', lines=9, units=0, issues=0}####
17:43:24.365 DEBUG: 'ps_rti_cs.pks' generated metadata with charset 'windows-1252'
17:43:24.381 DEBUG: #### saveResourceMetrics - resource=Resource{name='C:/Users/alex/Documents/sonar_Target/ps_rti_cs.pks', lines=35, units=0, issues=3}####
17:43:24.381 DEBUG: Loading PL/SQL Cop Report summary.
17:43:24.381 DEBUG: summary=Summary{maxCyclomaticComplexity=3.0, maxHalsteadVolume=643.9532994813708, minMI=79.55130322408166, totalBlankLines=63, totalBytes=6894, totalCommands=4, totalCommentLines=11, totalEnd=2019-09-24T17:43:24, totalErrors=0, totalFiles=3, totalIssues=68, totalLines=207, totalNetLines=133, totalSeconds=2.14, totalStart=2019-09-24T17:43:21, totalStatements=36, totalWarnings=68}
17:43:24.381 DEBUG: Loading PL/SQL Cop Report parameters.
17:43:24.381 DEBUG: Parameter path will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: Parameter complexity will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: Parameter output will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: Parameter template will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: Parameter transonly will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: Parameter cleanup will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: Parameter check will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: Parameter skip will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: Parameter nosonar will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: Parameter license will not be displayed in SonarQube widget UI.
17:43:24.381 DEBUG: parameters=Parameters{, excel='false', 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)$', html='false', timeout='10', validator='com.trivadis.tvdcc.validators.TrivadisGuidelines3'}
17:43:24.381 DEBUG: End analysis
17:43:24.381 INFO: Sensor Process PlSQLCop Report - Mesure and Issues [plsqlcop] (done) | time=5188ms
17:43:24.381 INFO: Sensor Zero Coverage Sensor
17:43:24.396 INFO: Sensor Zero Coverage Sensor (done) | time=15ms
17:43:24.396 INFO: Sensor CPD Block Indexer
17:43:24.396 DEBUG: org.sonar.scanner.cpd.deprecated.DefaultCpdBlockIndexer is used for plsqlcop
17:43:24.396 DEBUG: No CpdMapping for language plsqlcop
17:43:24.396 INFO: Sensor CPD Block Indexer (done) | time=0ms
17:43:24.396 INFO: No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
17:43:24.396 INFO: Calculating CPD for 0 files
17:43:24.396 INFO: CPD calculation finished
17:43:24.459 DEBUG: 'pk_rti_cs_config.sql' generated metadata with charset 'windows-1252'
17:43:24.505 INFO: Analysis report generated in 109ms, dir size=45 KB
17:43:24.537 INFO: Analysis reports compressed in 32ms, zip size=12 KB
17:43:24.537 INFO: Analysis report generated in C:\Users\alex\Documents\sonar_Target\.scannerwork\scanner-report
17:43:24.537 DEBUG: Upload report
17:43:24.584 DEBUG: POST 200 http://localhost:9000/api/ce/submit?projectKey=API_DEV_PRJ | time=47ms
17:43:24.584 INFO: Analysis report uploaded in 47ms
17:43:24.599 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/API_DEV_PRJ
17:43:24.599 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
17:43:24.599 INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AW1kJ_oo2pohsWfZUuXd
17:43:24.599 DEBUG: Report metadata written to C:\Users\alex\Documents\sonar_Target\.scannerwork\report-task.txt
17:43:24.599 DEBUG: Post-jobs :
17:43:24.599 INFO: Task total time: 7.812 s
17:43:24.787 INFO: ------------------------------------------------------------------------
17:43:24.787 INFO: EXECUTION SUCCESS
17:43:24.787 INFO: ------------------------------------------------------------------------
17:43:24.787 INFO: Total time: 9.531s
17:43:24.818 INFO: Final Memory: 7M/68M
17:43:24.818 INFO: ------------------------------------------------------------------------

Screenshot of SonarQube UI After Stand Alone Scanner

Timestamp is updated and analysis issues correctly displayed

[img] [/img]

 

--------------------------------------------
-- PARAMETERS USING JENKINS SONAR SCANNER --
--------------------------------------------

sonar.projectKey=API_DEV_PRJ
sonar.projectName=API_DEV_PRJ
sonar.sources=.
sonar.language=plsqlcop

host (localhost:9000) and login key (secret text) are configured in the jenkins global config

 

----------------------------------------------
-- LOG FOR JENKINS SONAR SCANNER 4.0.0.1744 --
----------------------------------------------

Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\Validate Code
Unpacking https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/4.0.0.1744/sonar-scanner-cli-4.0.0.1744.zip to C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\Jenkins_Built_In_Scanner on Jenkins
[Validate Code] $ "C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\Jenkins_Built_In_Scanner\bin\sonar-scanner.bat" -X -Dsonar.host.url= http://localhost:9000 ***** -Dsonar.language=plsqlcop -Dsonar.projectName=API_DEV_PRJ -Dsonar.projectKey=API_DEV_PRJ -Dsonar.sources=. "-Dsonar.projectBaseDir=C:\Program Files (x86)\Jenkins\workspace\Validate Code"
17:57:59.287 INFO: Scanner configuration file: C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\Jenkins_Built_In_Scanner\bin\..\conf\sonar-scanner.properties
17:57:59.302 INFO: Project root configuration file: NONE
17:57:59.318 INFO: SonarQube Scanner 4.0.0.1744
17:57:59.318 INFO: Java 1.8.0_221 Oracle Corporation (64-bit)
17:57:59.318 INFO: Windows 10 10.0 amd64
17:57:59.490 DEBUG: keyStore is :
17:57:59.490 DEBUG: keyStore type is : jks
17:57:59.490 DEBUG: keyStore provider is :
17:57:59.490 DEBUG: init keystore
17:57:59.490 DEBUG: init keymanager of type SunX509
17:57:59.673 DEBUG: Create: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
17:57:59.674 INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
17:57:59.674 DEBUG: Create: C:\WINDOWS\system32\config\systemprofile\.sonar\cache\_tmp
17:57:59.676 DEBUG: Extract sonar-scanner-api-batch in temp...
17:57:59.681 DEBUG: Get bootstrap index...
17:57:59.682 DEBUG: Download: http://localhost:9000/batch/index
17:57:59.745 DEBUG: Get bootstrap completed
17:57:59.752 DEBUG: Create isolated classloader...
17:57:59.759 DEBUG: Start temp cleaning...
17:57:59.765 DEBUG: Temp cleaning done
17:57:59.765 DEBUG: Execution getVersion
17:57:59.768 INFO: SonarQube server 7.0.0
17:57:59.768 INFO: Default locale: "en_GB", source code encoding: "windows-1252" (analysis is platform dependent)
17:57:59.769 DEBUG: Work directory: C:\Program Files (x86)\Jenkins\workspace\Validate Code\.scannerwork
17:57:59.770 DEBUG: Execution execute
17:57:59.966 INFO: Publish mode
17:58:00.068 INFO: Load global settings
17:58:00.115 DEBUG: GET 200 http://localhost:9000/api/settings/values.protobuf | time=31ms
17:58:00.130 INFO: Load global settings (done) | time=62ms
17:58:00.130 INFO: Server id: AW1E4jRe1gpd01LPPkQI
17:58:00.146 INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
17:58:00.521 INFO: Load plugins index
17:58:00.553 DEBUG: GET 200 http://localhost:9000/api/plugins/installed | time=32ms
17:58:00.615 INFO: Load plugins index (done) | time=94ms
17:58:00.615 INFO: Load/download plugins
17:58:00.630 INFO: Load/download plugins (done) | time=15ms
17:58:00.662 DEBUG: Plugins:
17:58:00.662 DEBUG: * SonarC# 6.7.1.4347 (csharp)
17:58:00.662 DEBUG: * SonarPython 1.9.0.2010 (python)
17:58:00.662 DEBUG: * SonarJava 5.1.0.13090 (java)
17:58:00.662 DEBUG: * Flex 2.3 (flex)
17:58:00.662 DEBUG: * SonarQube :: Plugins :: SCM :: Git 1.3.0.869 (scmgit)
17:58:00.662 DEBUG: * SonarXML 1.4.3.1027 (xml)
17:58:00.662 DEBUG: * SonarPHP 2.12.1.3018 (php)
17:58:00.677 DEBUG: * SonarTS 1.5.0.2122 (typescript)
17:58:00.677 DEBUG: * SonarQube :: Plugins :: SCM :: SVN 1.6.0.860 (scmsvn)
17:58:00.677 DEBUG: * SonarJS 4.0.0.5862 (javascript)
17:58:00.677 DEBUG: * Trivadis PL/SQL Cop 6.7.0.2 (plsqlcop)
17:58:00.881 INFO: Define PlSql Cop PlugIn - Trivadis PL/SQL Cop
17:58:01.018 INFO: Define PlSql Cop PlugIn - Trivadis PL/SQL Cop
17:58:01.061 INFO: Process project properties
17:58:01.068 DEBUG: Process project properties (done) | time=7ms
17:58:01.098 INFO: Load project repositories
17:58:01.112 DEBUG: GET 200 http://localhost:9000/batch/project.protobuf?key=API_DEV_PRJ | time=13ms
17:58:01.167 INFO: Load project repositories (done) | time=68ms
17:58:01.317 DEBUG: Available languages:
17:58:01.317 DEBUG: * C# => "cs"
17:58:01.317 DEBUG: * Python => "py"
17:58:01.318 DEBUG: * Java => "java"
17:58:01.318 DEBUG: * Flex => "flex"
17:58:01.318 DEBUG: * XML => "xml"
17:58:01.318 DEBUG: * PHP => "php"
17:58:01.318 DEBUG: * TypeScript => "ts"
17:58:01.318 DEBUG: * JavaScript => "js"
17:58:01.319 DEBUG: * PL/SQL Cop => "plsqlcop"
17:58:01.338 INFO: Load quality profiles
17:58:01.367 DEBUG: GET 200 http://localhost:9000/api/qualityprofiles/search.protobuf?projectKey=API_DEV_PRJ | time=28ms
17:58:01.374 INFO: Load quality profiles (done) | time=36ms
17:58:01.385 INFO: Load active rules
17:58:01.464 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4mhx1gpd01LPPkrM&p=1&ps=500 | time=79ms
17:58:01.568 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4muZ1gpd01LPPkyw&p=1&ps=500 | time=77ms
17:58:01.609 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4m4M1gpd01LPPk4Z&p=1&ps=500 | time=18ms
17:58:01.624 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4m031gpd01LPPk3a&p=1&ps=500 | time=10ms
17:58:01.662 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4m_-1gpd01LPPk-X&p=1&ps=500 | time=37ms
17:58:01.692 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4nDr1gpd01LPPlA1&p=1&ps=500 | time=25ms
17:58:01.710 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4nMj1gpd01LPPlD1&p=1&ps=500 | time=14ms
17:58:01.736 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1FBnlV4haImE1JkpSH&p=1&ps=500 | time=25ms
17:58:01.761 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AW1E4nQG1gpd01LPPlFB&p=1&ps=500 | time=20ms
17:58:01.774 INFO: Load active rules (done) | time=390ms
17:58:01.776 INFO: Load metrics repository
17:58:01.785 DEBUG: GET 200 http://localhost:9000/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=8ms
17:58:01.797 INFO: Load metrics repository (done) | time=21ms
17:58:01.822 WARN: SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
17:58:01.827 INFO: Project key: API_DEV_PRJ
17:58:01.827 DEBUG: Start recursive analysis of project modules
17:58:01.828 INFO: ------------- Scan API_DEV_PRJ
17:58:01.918 INFO: Define PlSql Cop PlugIn - Trivadis PL/SQL Cop
17:58:01.924 INFO: Load server rules
17:58:02.008 DEBUG: GET 200 http://localhost:9000/api/rules/list.protobuf | time=84ms
17:58:02.008 INFO: Load server rules (done) | time=85ms
17:58:02.050 INFO: Base dir: C:\Program Files (x86)\Jenkins\workspace\Validate Code
17:58:02.050 INFO: Working dir: C:\Program Files (x86)\Jenkins\workspace\Validate Code\.scannerwork
17:58:02.051 INFO: Source paths: .
17:58:02.051 INFO: Source encoding: windows-1252, default locale: en_GB
17:58:02.138 DEBUG: add fileSuffix=sql
17:58:02.138 DEBUG: add fileSuffix=prc
17:58:02.138 DEBUG: add fileSuffix=fnc
17:58:02.138 DEBUG: add fileSuffix=pks
17:58:02.138 DEBUG: add fileSuffix=pkb
17:58:02.138 DEBUG: add fileSuffix=trg
17:58:02.138 DEBUG: add fileSuffix=vw
17:58:02.139 DEBUG: add fileSuffix=tps
17:58:02.139 DEBUG: add fileSuffix=tbp
17:58:02.139 DEBUG: add fileSuffix=plb
17:58:02.139 DEBUG: add fileSuffix=pls
17:58:02.139 DEBUG: add fileSuffix=rcv
17:58:02.139 DEBUG: add fileSuffix=spc
17:58:02.139 DEBUG: add fileSuffix=typ
17:58:02.139 DEBUG: add fileSuffix=aqt
17:58:02.139 DEBUG: add fileSuffix=aqp
17:58:02.139 DEBUG: add fileSuffix=ctx
17:58:02.139 DEBUG: add fileSuffix=dbl
17:58:02.139 DEBUG: add fileSuffix=tab
17:58:02.139 DEBUG: add fileSuffix=dim
17:58:02.139 DEBUG: add fileSuffix=snp
17:58:02.139 DEBUG: add fileSuffix=con
17:58:02.139 DEBUG: add fileSuffix=collt
17:58:02.139 DEBUG: add fileSuffix=seq
17:58:02.140 DEBUG: add fileSuffix=syn
17:58:02.140 DEBUG: add fileSuffix=grt
17:58:02.140 DEBUG: add fileSuffix=sp
17:58:02.140 DEBUG: add fileSuffix=spb
17:58:02.140 DEBUG: add fileSuffix=sps
17:58:02.142 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
17:58:02.142 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
17:58:02.142 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
17:58:02.142 DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : **/*.as
17:58:02.142 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
17:58:02.142 DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
17:58:02.143 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
17:58:02.143 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
17:58:02.144 DEBUG: Declared extensions of language PL/SQL Cop were converted to sonar.lang.patterns.plsqlcop : **/*.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
17:58:02.144 INFO: Language is forced to plsqlcop
17:58:02.151 DEBUG: Initializers :
17:58:02.152 INFO: Index files
17:58:02.164 DEBUG: 'pb_rti_cs.pkb' indexed with language 'plsqlcop'
17:58:02.165 DEBUG: 'ps_rti_cs.pks' indexed with language 'plsqlcop'
17:58:02.165 DEBUG: 'pk_rti_cs_config.sql' indexed with language 'plsqlcop'
17:58:02.165 INFO: 3 files indexed
17:58:02.166 INFO: Quality profile for plsqlcop: Trivadis PL/SQL Cop
17:58:02.861 DEBUG: PlSqlCopConfiguration init.
17:58:02.861 INFO: PlSQL COP Sensor initializing
17:58:02.865 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
17:58:02.865 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
17:58:02.871 DEBUG: 'C#' skipped because there is no related file in current project
17:58:02.871 DEBUG: 'C# Properties' skipped because there is no related file in current project
17:58:02.872 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
17:58:02.872 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
17:58:02.872 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
17:58:02.873 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
17:58:02.873 DEBUG: 'PylintSensor' skipped because there is no related file in current project
17:58:02.873 DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
17:58:02.873 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
17:58:02.873 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
17:58:02.874 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
17:58:02.874 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
17:58:02.874 DEBUG: 'Flex' skipped because there is no related file in current project
17:58:02.874 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
17:58:02.874 DEBUG: 'XML Sensor' skipped because there is no related file in current project
17:58:02.874 DEBUG: 'PHP sensor' skipped because there is no related file in current project
17:58:02.874 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
17:58:02.875 DEBUG: 'SonarTS' skipped because there is no related file in current project
17:58:02.875 DEBUG: 'SonarTS Coverage' skipped because there is no related file in current project
17:58:02.875 DEBUG: 'SonarJS' skipped because there is no related file in current project
17:58:02.875 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
17:58:02.877 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
17:58:02.877 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
17:58:02.877 DEBUG: 'C#' skipped because there is no related file in current project
17:58:02.877 DEBUG: 'C# Properties' skipped because there is no related file in current project
17:58:02.878 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
17:58:02.878 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
17:58:02.878 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
17:58:02.878 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
17:58:02.878 DEBUG: 'PylintSensor' skipped because there is no related file in current project
17:58:02.878 DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
17:58:02.878 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
17:58:02.879 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
17:58:02.879 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
17:58:02.879 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
17:58:02.879 DEBUG: 'Flex' skipped because there is no related file in current project
17:58:02.879 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
17:58:02.879 DEBUG: 'XML Sensor' skipped because there is no related file in current project
17:58:02.879 DEBUG: 'PHP sensor' skipped because there is no related file in current project
17:58:02.879 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
17:58:02.879 DEBUG: 'SonarTS' skipped because there is no related file in current project
17:58:02.880 DEBUG: 'SonarTS Coverage' skipped because there is no related file in current project
17:58:02.880 DEBUG: 'SonarJS' skipped because there is no related file in current project
17:58:02.880 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
17:58:02.883 DEBUG: Sensors : SonarJavaXmlFileSensor -> Process PlSQLCop Report - Mesure and Issues -> Zero Coverage Sensor -> CPD Block Indexer
17:58:02.884 INFO: Sensor SonarJavaXmlFileSensor [java]
17:58:02.884 INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
17:58:02.884 INFO: Sensor Process PlSQLCop Report - Mesure and Issues [plsqlcop]
17:58:02.884 DEBUG: Begin analysis
17:58:02.885 INFO: PlSQL COP Sensor analyzing
17:58:02.885 DEBUG:
* begin execute
17:58:02.886 DEBUG: fixed Path for C:/tools/tvdcc/tvdcc.cmd is C:/tools/tvdcc/tvdcc.cmd
17:58:02.886 DEBUG: PL/SQL Cop executable (C:/tools/tvdcc/tvdcc.cmd) found.
17:58:02.887 DEBUG: fixed Path for is
17:58:02.888 INFO: Executing command: C:/tools/tvdcc/tvdcc.cmd path=C:\Program Files (x86)\Jenkins\workspace\Validate Code output=C:\Program Files (x86)\Jenkins\workspace\Validate Code\.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.TrivadisGuidelines3
17:58:03.164 INFO:
17:58:03.164 INFO: Trivadis PL/SQL Cop Version 2.2.1 (2019-09-18 17:54:15 +0100)
17:58:03.164 INFO: for Trivadis PL/SQL & SQL Coding Guidelines Version 3.3
17:58:03.164 INFO: Copyright 2010-2019 by Philipp Salvisberg (philipp.salvisberg@trivadis.com)
17:58:03.164 INFO: Trivadis AG (www.trivadis.com)
17:58:03.164 INFO:
17:58:03.357 INFO: Trial/Preview version
17:58:03.357 INFO: - valid thru: 2019-09-30
17:58:03.357 INFO: - valid for versions less than: 3
17:58:03.357 INFO: - max. files: unlimited
17:58:03.357 INFO: - max. lines: 5000
17:58:03.357 INFO: - max. commands: 200
17:58:03.357 INFO: - max. bytes: 400000
17:58:03.357 INFO:
17:58:05.272 INFO: Parameters:
17:58:05.273 INFO: - path: C:\Program Files (x86)\Jenkins\workspace\Validate Code
17:58:05.273 INFO: - 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)$
17:58:05.273 INFO: - timeout: 10
17:58:05.273 INFO: - complexity: 0
17:58:05.273 INFO: - output: C:\Program Files (x86)\Jenkins\workspace\Validate Code\.scannerwork\tvdcc-result.html
17:58:05.273 INFO: - template: html.xsl
17:58:05.273 INFO: - excel: false
17:58:05.273 INFO: - html: false
17:58:05.273 INFO: - transonly: false
17:58:05.273 INFO: - cleanup: false
17:58:05.273 INFO: - check:
17:58:05.273 INFO: - skip:
17:58:05.273 INFO: - nosonar: true
17:58:05.274 INFO: - license:
17:58:05.274 INFO: - validator: com.trivadis.tvdcc.validators.TrivadisGuidelines3
17:58:05.274 INFO: - genmodel: false
17:58:05.284 INFO:
17:58:07.284 INFO: processing file 'pb_rti_cs.pkb'... 65 issues found.
17:58:07.373 INFO: processing file 'pk_rti_cs_config.sql'... no issues found.
17:58:07.404 INFO: processing file 'ps_rti_cs.pks'... 3 issues found.
17:58:07.408 INFO:
17:58:07.408 INFO: Summary:
17:58:07.408 INFO: - Total files: 3
17:58:07.408 INFO: - Total bytes: 6894
17:58:07.409 INFO: - Total lines: 207
17:58:07.409 INFO: - Total comment lines: 11
17:58:07.409 INFO: - Total blank lines: 63
17:58:07.409 INFO: - Total net lines: 133
17:58:07.409 INFO: - Total commands: 4
17:58:07.409 INFO: - Total statements (PL/SQL): 36
17:58:07.409 INFO: - Max. cyclomatic complexity: 3
17:58:07.409 INFO: - Max. Halstead volume: 643.9532994813708
17:58:07.409 INFO: - Min. maintainability index (MI): 79.55130322408166
17:58:07.409 INFO: - Total issues: 68
17:58:07.409 INFO: - Total warnings: 68
17:58:07.409 INFO: - Total errors: 0
17:58:07.409 INFO: - Total processing time in seconds: 2.126
17:58:07.476 DEBUG: * exitCode=0
17:58:07.476 DEBUG:
* end execute
17:58:07.477 DEBUG: Parsing PL/SQL Cop Report: C:\Program Files (x86)\Jenkins\workspace\Validate Code\.scannerwork\tvdcc-result.xml
17:58:07.507 DEBUG: Loading PL/SQL Cop Report resources and issues.
17:58:07.507 WARN: File C:/Program%20Files%20(x86)/Jenkins/workspace/Validate%20Code/pb_rti_cs.pkb not found, skipped.
17:58:07.507 WARN: File C:/Program%20Files%20(x86)/Jenkins/workspace/Validate%20Code/pk_rti_cs_config.sql not found, skipped.
17:58:07.507 WARN: File C:/Program%20Files%20(x86)/Jenkins/workspace/Validate%20Code/ps_rti_cs.pks not found, skipped.
17:58:07.507 DEBUG: Loading PL/SQL Cop Report summary.
17:58:07.521 DEBUG: summary=Summary{maxCyclomaticComplexity=3.0, maxHalsteadVolume=643.9532994813708, minMI=79.55130322408166, totalBlankLines=63, totalBytes=6894, totalCommands=4, totalCommentLines=11, totalEnd=2019-09-24T17:58:07, totalErrors=0, totalFiles=3, totalIssues=68, totalLines=207, totalNetLines=133, totalSeconds=2.126, totalStart=2019-09-24T17:58:05, totalStatements=36, totalWarnings=68}
17:58:07.521 DEBUG: Loading PL/SQL Cop Report parameters.
17:58:07.521 DEBUG: Parameter path will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: Parameter complexity will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: Parameter output will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: Parameter template will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: Parameter transonly will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: Parameter cleanup will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: Parameter check will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: Parameter skip will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: Parameter nosonar will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: Parameter license will not be displayed in SonarQube widget UI.
17:58:07.521 DEBUG: parameters=Parameters{, excel='false', 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)$', html='false', timeout='10', validator='com.trivadis.tvdcc.validators.TrivadisGuidelines3'}
17:58:07.521 DEBUG: *** End analysis
17:58:07.521 INFO: Sensor Process PlSQLCop Report - Mesure and Issues [plsqlcop] (done) | time=4637ms
17:58:07.521 INFO: Sensor Zero Coverage Sensor
17:58:07.521 INFO: Sensor Zero Coverage Sensor (done) | time=0ms
17:58:07.521 INFO: Sensor CPD Block Indexer
17:58:07.521 DEBUG: org.sonar.scanner.cpd.deprecated.DefaultCpdBlockIndexer is used for plsqlcop
17:58:07.521 DEBUG: No CpdMapping for language plsqlcop
17:58:07.521 INFO: Sensor CPD Block Indexer (done) | time=0ms
17:58:07.521 INFO: No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
17:58:07.521 INFO: Calculating CPD for 0 files
17:58:07.521 INFO: CPD calculation finished
17:58:07.602 DEBUG: 'pb_rti_cs.pkb' generated metadata with charset 'windows-1252'
17:58:07.607 DEBUG: 'ps_rti_cs.pks' generated metadata with charset 'windows-1252'
17:58:07.609 DEBUG: 'pk_rti_cs_config.sql' generated metadata with charset 'windows-1252'
17:58:07.638 INFO: Analysis report generated in 116ms, dir size=40 KB
17:58:07.688 INFO: Analysis reports compressed in 49ms, zip size=10 KB
17:58:07.688 INFO: Analysis report generated in C:\Program Files (x86)\Jenkins\workspace\Validate Code\.scannerwork\scanner-report
17:58:07.688 DEBUG: Upload report
17:58:07.731 DEBUG: POST 200 http://localhost:9000/api/ce/submit?projectKey=API_DEV_PRJ&projectName=API_DEV_PRJ | time=41ms
17:58:07.735 INFO: Analysis report uploaded in 47ms
17:58:07.737 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/API_DEV_PRJ
17:58:07.738 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
17:58:07.738 INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AW1kNXPp2pohsWfZUuXe
17:58:07.739 DEBUG: Report metadata written to C:\Program Files (x86)\Jenkins\workspace\Validate Code\.scannerwork\report-task.txt
17:58:07.744 DEBUG: Post-jobs :
17:58:07.753 INFO: Task total time: 7.075 s
17:58:07.914 INFO: ------------------------------------------------------------------------
17:58:07.915 INFO: EXECUTION SUCCESS
17:58:07.915 INFO: ------------------------------------------------------------------------
17:58:07.915 INFO: Total time: 8.659s
17:58:07.968 INFO: Final Memory: 16M/941M
17:58:07.968 INFO: ------------------------------------------------------------------------
Finished: SUCCESS

 

Screenshot of SonarQube UI After Jenkins Scanner

Timestamp is updated and but analysis details have changed to zero

[img] [/img]

 

0
Topic starter

One more thing that I've noticed is that I'm obviously running the JDK v8 now because of the issue that I first had when I opened this thread. However the standalone scanner  for windows (which is working) is packaged with JRE 11.

-- Stand Alone SonarQube Scanner
17:43:15.334 INFO: SonarQube Scanner 4.0.0.1744
17:43:15.334 INFO: Java 11.0.3 AdoptOpenJDK (64-bit)

-- Jenkins Sonar Scanner
17:57:59.318 INFO: SonarQube Scanner 4.0.0.1744
17:57:59.318 INFO: Java 1.8.0_221 Oracle Corporation (64-bit)

Obviously I can't force Jenkins to use the JDK 11 because it will cause the tvdcc.cmd to fail in the way that we have seen previously.

So now I'm very confused!

0
Topic starter

Regarding the last post, I added some more debug and can confirm that tvdcc.cmd is being invoked with Java 8 in both cases, just wanted to rule that out.

But I'm no further along with getting Jenkins Sonar Scanner 4.0 to display analysis results in the Sonar Qube interface.

0
Topic starter

Ran a diff against the two XML  reports from both scanners to check that they actually were identical and they are with the obvious exception of performance timings and execution timestamps.

I then removed sonar-plsql-cop-plugin-6.7.0.2.jar from the Sonar Server plugins and rebooted the server. I pointed both scanners at some XML files instead of PL/SQL.

I can confirm that both the Stand Alone Sonar Scanner and the Jenkins Sonar Scanner successfully posted their results to the Sonar UI. So everything works well without the PLSQL Cop extension.

I then reinstalled the plugin, restarted the server and pointed back at the PL/SQL files and the issue reoccurred.

So this proves that the issue is not with Sonar Server 7.0.

It also shows that the Jenkins Scanner can work normally (and post its report to the UI) when PL/SQL cop is not present.

Therefore this has confirmed that this is either a direct problem with PLSQL Cop itself or a problem with the Jenkins Scanner which is caused by the presence of PLSQL Cop.

I have also tried six different versions of the Jenkins Scanner for elimination purposes. 

Do you have any suggestions of where I can go next with this please?

Thanks

0

I cannot test this right now. But this in the logs

17:58:07.507 WARN: File C:/Program%20Files%20(x86)/Jenkins/workspace/Validate%20Code/pb_rti_cs.pkb not found, skipped.
17:58:07.507 WARN: File C:/Program%20Files%20(x86)/Jenkins/workspace/Validate%20Code/pk_rti_cs_config.sql not found, skipped.
17:58:07.507 WARN: File C:/Program%20Files%20(x86)/Jenkins/workspace/Validate%20Code/ps_rti_cs.pks not found, skipped.

looks strange. Maybe this is related to the windows platform and the fact that directories with spaces are used. Maybe you can try to use a different workspace directory for the analysis.

0
Topic starter

Apologies, I've not been able to test this yet.

I did try a couple of substitution characters in the paths to replace the spaces but that didn't work and the above lines were still spooled out in the log.

I am just waiting for an opportunity when I can uninstall and reinstall Jenkins in the root directory to remove any spaces from the file paths.

If this is the cause of the failure then it is surprising that you've not encountered it before because the default installation directory for Jenkins on windows does include spaces.

I will update when I have news.

Thanks

Alex