An internal error occurred during: "Enable SonarLint on all projects". Unable to add builder - sonarlint

When starting Eclipse in a workspace, SonarLint plugin reports the following error:
An internal error occurred during: "Enable SonarLint on all projects".
Unable to add builder
After confirming the errmsg, both Eclipse and SonarLint plugin work properly.
Nevertheless, the message is misleading. What causes it? In my workspace, some projects are open and some not.

For me issue was coming due to lombok jar so Need to upgrade LOMBOK version to 1.18.12 in sts and in pom.xml both and it got resolved.

In my case it was caused by one of my project being read-only.
For some reason, SonarLint defines a global Eclipse job, to add itself to every project that is open. If the process fails, you get that annoying message.
As a workaround I've removed a read-only flag from the .project files.

Yes, you just need to update the latest Lombok jar in either STS or eclipse, this will resolve the issue for me. And you need a sonar lint plugin for the eclipse for sure.
The attached screenshot is coming in my case, but after updating the Lombok jar it is gone.

I upgraded to Latest lomlok version and it got solved.
I replace the old lomlok file with latest version from https://projectlombok.org/download.

I am using lombok 1.18.4 and eclipse = eclipse-java-12-R-win32-x86-64.
Project is compiled and able to run the project but in eclipse whenever i am opening any java file facing issue :
An internal error occurred during: "SonarLint processing file lombok/launch/PatchFixesHider$ValPortal /server/com/EmployeeList.java".
lombok/launch/PatchFixesHider$ValPortal
Sonar lint issue

This propblem was resolved with next version of LOMBOK.
Upgread to 1.12 or higher version and rebuild pom.xlm
I was upgread to 1.20 and problem dispaired ;)

Related

Visual Studio 2015 - Nuget Exception - GetFullVsVersionString must be called on the UI thread

While attempting to build or open a project in Visual Studio 2015 Update 3, I keep getting errors around nuget package management.
Whenever I build the project the first time after opening VS, I get the error message below.
I also get it when I try to open the nuget package manager dialog.
Anyone else experience this?
An exception was thrown while initializing part
"Nuget.PackageManagement.VisualStudio.VSolutionManager".
GetFullVsVersionString must be called on the UI thread.
Here is another thread in stack about this issue :
Visual Studio 2015 Initializing Part Nuget.PackageManagement.VisualStudio.VSolutionManager must be called on UI Thread
And here is in github :
GetFullVsVersionString must be called on the UI thread #3419
People say install this plugin for fix this issue.
But when i open that url i face this error :
We're sorry, the page you requested cannot be found!
In VisualStudio 2015 -> Tools -> Extensions and updates -> Online:
Search for the string: "Fix NuGet GetFullVsVersionString must be
called on the UI thread" and install the given fix.
Alternatively you can download the fix at : GetFullVsVersionString
fix
Now in February 2018, the latest NuGet Package Manager version
3.4.4.1321 does not have the fix included, so the patch must be applied.
As Steve Greene's answer describes, I also had the Telerik extension
installed, so that might have caused the problem.
I searched that phrase in VS - But could n't find anything.
Also GetFullVsVersionString fix does n't exist any more.
I also reinstalled nuget package manager - no help.
What is the solution?
EDIT 1 :
When i delete .vs hidden folder and open VS error vanished.
but when i close VS & reopen it again i face that error again.
What is wrong about .vs hidden folder?
Several suggestions:
1) disable any third installed party extensions under Tools--> Extensions and Updates--> Installed to check whether there is an extension that caused this issue.
2) Close VS, delete all files under C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
You can also delete .vs hidden folder, bin and obj folder of the project.
Then, restart VS to test again.
Further, try to reinstall Nuget Package Manager extension again.
3) restore VS environment, enter C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\14.0
And you can just rename the 14.0 folder to another name like VS2015_Backup(just make a backup for your VS2015 environment).
Then, restart VS to test the issue.
4) open Control Panel-->Programs and Features-->right-click on VS2015 Program-->change-->Repair

The target "ResolveTagHelperRazorGenerateInputs" does not exist in the project

I am getting the following error when i try to build an AspNetCore Web Application targeting netcoreapp2.2.
Error MSB4057 The target "ResolveTagHelperRazorGenerateInputs" does not exist in the project. C:\Program Files\dotnet\sdk\2.2.103\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets
I have tried the following:
clear cache on vs according to this post
update vs2017 to 15.9.5
reinstall net core sdks
reinstall vs
Nothing helped. I first got the error during an upgrade from core 2.1 to core 2.2 on a different project, and it's possible that by mistake edited the
Sdk.Razor.CurrentVersion.targets file. From that moment on, i keep getting this error on any project that targets core 2.2 (even new ones).
Does anyone encountered this problem or have any clues about solving it?
Thanks
After long battles it figured out to be a problem with VS NuGet Package Manager.
All I had to do was:
VS > Tools > Options > NuGet Package Manager > Clear All NuGet Cache(s).
The Following Link was my solution. I also struggled to get this fixed.
Just copy the files from the NetStandard2.0 folder from GitHub then replace it with you Directory from the same location.
Hopefully this helps someone.!
Here is the Answered Link:
https://social.msdn.microsoft.com/Forums/en-US/cafc9823-eb61-46f7-8489-007242ef2ad2/target-quotresolvetaghelperrazorgenerateinputsquot-does-not-exist-in-the-project?forum=msbuild
Here is the GitHub Link
https://github.com/aspnet/Razor/tree/master/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0
I encountered the same issue during the Azure build pipeline process, and clearing the NuGet package cache resolved the issue.
Solution:
I used a dotnet tasks with "custom" to issue the following command before NuGet package restore task:
command:
dotnet nuget locals global-packages -c
Screenshot shows the build pipeline task
For me the solution was as follows:
In Visual Studio
Right click on each project and click "Unload Project"
Right click on each project and click "Reload Project"

Tomcat ServeletException NoClassDefFoundError

I have a webapp I'll call "App1" I am using to create some webplots. I have the .jar files in webapps/App1/lib/ and when I visit the server, I find that I am able to launch some webapps, but others I get funny exceptions. One, being
java.lang.NoClassDefFoundError: Could not initialize class com.jrefinery.chart.JFreeChartConstants
Then, when I add the jfreechart jar to the classpath, I get a different error:
java.lang.NoClassDefFoundError: com/jrefinery/util/ObjectUtils
tomcat version: 7.0.19
OS: ubuntu 12.04
I've tried it on a windows installation and it seems to work just fine. So I'm guessing it's a classpath error? I've tried adding the jfreechart-*.jar to the catalina classpath but it doesn't seem to fix anything. I've also tried to copy the webapp/App1/lib/ jar files to the top level/lib folder and this doesn't fix anything either.
Any ideas here?
Thanks.
You are missing the correct jar file in your project.
The jfreechart project has been repackaged. If you include the old jfreechart-0.9.3.jar, it will fix your compiler errors.
jfreechart-0.9.3.jar
download : http://mirrors.ibiblio.org/pub/mirrors/maven2/jfreechart/jfreechart/0.9.3/jfreechart-0.9.3.jar

Ormlite for MySql looking for wrong version

We've got a project using Ormlite.MySql built for .NET 4.0.
Ormlite and its dependencies are loaded via NuGet (it's ServiceStack.Ormlite.MySql 3.9.54), including MySql.Data 6.6.5.
When we try to run the code, however, we get a dependency error:
Could not load file or assembly 'MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
The ServiceStack.OrmLite.MySql package in NuGet lists MySql.Data as a dependency, but doesn't list any specific version. In reflector, I can see that ServiceStack.OrmLite.MySql.dll is, in fact, referencing 6.6.4.0 of MySql.Data.dll.
Has anyone encountered this issue? I hate to hack the config file to redirect assmbly binding in general (always feels like a kludge).
I've just encountered the same problem. I solved it by downloading the Mysql.data.dll version 6.6.4.0 from servicestack on github: https://github.com/ServiceStack/ServiceStack.OrmLite/blob/master/lib/MySql.Data.dll
I had the same error. Just install with nuget : Mysql.data (it work for me)
nuget install the right version : "6.6.4"
(you could verify the version number in the nuget description)

Hudson: Error after creating doxygen files; downgrade not working either

I'm having the following problem with Hudson after upgrading to 2.1.0:
After successfully creating the doxygen output, the following exception occurs:
Publishing Doxygen HTML results.
The determined Doxygen directory is 'C:/doxy/myDir'.
FATAL: error
hudson.util.IOException2: java.io.IOException: Unconnected pipe
The error did not occur with 2.0.1, unfortunately, downgrading does not work - Hudson tells me, that it can't read the job files anymore.
Does anyone know the best way to deal with this? Is there a simple solution to either make the doxygen plugin work in 2.1.0 or to successfully downgrade to 2.0.1?
Not sure what exactly the problem was, but migrating to the newest Jenkins release and using the HTML report publisher plugin instead of the Doxygen plugin is at least a work