HTTP2 Request cannot be send via JMeter - jmeter

I'm trying to send HTTP2 requests via JMeter.
I've downloaded alpn-boot file according to my java version: java version "1.8.0_151" -> ALPN version is 8.1.11.v20170118 (according to https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html#alpn-versions). Also, I've added the path to alpn-boot file to jmeter.bat:
set JVM_ARGS= -Xbootclasspath/p:D:\apache-jmeter-5.1\apache-jmeter-5.1\lib\alpn-boot-8.1.11.v20170118.jar
#echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
...
But I get an error message in JMeter:
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: No Client ALPNProcessors!
at org.eclipse.jetty.util.FuturePromise.get(FuturePromise.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Connection.connect(HTTP2Connection.java:69)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.setConnection(HTTP2Request.java:280)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:140)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:117)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:475)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:418)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:249)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: No Client ALPNProcessors!
at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.<init>(ALPNClientConnectionFactory.java:57)
at org.eclipse.jetty.http2.client.HTTP2Client.lambda$doStart$1(HTTP2Client.java:155)
at org.eclipse.jetty.http2.client.HTTP2Client$ClientSelectorManager.newConnection(HTTP2Client.java:438)
at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:222)
at org.eclipse.jetty.io.ManagedSelector.access$1500(ManagedSelector.java:60)
at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:825)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:672)
... 1 more
Suppressed: java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/ALPN
at org.eclipse.jetty.alpn.java.client.OpenJDK8ClientALPNProcessor.init(OpenJDK8ClientALPNProcessor.java:42)
at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.<init>(ALPNClientConnectionFactory.java:77)
... 8 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.alpn.ALPN
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 10 more
I guess the issue is connected with alpn path in jmeter.bat file, but how to correct it?

First of all ensure that JMeter is using your Java 1.8.0_151 and taking the -Xbootclasspath argument, you can do this by adding a JSR223 Sampler and using the following Groovy code:
log.info('Java version: ' + System.getProperty('java.version'))
java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments().each {
log.info("Effective JVM argument: " + "$it")
}
you should get the output like:
Check that the alpn-boot file is really there:
Sanitize the input, i.e. remove whitespace, add a semicolon at the end and surround the value with quotation marks:
set JVM_ARGS="-Xbootclasspath/p:D:\apache-jmeter-5.1\apache-jmeter-5.1\lib\alpn-boot-8.1.11.v20170118.jar;"
If everything goes well you should be able to successfully execute the HTTP2 request:
More information: The New HTTP/2 Plugin for JMeter

Related

No Client ALPNProcessors JMeter HTTP2 Error even after installing jetty-alpn-java-client or jetty-alpn-conscrypt-client jar

I'm hitting the same Error mentioned in this post with Java 8, JMeter 5.1.1 Version: Java 12 JMeter 5 HTTP/2 request java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory
I downloaded the jetty-alpn-java-client from here and installed in lib directory and restarted jmeter, I still see the same issue.
There is no TLS Configuration involved but still I downloaded jetty-alpn-conscrypt-client and installed from this link, Still seeing the same issue.
I don't have any code written, I Installed HTTP2 Sampler from JMeter Plugin Manager. Please let me know what am I missing.
Error Code:
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: No Client ALPNProcessors!
at org.eclipse.jetty.util.FuturePromise.get(FuturePromise.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Connection.connect(HTTP2Connection.java:68)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.setConnection(HTTP2Request.java:278)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:115)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: No Client ALPNProcessors!
at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.(ALPNClientConnectionFactory.java:57)
at org.eclipse.jetty.http2.client.HTTP2Client.lambda$doStart$1(HTTP2Client.java:155)
at org.eclipse.jetty.http2.client.HTTP2Client$ClientSelectorManager.newConnection(HTTP2Client.java:438)
at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:222)
at org.eclipse.jetty.io.ManagedSelector.access$1500(ManagedSelector.java:60)
at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:825)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:672)
... 1 more
Suppressed: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/alpn/java/client/JDK9ClientALPNProcessor has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.(ALPNClientConnectionFactory.java:65)
... 8 more
Suppressed: java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/ALPN
at org.eclipse.jetty.alpn.java.client.OpenJDK8ClientALPNProcessor.init(OpenJDK8ClientALPNProcessor.java:42)
at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.(ALPNClientConnectionFactory.java:77)
... 8 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.alpn.ALPN
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 10 more
You're using wrong alpn-boot library, you're trying to use 9.4.9.v20180320 which requires Java 9 and you're using Java 8.
there is a table at the bottom of this page: https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html
where you can match the relevant version of the alpn-boot library with your Java 8 version.
Moreover, you should not be placing the .jar to JMeter's "lib" folder, you should set the relevant -Xbootclasspath/p:/path/to/alpn-boot.jar JVM property.
More information:
HTTP2 Plugin for JMeter
The New HTTP/2 Plugin for JMeter

Java 12 JMeter 5 HTTP/2 request java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory

I am using Java 12, JMeter 5.1.1 on Ubuntu 9.0.4 and bumps into the following exception when trying to send HTTP/2 request:
Response code: Non HTTP response code: java.util.concurrent.ExecutionException
Response message: Non HTTP response message: java.lang.IllegalStateException: No Client ALPNProcessors!
And this stack trace in the response body:
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: No Client ALPNProcessors!
at org.eclipse.jetty.util.FuturePromise.get(FuturePromise.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Connection.connect(HTTP2Connection.java:68)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.setConnection(HTTP2Request.java:278)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:115)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.IllegalStateException: No Client ALPNProcessors!
at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.<init>(ALPNClientConnectionFactory.java:54)
at org.eclipse.jetty.http2.client.HTTP2Client.lambda$doStart$1(HTTP2Client.java:155)
at org.eclipse.jetty.http2.client.HTTP2Client$ClientSelectorManager.newConnection(HTTP2Client.java:438)
at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:222)
at org.eclipse.jetty.io.ManagedSelector.access$1500(ManagedSelector.java:60)
at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:825)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:672)
... 1 more
JMeter 5.1.1 comes with jetty-alpn-client-9.4.9.v20180320.jar by default.
I then download the jetty alpn java client library from http://central.maven.org/maven2/org/eclipse/jetty/jetty-alpn-java-client/ and put that into jmeter installed lib/ folder and results in this exception:
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory
at org.eclipse.jetty.util.FuturePromise.get(FuturePromise.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Connection.connect(HTTP2Connection.java:68)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.setConnection(HTTP2Request.java:278)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:115)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory
at org.eclipse.jetty.http2.client.HTTP2Client.lambda$doStart$1(HTTP2Client.java:155)
at org.eclipse.jetty.http2.client.HTTP2Client$ClientSelectorManager.newConnection(HTTP2Client.java:438)
at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:222)
at org.eclipse.jetty.io.ManagedSelector.access$1500(ManagedSelector.java:60)
at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:825)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:672)
... 1 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 8 more
I switched to Java 11 but get the same error.
Any advice and insight is appreciated.
No Client ALPNProcessors! is a message from the Jetty libraries that handle ALPN.
Because you are running in JDK 12 (and I don't think there is any big difference with JDK 11, so JDK 12 should be fine), you must have the jetty-alpn-java-client jar in the classpath, so that the Jetty libraries will find an implementation of the ALPNProcessor.Client class (via the ServiceLoader mechanism) that, as the error shows, cannot be found.
You don't detail how you are setting up TLS, etc. and I would have expected JMeter to have the jetty-alpn-java-client jar in the classpath already, but evidently there is something wrong in your setup (or in JMeter's).
I would double check how JMeter configures TLS; if it is using the standard JDK implementation, then it must have the jetty-alpn-java-client jar in the classpath.
If JMeter is using other TLS implementations (e.g. Conscrypt), then the Jetty project provides similar libraries (e.g. jetty-alpn-conscrypt-client jar) that similarly should be in the classpath.
JMeter 5 doesn't officially support Java 12
JMeter 5.0 officially requires Java 8 or 9, although later versions may be unofficially compatible. From our internal testing, JMeter will run on Java 11
Also in JMeter group announcement:
JMeter 5.0 is tested on Java 8 to 10, Java 11 should also work.
Notice also Java 12 isn't Long-Term-Support release
Java SE 11 however is an LTS release, and therefore Oracle Customers will receive Oracle Premier Support and periodic update releases, even though Java SE 12 was released
Solution: Download http://central.maven.org/maven2/org/eclipse/jetty/jetty-alpn-java-client/ and put in the installed jmeter lib/ folder. JMeter only comes installed with jetty-alpn-client which is not enough.

Failed to start application WAS 8.5.5.10

My application failed to start with the below error on WebSphere Application Server 8.5.5.10 which was working on 8.5.5.5
[1/2/17 17:54:20:842 IST] 0000006f ecs W com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl scanJAR unable to open input stream for resource org/reflections/scanners/MemberUsageScanner$1.class in archive WEB-INF/lib/reflections-0.9.10.jar
java.lang.RuntimeException
at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
The application failes to start after deployment
The application failes to start when JVM starts
The same application is getting started manually from console.
When i put reflections-0.9.10.jar in shared library i am getting Failed to load webapp
Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: null
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:177)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:901)
... 73 more
Caused by: java.lang.RuntimeException
at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
5.The application started when i move all the third party jars to shared libraries.
upgrade to 8.5.5.11, issue fixed in latest fixpack
http://www-01.ibm.com/support/docview.wss?uid=swg1PI60902
If you find any other solution in 8.5.5.10, please do let me know
The SystemOut.log file for the application server will indicate which version of the Java (JVM) is in-use. Verify whether the version of the class files in reflections-0.9.10.jar is greater than the version of the server JVM. The error you posted will occur whenever this condition is true.

Sonar-Runner not starting (c#)

When I start Sonar runner, I am getting this exception. It is not working and not starting. What can I do? Please help me ,thank you. (I am trying to configure Sonar 3.2 in my Windows 7 64 bit operating system)
C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runner-2.0\bin>sonar-runner
ôSONAR_RUNNER_HOME = C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runner-2.0\
bin\..ö
ôPROJECT_HOME = C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runner-2.0\bin\.
.ö
Runner configuration file: C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runne
r-2.0\bin\..\conf\sonar-runner.properties
Project configuration file: NONE
Runner version: 2.0
Java version: 1.7.0_07, vendor: Oracle Corporation
OS name: "Windows 7", version: "6.1", arch: "amd64"
Default locale: "en_US", source code encoding: "windows-1254" (analysis is platf
orm dependent)
Server: http://localhost:9000
Work directory: C:\Users\ea\Desktop\sonar-runner-2.0\sonarrunner 2.0\.sonar
13:59:34.477 [main] WARN o.s.r.i.batch.SonarProjectBuilder - /!\ The 'sources'
property is deprecated and is replaced by 'sonar.sources'. Don't forget to updat
e your files.
13:59:36.207 WARN .c.p.DefaultDatabase - H2 database should be used for evaluat
ion purpose only
13:59:36.207 INFO o.s.c.p.Database - Create JDBC datasource to url jdbc:h2:
tcp://localhost/sonar
13:59:37.390 INFO actDatabaseConnector - Initializing Hibernate
13:59:38.851 WARN StudioProjectBuilder - The specified '.sln' path does not poi
nt to an existing file: C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runner-2
.0\bin\..\sinav_bildir
Total time: 7.632s
Final Memory: 7M/171M
Exception in thread "main" org.sonar.runner.RunnerException: org.picocontainer.P
icoLifecycleException: PicoLifecycleException: method 'public final void org.son
ar.api.batch.bootstrap.ProjectBuilder.start()', instance 'org.sonar.plugins.csha
rp.core.VisualStudioProjectBuilder#7986f7af, java.lang.RuntimeException: wrapper
at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
at org.sonar.runner.Runner.execute(Runner.java:151)
at org.sonar.runner.Main.execute(Main.java:84)
at org.sonar.runner.Main.main(Main.java:56)
Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: met
hod 'public final void org.sonar.api.batch.bootstrap.ProjectBuilder.start()', in
stance 'org.sonar.plugins.csharp.core.VisualStudioProjectBuilder#7986f7af, java.
lang.RuntimeException: wrapper
at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFa
iled(NullComponentMonitor.java:77)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr
owReflectionLifecycleException(ReflectionLifecycleStrategy.java:132)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(
ReflectionLifecycleStrategy.java:115)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(Reflect
ionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter
.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.j
ava:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Store
d.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(Defaul
tPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoConta
iner.java:1002)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.jav
a:760)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:70)
at org.sonar.batch.bootstrap.Module.start(Module.java:82)
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.jav
a:121)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.Batch.execute(Batch.java:104)
at org.sonar.runner.internal.batch.Launcher.executeBatch(Launcher.java:6
9)
at org.sonar.runner.internal.batch.Launcher.execute(Launcher.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonar.runner.Runner.delegateExecution(Runner.java:285)
... 3 more
Caused by: java.lang.RuntimeException: wrapper
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr
owReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)
... 24 more
Caused by: org.sonar.api.utils.SonarException: No valid '.sln' file could be fou
nd. Please read the previous log messages to know more.
at org.sonar.plugins.csharp.core.VisualStudioProjectBuilder.createVisual
StudioSolution(VisualStudioProjectBuilder.java:169)
at org.sonar.plugins.csharp.core.VisualStudioProjectBuilder.build(Visual
StudioProjectBuilder.java:82)
at org.sonar.api.batch.bootstrap.ProjectBuilder.start(ProjectBuilder.jav
a:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(
ReflectionLifecycleStrategy.java:110)
... 23 more
Sonar-Project.Properties;
# Project identification
sonar.projectKey=DMG:WindowsFormsApplication2
sonar.projectVersion=1.0-SNAPSHOT
sonar.projectName=my c #
sonar.projectVersion=1.0
# Info required for Sonar
sources=.
sonar.language=cs
#Core C# Settings
sonar.dotnet.visualstudio.solution.file=C:/Users/ea/Desktop/sonar-runner-2.0/sonar-runner- 2.0/bin/WindowsFormsApplication2.sln
#sonar.silverlight.4.mscorlib.location=C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v4.0sonar.dotnet.excludeGeneratedCode=true
sonar.dotnet.4.0.sdk.directory=C:/WIndows/Microsoft.NET/Framework/v4.0.30319
sonar.dotnet.version=4.0
#Gendarme
sonar.gendarme.assemblies=\build\\DmgTech*.*
sonar.gendarme.mode=skip
# Gallio
sonar.gallio.mode=skip
# FXCop
sonar.fxcop.installDirectory=C:/Program Files/Microsoft FxCop 1.36
sonar.fxcop.assemblyDependencyDirectories=/bin/Debug
#StyleCop
sonar.stylecop.mode=skip
My folder;
WindowsFormsApplication2
WindowsFormsApplication2.sln
sonar-project.properties
sonar-runner.bat
The message is quite straightforward:
No valid '.sln' file could be found. Please read the previous log messages to know more.
This is because "sonar.dotnet.visualstudio.solution.file" property must point an SLN file, not to a folder like what you specified.
What's more, there are too many useless properties in your "sonar-project.properties" file:
No need to specify the following properties as you set it to their default values:
sonar.host.url
sonar.jdbc.username
sonar.jdbc.password
You specified "sonar.jdbc.username" and "sonar.jdbc.password" twice...

Sonar and C#: Download of guava-10.0.1.jar fails due to timeout

we have Sonar set up to run on a separate server. It does, and a client application (sonar-runner) can connect successfully to it. However, the run interrupts with the following exception:
Runner configuration file: C:\Program Files (x86)\sonar-runner-1.3\bin\..\conf\sonar-runner.properties
Project configuration file: C:\project\subproject\sonar-project.properties
Runner version: 1.3
Java version: 1.6.0_33, vendor: Sun Microsystems Inc.
OS name: "Windows 7", version: "6.1", arch: "x86"
Server: http://<serverip>:80
Work directory: C:\project\subproject\.sonar
Total time: 1:30.902s
Final Memory: 0M/15M
Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.sonar.batch.bootstrapper.BootstrapException: Fail to download the file: http://<serverip>:80/batch/guava-10.0.1.jar
at org.sonar.batch.bootstrapper.Bootstrapper.downloadBatchFiles(Bootstrapper.java:164)
at org.sonar.batch.bootstrapper.Bootstrapper.createClassLoader(Bootstrapper.java:87)
at org.sonar.runner.Runner.createClassLoader(Runner.java:155)
at org.sonar.runner.Runner.execute(Runner.java:78)
at org.sonar.runner.Main.main(Main.java:61)
Caused by: org.sonar.batch.bootstrapper.BootstrapException: Fail to download the file: http://<serverip>:80/batch/guava-10.0.1.jar
at org.sonar.batch.bootstrapper.Bootstrapper.remoteContentToFile(Bootstrapper.java:113)
at org.sonar.batch.bootstrapper.Bootstrapper.downloadBatchFiles(Bootstrapper.java:159)
... 4 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.http.ChunkedInputStream.readAheadBlocking(Unknown Source)
at sun.net.www.http.ChunkedInputStream.readAhead(Unknown Source)
at sun.net.www.http.ChunkedInputStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
at org.sonar.batch.bootstrapper.BootstrapperIOUtils.copyLarge(BootstrapperIOUtils.java:63)
at org.sonar.batch.bootstrapper.Bootstrapper.remoteContentToFile(Bootstrapper.java:109)
... 5 more
I can reproduce this with a normal browser. Retrieving the file opens the download manager, however, it takes up to 5 minutes until the file finally downloads (it's only 1.5 megs). Other files that are retrieved by the sonar-runner or using a browser do not have this problem.
The sonar logging doesn't seem to know that there is a problem. Downloads are not logged in the sonar.log file, neither successful ones nor the unsuccessful one. syslog doesn't contain any hints to problems.
had similar problem with sonar+php plugin and eset smart security. Had to disable filtering on 127.0.0.1 in filtering protocols section. It was happening randomly on different jars. It was happening on both solar ant task and solar runner
So, the solution was not something on the server, but rather a client-side problem. Kaspersky Endpoint Security seems to have a bug/feature that it needs to scan everything going over the network, and somehow this one JAR file triggered a multiple-minute-long delay while the file was being scanned.

Resources