Sonar runner can not find or load main class - project

I have installed sonar and it works on http://localhost:9000
When I want to analyze a project using sonar runner (command from my project directory), I get the following error:
D:\eclipse_workspace\Project>sonar-runner.bat
C:\Program Files (x86)\sonar-runner-1.3\bin
Error: Could not find or load main class org.sonar.runner.Main
I'm working on Windows 7 and the property file is unchanged (derby database). How can I run sonar runner?

You can try installing the Sonar Runner in a folder that does not contain spaces, this should solve the problem.

I ran into this for a different reason. While my path was free of spaces, it had a 'fraction slash' ('⁄' // U+2044) which caused the issue. Once I replaced it with an - things worked fine.

I had non-latin (Japanese) folder names, which gave this error. Putting it in my C: root folder solved the issue.

Related

impossible to install a intellij idea

I downloaded the ultimate version of IntelliJ from the official website and when I do ./idea.sh in the .. /bin directory of the file I get this error message in the terminal:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.Error opening zip file or JAR manifest missing : /root/.jetbrains/jetbrains-agent-v3.2.0.de72.619 Error occurred during initialization of VM agent library failed to init: instrument
I don't know if I am supposed to have a .jetbrains file in my repersonel if so why I don't have it and if not how to get it?
Cordially...
What's the environment of your machine and I do not think you need to care about how to get .jetbrains manually by yourself. I've installed a IntelliJ idea on Ubuntu18.04, it works well. You can try run it as an administrative, also you can go to ./bin folder and then run ./idea.sh rather than ../bin folder
btw, as I said install, it does not indicate we need to compile it and get some executable binary file to run it. It's a green software that contains anything you need, you can run it directly
The Error opening zip file or JAR manifest missing : /root/.jetbrains/jetbrains-agent-v3.2.0.de72.619 error indicate that there is a problem with the distribution you have downloaded. It was corrupted or modified improperly.
Re-download it from https://www.jetbrains.com/idea/download and install into a new empty directory.
You can also try deleting the IDE's config and system directories.

Build using TeamCity: Failed to start MSBuild; please specify a nuspec or project file to use

I'm trying to build a website in Teamcity, but the first build step "starting MSBuild" is failing.It seems that the command is trying to install nuget, but it is complaining that there is no nuspec or project file specified.
I have a "nuget.targets" file and the code compiles fine outside of teamcity , so I think it must be a setting I am missing, and not a file I actually need to add but maybe I do need to add a nuspec or project file? Assuming I do, how would I go about doing that?
[Exec] C:\TeamCity\buildAgent\work\61cf1fbc18b86c6f\.nuget\NuGet.targets
(109, 9): Please specify a nuspec or project file to use.
I am completely new to Teamcity (~3hrs); how do I resolve this problem?
If a build fails or behaves differntly in TeamCity than locally, then it is recommended to run the build in the working folder on agent machine under the same user that the agent is running. Find more details here.

mule anypoint studio class not found exception

If I run the application in server, which is working fine, but If i run application in anypoint studio doesn't run. Here is the error message for loading oracle driver.
error message:
2015-02-04 11:18:34 WARN DriverManagerDataSource:107 - Could not load driverClass oracle.jdbc.OracleDriver
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
I have placed all jdbc and other jars under studio->project->properties->libraries.
This is caused by the Studio's classloading policies. The workaround is to copy the JDBC Driver .jar to ${studio.home}/plugins/org.mule.tooling.server.${mule.version}.ee_${mule.version}.${release.date}/mule/lib/user
Hi there actually that's kind of a hack :P though it works.
The more proper way to deal with this is, when coding your application (that's why one should use Mule Studio), to place the jars like drivers in a particular folder, like a /lib in the root of you project.
Then add these jars to the classpath.
I know what you did is the way it should be done when running on Mule stand alone in order to share such jars but try this one if you can ;)
I was also facing the same problem. As the application runtime fails to locate the jdbc driver jar in classpath So It is unable to load the same.
the simple and easiest way to handle this error is just put your lib folder containing the ojdbc jar file inside the app resource (src/main/app) of the project. During the building of project it will automatically be place in classpath.
I have tried the same approach and It works for me.
Hope this helps.
The way I fixed the problem was removing the .classpath / .project files from my project root folder. I re-imported the project and then I saw a bin folder created. I removed this bin folder then right-click on the project -> Refresh and then Run As -> Mule Application.

Intellij IDEA ignoring files run issue

Hello all I am trying to run a programme using Intellij. The programme runs perfectly in Eclipse and Terminal. However using IDEA it seems to ignore 2 files.
java.io.FileNotFoundException: .\data\def\items\ItemValues.txt (The system cannot find the path specified)
There are no errors normally in Intellij. I just get this error upon running it. The file is there I have checked and path is correct. Intellij just seems to be ignoring it.
Check Working directory in Run/Debug Configuration, you need to change it to $MODULE_DIR$ if you have multiple levels of maven modules.

teamcity building project Failed to start MSBuild.exe. Illegal characters in path

I am trying to build a project within teamcity. It will do the checkout of TFS and the files are locally on the build server. If I manually run the build command on the server it works:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe C:\TeamCity\buildAgent\work\3446a5bd436eea87\Dev\Dev\project\myproj\myproj.csproj /t:build
Within Teamcity I have a Build step of MSBuild:
the build fie path is: Dev\Dev\project\myproj\myproj.csproj"
working directory left blank
mbuild version: microsoft .net framework 4.0
msbuild toolsversion: 4.0
run platform: X86
targets: I have tried build "build" and left blank
command line params left blank
if I create a command line build task and run the above command line it works. I am not sure what differences there are between the command line and msbuild task within teammcity.
EDIT
I have tried a few variations on the working directory:
The output path in project is set to ..\Build\Tools\myproj\
So I have set the working directory in teamcity to: Dev\Dev\project\Build\Tools\myproj\
This didn't help.
Here is the exact output from teamcity:
Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:C:\TeamCity\buildAgent\work\3446a5bd436eea87\Dev\Dev\project\Build\Tools\myproj /msbuildPath:C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
in directory: C:\TeamCity\buildAgent\work\3446a5bd436eea87\Dev\Dev\project\Build\Tools\myproj
Failed to start MSBuild.exe. Illegal characters in path.
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.IsPathRooted(String path)
at JetBrains.TeamCity.Utils.FileUtil.MakeFullPath(String path, String workDir) in c:\BuildAgent\work\c2314fd21f15dc97\src\Utils\src\FileUtil.cs:line 48
at JetBrains.BuildServer.MSBuildBootstrap.RunArgs.get_ProjectFile() in c:\BuildAgent\work\c2314fd21f15dc97\src\MSBuildBootstrap\src\RunArgs.cs:line 156
at JetBrains.BuildServer.MSBuildBootstrap.Impl.MSBuildBootstrapFactory.Create(IClientRunArgs args) in c:\BuildAgent\work\c2314fd21f15dc97\src\MSBuildBootstrap.Core\src\Impl\MSBuildBootstrapFact ory.cs:line 29
at JetBrains.BuildServer.MSBuildBootstrap.Program.Run(String[] _args) in c:\BuildAgent\work\c2314fd21f15dc97\src\MSBuildBootstrap\src\Program.cs:line 67
Try editing the build configuration and remove the quotes from the Build file path option.
If you have:
"Dev\Dev\project\myproj\myproj.csproj"
Just let:
Dev\Dev\project\myproj\myproj.csproj
I hope this help.
In TeamCity, when you are using parameters for your path, or a portion of the path, it is easy to paste in a folder and not notice that it has a New Line or Carriage Return on the end (as I found from painful experience). It could show up in TeamCity as the value for a parameter:
\Folder1\NewlyPastedInFolder
\ExistingFolder\BuildScripts
What looks like a word-wrapped value is actually a parameter with a carriage return in the middle. Check it by editing it, and see if you can delete the character to make it into a single-line value.
This questions seems very similar:
What's the illegal character in this string ? I'm getting MSBUILD : error MSB3095
In addition to this question, take a look at:
What is a dll.refresh file in ASP.Net?
On this question, this answer is of interest:
In an ASP.NET project, adding a file-based reference will add a
.refresh file in the Bin folder. When the project is under source
control, this file is then added to source control. *.dll.refresh
files that litter the bin directory. Every time you add an external
reference, you'll find a dll.refresh file right next to it. These
dll.refresh files are an exception to the rule, and they should go
into source control. Its the only way your web project will know where
its references live.
If you don't have this in source control, it could explain the problem you are seeing. It sounds like the error message is potentially misleading and this is related to a reference not being resolved on the build machine.
With regards to why it works from the command line, is it possible that when you are building from TeamCity it is cleaning the output directory before building? If when you run from the command line binaries have already been output from the partially failed build which are referenced as file references, this would succeed.
To identify if this is the case - if you do a completely clean checkout and then run the MSBuild step from the command line, does it still succeed?
I ran into this error message from TeamCity and it turned out that a space in the solution file was causing it (the solution file referenced in the Visual Studio Build Steps had double quotes around it and that didn't seem to help.) Renamed the solution file without the space and that solved the problem.