Exception in SonarQube.Msbuild.Runner - windows

Running the SonarQube.MsBuild.Runner.exe I get the following exception:
Using environment variables to determine the download directory...
Creating the analysis bin directory:
Unhandled Exception: System.ArgumentException: Path cannot be the empty string or all whitespace.
at System.IO.Directory.CreateDirectory(String path)
at SonarQube.Bootstrapper.Program.preprocess(ILogger logger, IBootstrapperSettings settings, String[] args)
at SonarQube.Bootstrapper.Program.Main(String[] args)
I have the environment variables SONAR_RUNNER_HOME and SONAR_RUNNER_OPTS set like this:
Name Value
---- -----
SONAR_RUNNER_HOME C:\Program Files\SonarQube\sonar-runner-2.4
SONAR_RUNNER_OPTS -Xmx512m -XX:MaxPermSize=128m
What is missing?

Could it be due to the space in C:\Program Files\SonarQube\sonar-runner-2.4 ?
Try to add quotation mark around the path or move the location of SonarQube runner to C:\SonarQube\sonar-runner-2.4
Also verify that you are not running Java 8, because then you should remove the SONAR_RUNNER_OPTS variable as described on page 20 here https://vsarguidance.codeplex.com/downloads/get/1452516

I am using Sonar.MsBuild.Runner 1.0 now. The problem does not exist in MsBuild Runner.

Related

UnsatisfiedLinkError when using flink-s3-fs-hadoop

I have experience UnsatisfiedLinkError when I tried to use
flink-s3-fs-hadoop to sink to s3 in my local Windows machine.
I googled and tried several solutions like download hadoop.dll and
winutils.exe, set up HADOOP_HOME and PATH environment variables, copy hadoop.dll to C:\Windows\System32, but none of them worked.
I also tried to load the hadoop library myself in the code by using
System.loadlibrary("hadoop"), it succeed, but the error still happen,
anything additional step I am missing?
Here is my code (the 2nd and 3rd line is just trying to debug and it will succeed on the 2nd line but throw the UnSatisfiedLink exception in 3rd line):
public static void main(String[] args) throws Exception {
System.loadLibrary("hadoop");
NativeIO.Windows.access(null, NativeIO.Windows.AccessRight.ACCESS_READ);
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.setParallelism(1);
DataStream<String> ds = env.readTextFile("s3://fts-test/test/input.csv");
ds.print();
ds.writeAsText("s3://fts-test/test/output.csv");
env.execute();
}
By the way I am using Window 7 64 bit, flink 1.5.

Windows Driver build - incorrect path passed to Inf2Cat.exe

I'm new to the subject of windows drivers. I'm trying to build one of the Windows-driver-samples in Visual Studio 2015. The compilation and linking steps pass without errors and then I get the following error:
TRACKER : error TRK0002: Failed to execute command:
""C:\Program Files (x86)\Windows Kits\10\bin\x86\inf2cat.exe"
/os:10_x64 /driver:x64\Debug\WFPSamplerCalloutDriver\".
The operation identifier is not valid.
(Note the relative path in /driver argument). If I call Inf2Cat manually from command prompt with full path to the driver, it passes without a hitch:
C:\Program Files (x86)\Windows Kits\10\bin\x86>Inf2Cat.exe /os:10_x64
/driver:C:\Users\****\Windows-driver-samples\network\trans\WFPSampler\sys\x64\Debug\W
FPSamplerCalloutDriver
...........................
Signability test complete.
Errors:
None
Warnings:
None
Catalog generation complete.
C:\Users\****\Windows-driver-samples\network\trans\WFPSampler\sys\x64\Debug
\WFPSamplerCalloutDriver\wfpsamplercalloutdriver.cat
So, it seems to me that VS somehow failed to provide the full path to the driver in the argument to Inf2Cat.
How can I fix this? Which configuration property of my project is incorrect?
Description
Seems Inf2Cat from SDK10 does not accept directory path format provided by VS Project Configurator. Works when: either output folder name has with no trailing "\" or folder name ends up with "\.".
Workaroud
Disable Inf2Cat under Project Preferences: Run Inf2Cat -> No
Configure build events under Build-Events->Post Build-Event: Command Line -> "$(WindowsSdkDir)bin\$(DDKPlatform)\inf2cat.exe" /os:10_$(DDKPlatform) /driver:"$(ProjectDir)$(IntDir)$(MSBuildProjectName)"

Illegal characters in path when running TeamCity VSTest build step

I am trying to execute unit tests on TeamCity (version 9.1.6 build 37459), using the built-in Visual Studio Tests runner. The reason I'm using this is that some of the unit tests are using Fakes assemblies and cannot be executed using MSTest.
When that step is executed, it fails with System.ArgumentException: Illegal characters in path. exception with following log
Custom logger detection logic disabled
VSTest will report tests to TeamCity after run
VSTest executable: "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
Command line params: [[C:\TeamCity\buildAgent\work\475c180054f4c61d\NS\TestProject\bin\Debug\TestProject.dll] [/Settings:NS/localtestrun.testsettings] [/Logger:trx] [/Platform:x86]]
Starting: "C:\Program Files (x86)\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe" #TeamCityImplicit
in directory: C:\TeamCity\buildAgent\work\475c180054f4c61d
2016-02-16 15:07:01,920 [7092] ERROR JetBrains.BuildServer.NAntLoggers.NUnitLauncher2 - Illegal characters in path.
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.IsPathRooted(String path)
at JetBrains.TeamCity.Utils.FileUtil.MakeFullPath(String path, String workDir) in c:\BuildAgent\work\ad31cec0a1b0f083\src\Utils\src\FileUtil.cs:line 48
at JetBrains.TeamCity.GenericProcessSupport.GenericProcessTargetGenerator.GenerateTargetContent(IGenericProcessArguments argz) in c:\BuildAgent\work\ad31cec0a1b0f083\src\GenericProcessSupport\src\GenericProcessTargetGenerator.cs:line 31
at JetBrains.TeamCity.GenericProcessSupport.GenericProcessRunnerFactory.CreateRunner(ITestRunArguments args) in c:\BuildAgent\work\ad31cec0a1b0f083\src\GenericProcessSupport\src\GenericProcessRunnerFactory.cs:line 35
at JetBrains.BuildServer.NAntLoggers.RunnerFactory.FindTestRunner(ITestRunArguments arguments) in c:\BuildAgent\work\ad31cec0a1b0f083\src\NUnitBootstrap\src\RunnerFactory.cs:line 46
at JetBrains.BuildServer.NAntLoggers.RunnerFactory.CreateTestRunner(ITestRunArguments arguments) in c:\BuildAgent\work\ad31cec0a1b0f083\src\NUnitBootstrap\src\RunnerFactory.cs:line 31
at JetBrains.BuildServer.NAntLoggers.NUnitLauncher2.Run2(String[] args) in c:\BuildAgent\work\ad31cec0a1b0f083\src\NUnitBootstrap\src\NUnitLauncher2.cs:line 100
at JetBrains.BuildServer.NAntLoggers.NUnitLauncher2.Run(String[] args) in c:\BuildAgent\work\ad31cec0a1b0f083\src\NUnitBootstrap\src\NUnitLauncher2.cs:line 56
None of the atricles/blog posts I found online worked and I can't neither tell what path contains the illegal characters nor what those characters are.
Can anybody please help? Thanks.
Faced the same issue. After hours of googling issue is in added quotes in the parameter value. Remove it and it will work.
Found it, comparing successful build log with failed. On successful run there were no quotes in this line:
VSTest executable: " C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "

Configuring Maven for Windows 7, Files\Java\jdk1.6.0_23"" was unexpected at this time error

I am trying to configure Maven on my Win 7 machine. I am following these steps:
http://maven.apache.org/download.cgi
I downloaded Maven into folder
c:\Program Files\Apache Software Foundation\apache-maven-3.0.5\
I set all environmental variables as described in the URL above
JAVA_HOME = C:\Program Files\Java\jdk1.6.0_23
M2_HOME = c:\Program Files\Apache Software Foundation\apache-maven-3.0.5\
M2 = %M2_HOME%\bin
PATH = %M2%; C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell; %JAVA_HOME%\bin ; C:\Program Files\Java\jdk1.6.0_23
But when I enter:
C:\Users\Andrei>mvn --version
I get a :
Files\Java\jdk1.6.0_23"" was unexpected at this time.
Can you please help me with this issue?
Let me know please if you need more details.
Thanks in advance!
This one solved it for me: http://www.xinotes.net/notes/note/559/
It is a problem with how the JAVA_HOME path is being set.
Set the path without quotes like this:
set java_home=c:\Program Files\Java
Or using the 8 char syntax for folder names like this:
set java_home="c:\Progra~1\Java"
To solve the same issue
I did:
SET M2_HOME=C:\Program Files\Apache Software Foundation\apache-maven-3.2.3-bin\apache-maven-3.2.3
Then
SET JAVA_HOME=C:\Program Files (x86)\Java\jre7
And finally I added to the beginning of Path
SET Path=%JAVA_HOME%\bin;%M2_HOME%\bin;...
After exiting all my running cmd.exe and opened a new one I was able to do mvn --version with no problems.
I had the same problem, but the cause was M2_HOME variable defined as:
C:\apache-maven-3.2.2\bin
instead of
C:\apache-maven-3.2.2\
Also the JAVA_HOME should be to the java folder, and not to the \bin sub-folder.
I ran into a similar issue and the problem is with the presence of character "(" in the current directory path where maven is being run eg:- C:\Work(test)\Java-Project. I simply changed it to C:\Work\Java-Project and its working fine now.
For info I'm running Windows 10 with Maven V3.6.0
Insert with windows GUI Environment Variable Configurations > System Variables :
Name JAVA_HOME
Path C:\Program Files (x86)\Java\jre7\ << with "\" in the end. no quotes.
kill process cmd.exe and re-open if it was opened.
It worked to me.
I had the same issue. I didn't have quotes around the values for M2_HOME or JAVA_HOME, but still got the error.
I moved %M2_HOME%\bin and %JAVA_HOME%\bin left in the path so that both occurred before any spaces in the path and the problem vanished.
Error Message : was unexpected at this time when I run mvn --version command in cmd.
Please find the procedure:
My Computer -> Right click properties-> Advanced-Environment Variables- User Variable
Maven 3.2.3
User Variable :
Variable name :M2
Variable Value : %M2_HOME%\bin
Variable name : M2_HOME
Variable Value : C:\WLS1033\Apache Software Foundation\apache-maven-3.2.3
Variable name :path
Variable Value : %M2_HOME%\bin
Result :
D:\Documents and Settings\x169810>mvn --version
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T16:58:10-04:00)
Maven home: C:\WLS1033\Apache Software Foundation\apache-maven-3.2.3
Java version: 1.6.0_18, vendor: Sun Microsystems Inc.
Java home: C:\WLS1033\jdk160_18\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
My Computer -> Right click properties-> Advanced-Environment Variables- User Variable
Maven 1.0.2
User Variable :
Variable name :M2
Variable Value : %MAVEN_HOME%\bin
Variable name : MAVEN_HOME
Variable Value : C:\WLS1033\Apache Software Foundation\maven-1.0.2
Variable name :path
Variable Value : %MAVEN_HOME%\bin

Java error when starting Eclipse on Win 8

When starting Eclipse I get the following error:
Obviously it's trying to use javaw.exe from system32-folder, which it shouldn't I guess. I've set the environment-vars to the following:
JAVA_HOME : "C:\Program Files\Java\jdk1.7.0_07;C:\Program Files (x86)\Java\jdk1.7.0_07"
Path : "... ;C:\Program Files (x86)\Java\jdk1.7.0_07\bin;C:\Program Files\Java\jdk1.7.0_07\bin"
and I added -vm C:\Program Files\Java\jdk1.7...\bin\javaw.exe to eclipse.ini
Java and JDK are installed. x86-version and x64-version.
Has anybody an idea, how I can solve this?
The solution is the following:
I removed the -vm C:\Program ... entry from eclipse.ini
I removed the JAVA_HOME variable
I edited the Path as follows:
I moved the path to javaw.exe to the beginning of the Path-variable, because it's using the first javaw.exe it finds and there's one in system32-folder whyever.

Resources