Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

DSNSensor NullPointerException for UserDefinedProperty (DB_SCHEMA_NAME) #21

Open
WeissChristoph opened this issue Sep 18, 2018 · 3 comments

Comments

@WeissChristoph
Copy link

Issue:
We have a msg flow with a user defined property “DB_SCHEMA_NAME”. When running the scan, the scan stops at the com.exxeta.iss.sonar.msgflow.batch.DSNSensor class - and reports a failure:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project workpace-parent-pom: null: MojoExecutionException: NullPointerException -> [Help 1]

Environment used:
SonarQube: 6.7.1 with sonar-esql-plugin-2.3.2.jar and sonar-msgflow-plugin-1.1.3.jar

Additional comments:

  1. During analysis, it is observed that when an UDP is created in a message flow (msgflow) level, SonarQube analysis fails with Null Pointer Exception. But when the same UDP is present in Sub flow (subflow) level, it works fine.
  2. It is also noted that when the UDP is removed from the message flow, SonarQube analysis is running fine.
@ThomasPohl
Copy link
Member

Hi Christoph,
I was not able to reproduce your issue. I created a msgflow with an UDP called DB_SCHEMA_NAME. The analysis worked like expected. (Current LTE Version of SonarQube and current version of the msgflow plugin)
Can you provide a msgflow-file that causes the issue and the complete stackstrace?

@WeissChristoph
Copy link
Author

WeissChristoph commented Feb 18, 2019

Hi Thomas,

Thanks for your msg and sorry for my late reply. Attached an example project and the stack trace. I would of course appreciate if you could take a look at it. Thanks in advance - Christoph

How to get it run:
Prerequisites:

  • Sonar Qube running on localhost:9000 (if other location you have to pass the sonar.url als parameter in the maven call below)
  • mvn 3.x and JDK 1.8 - last one set as JAVA_HOME 
    

Execute:

  • navigate with a bash to the root folder of the sample project - where the pom is placed
  • run mvn clean (to make sure everything is reset / cleaned up)
  • run mvn sonar:sonar -X

SonarQube_DSNCheck.zip
msg_flow_plugin_nullpointer_trace.txt

@aarjavshah
Copy link
Contributor

Hi Christoph,
I tried with the project you provided. I am still unable to reproduce the issue. The NPE is not getting replicated for DSNSensor.

Attaching the logs for the sonar analysis.
tmp.log

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants