I get this Missing or bad plugin while running sonar-runner on a C project - c

I'm trying to analyze a example project which was provided by the sonarQube examples. I have this C/C++ version 2.0 plugin installed on my SonarQube.
My sonar-project.properties has these contents.
sonar-project.properties
sonar.projectKey=org.codehaus.sonar:simple-c-project
sonar.projectName=Simple C project analyzed with the SonarQube Runner
sonar.projectVersion=1.0
sonar.sources=src
sonar.language=c
sonar.sourceEncoding=UTF-8
When i run the sonar-runner command for this project i get an error as given below
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: com.A.A.A.B.A: Missing or bad plugin license. Please check logs.
Am i missing any plugins or is the plugin installed not proper.
Thank You.

Alternatively you can use another plugin in sonar called sonar-cxx if you don't want to use the commercial plugin. Its community edition Plugin. You can find it Here- https://github.com/wenns/sonar-cxx/wiki/Installation
You can download it from here - https://github.com/wenns/sonar-cxx/releases/tag/cxx-0.9.1

The C/C++ plugin is a commercial plugin, which requires a purchased licenses. I suspect the problem is that it can't find your licenses.
According to the official instructions, you need to do this:
Log in as a System administrator, go to Settings > General Settings > Licenses, paste your license key and Save (was Settings > General Settings > C/C++ (SonarSource) prior to version 1.6).

Related

Concordion Unable to find specification

java.lang.RuntimeException: Unable to find specification: com/concordion/Concordion.html
I'm using Concordion 2.2.0 with Junit 5 jupiter using the Junit 4 vintage engine and a TFS build agent using maven. The maven surefire picks up the Concordion java file but simply can't find the corresponding Concordion html and so the auto-tests fail.
The html specification file is in the resources directory but it doesn't matter where I put it, the surefire / concordion libraries can't find it!
The specification files need to be on the classpath in the same package as the Java class. Typically this is under the src/test/resources folder. See https://concordion.org/coding/java/markdown/#locating-the-specification for more details.
Are you able to provide a simplified test case showing the issue?
Moving the specifications to the same location as the java files (src/test/java or src/main/java) should get it working in the short term.

Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index

Android Studio 3.4.
Project SDK (Android API 19 Platform).
Not using FindBugs or SpotBugs.
Every attempt to build, I get this error:
Information:9/05/2019 4:02 PM - Compilation completed with 1 error and 0 warnings in 1 s 763 ms
Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
java.lang.ClassNotFoundException: com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.intellij.util.indexing.counters.IndexCounters.<clinit>(IndexCounters.java:34)
at com.intellij.util.indexing.impl.MapReduceIndex.<init>(MapReduceIndex.java:86)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex$CompilerMapReduceIndex.<init>(CompilerReferenceIndex.java:214)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex.<init>(CompilerReferenceIndex.java:73)
at org.jetbrains.jps.backwardRefs.JavaCompilerBackwardReferenceIndex.<init>(JavaCompilerBackwardReferenceIndex.java:12)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexWriter.initialize(JavaBackwardReferenceIndexWriter.java:74)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexBuilder.buildStarted(JavaBackwardReferenceIndexBuilder.java:40)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:358)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:135)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:229)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Solved for me, finally, after months. Note that I have never used FindBugs or SpotBugs, although most posts related to this error mention it.
The solution is to change the compiler from javac to Eclipse. I followed the picture here (don't worry if you don't read Chinese; you won't need to; the picture just makes it clear how to change the compiler).
I have no idea why this works and would highly appreciate informed commentary.
I am facing the same issue with android studio 3.4 and 3.4.1 as well but this work fine with android studio 2.3.3 and 3.0 as well.
Bug seems to be in Android Studio 3.4.x so I downloaded beta version of Android Studio 3.5 and error is gone.
You can download preview version from here :
https://developer.android.com/studio/preview/index.html
Partial and temporary fix.
I downgraded Android Studio to 2.3.3 (!) and it worked. I will need to track down what is hard-linking the project to this particular version and fix that, but I need to ship a fix now for the issue at hand.
I get this error message in a Flutter project, when I try to build the project (menu Build/Make Module) whith Android Studio 3.4.2. But I don't get the error when I run the app (menu Run/Run). Running the app does build the project correctly. It seems that menu Build/Make module does not build the app correctly...
So, the solution for me is to run the app, not build it ;-)
Solution
I was able to fix this problem by deleting the system subfolder in Android Studio's configuration folder. No user data is lost and the build starts working again!
Android Studio configuration folder can be found under this locations (for more information see this question):
Linux / MacOSX: /home/USERNAME/.AndroidStudio
Windows: C:/Users/USERNAME/.AndroidStudio
Note that the name of the configuration folder can vary based on the version: it could be .AndroidStudio3.5, .AndroidStudioBeta or others.
Cause
This problem is most probably caused by some corrupted/invalid gradle build files in your project, that cause the system-wide Android Studio configuration to break. So if the problem shows up again after using the solution above, remove cache and build files generated by gradle by following these steps:
./gradlew clean (Linux/MacOS) or .\gradlew.bat clean (Windows): this should work, as it should clean all files generated by gradle.
If you are in a git repository try to remove all untracked files (but please note that this could delete files you want to keep... be sure to commit them first!)
Manually delete build folders, in case the above steps did not work.

Mac - GAE: Cannot get the System Java Compiler. Please use a JDK, not a JRE

I'm getting this error when trying to deploy an AppEngine project. The error comes up when trying to compile JSPs:
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Now, I'm on a Mac, and I've installed JDK 1.7.0-25. I also modified eclipses.ini in eclipse.app by including the -vm line:
openFile
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.7
Within Eclipse, the "Installed JREs" is also pointing to JDK 1.7.0-25.
Am I missing something? Thanks in advance.
For "Installed VM" please confirm the location is something like /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
On OSX, I don't have any -vm entry at all and can successfully deploy AppEngine projects so don't know why that would be needed.
Try removing the JRE from your project and adding re-adding it.

I upgraded the GAE in Eclipse to 1.7.4

My JSP based application now doesn't deploy. I get the following error:
Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Has anyone found a workaround?
It is likely that you are using some Java code in your JSP as a result of which the JDK is needed to compile that.
Here are some points that you can try:
Check that you are using a JDK and not a JRE. In Eclipse, go to Window --> Preferences and then Java --> Installed JREs. If it is pointing to a JRE and not JDK, I suggest you change that. So install a JDK, remove references to the JRE in the settings here and point it to the JDK only.
If you are still getting the exception above, then I suggest to provide the -vmsetting in eclipse.ini which is found in the same folder as your Eclipse executable.

eclipse product invocation causes java.lang.RuntimeException: No application id has been found

I just exported a product that is working nicely if I hit the "Launch an Eclipse application" button. If try to execute the exported product, I get following exception on the startup:
!SESSION 2012-03-16 17:28:21.206 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2012-03-16 17:28:22.184
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: No application id has been found.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:242)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Just before I exported the product, I performed a validation of the dependencies and it was fine. Do you have a clue what is going wrong? Thank you!
Normally, I would look for the following:
you are not exporting the exact same set of plug-ins in your product configuration as used in the launch configuration. There are no tools available for the compare.
you have a custom config.ini file that does not define the proper application for the product.
Added missing javax.xml dependency to the product configuration file:
<plugin id="com.ibm.icu"/>
<plugin id="javax.annotation"/>
<plugin id="javax.inject"/>
+<plugin id="javax.xml"/>
<plugin id="org.apache.batik.css"/>
<plugin id="org.apache.batik.util"/>
<plugin id="org.apache.batik.util.gui"/>
I had the same problem.
With E4 tooling the following steps worked for me.
Open .product file and go to Dependencies tab. Then press Add Required Plug-ins.
Then go to Overview and press Launch an Eclipse application.
Also you should do Help->Check for updates
I went to my run configurations and hit Add Required Plug-Ins one the Plug-Ins page. Made the problem go away.
I had a similar exception while launching my project. In my case, the reason was JRE version - I've set JRE 1.7 instead of 1.6 in debug configuration, and things started to work. I believe the same thing can happen, if the project was configured for OpenJDK 1.6, and the debug launches it with sun-JDK 1.6.
Review the Dependencies tab, and remove the extra plug-ins are are showing un-resolved in the Plug-ins and Fragments.
It basically means, that when launching an eclipse Program the id of the selected product in the run configuration is not preset in the set of your plugins:

Resources