We are using SonarQube for code analysis. Our projects are developed using C# and gitlab CI build pipeline.
Command used to scan the code:
dotnet sonarscanner begin /k:xxxxxx
/d:sonar.host.url=https://sonar.xxxxx.com/ /d:sonar.login=<<login id>> /d:sonar.verbose=true /d:sonar.cs.opencover.reportsPaths="tmp/xx/testresults/coverage.opencover.xml" /d:sonar.coverage.exclusions="*Tests.cs,*Integration.cs" - .
Now job failing with below error:
10:46:41.660 ERROR: Error during SonarQube Scanner execution
10:46:41.660 ERROR: Unable to load component class org.sonar.scanner.report.ActiveRulesPublisher
10:46:41.660 ERROR: Caused by: Unable to load component interface org.sonar.api.batch.rule.ActiveRules
10:46:41.660 ERROR: Caused by: Failed to load quality profiles
10:46:41.661 ERROR: Caused by: timeout
10:46:41.661 ERROR:
Any Idea what can be wrong?
Related
I am exploring security oauth2.0 in micronaut framework with groovy.I generated project from micronaut site.
https://micronaut.io/launch/
Micronaut Version : 2.5.9
Language : Groovy
Build : Gradle
Test Framework : JUnit
When i got below error after running apps
[main] ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: Bean definition [io.micronaut.security.oauth2.configuration.OauthClientConfigurationProperties] could not be loaded: Error instantiating bean of type [io.micronaut.security.oauth2.configuration.OauthClientConfigurationProperties]: Could not resolve placeholder ${OAUTH_CLIENT_ID}
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [io.micronaut.security.oauth2.configuration.OauthClientConfigurationProperties] could not be loaded: Error instantiating bean of type [io.micronaut.security.oauth2.configuration.OauthClientConfigurationProperties]: Could not resolve placeholder ${OAUTH_CLIENT_ID}
at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1568)
at io.micronaut.context.DefaultApplicationContext.initializeContext(DefaultApplicationContext.java:234)
at io.micronaut.context.DefaultBeanContext.readAllBeanDefinitionClasses(DefaultBeanContext.java:2905)
at io.micronaut.context.DefaultBeanContext.start(DefaultBeanContext.java:231)
at io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:180)
at io.micronaut.runtime.Micronaut.start(Micronaut.java:71)
at io.micronaut.runtime.Micronaut.run(Micronaut.java:311)
at io.micronaut.runtime.Micronaut.run(Micronaut.java:297)
at com.example.Application.main(Application.groovy:9)
Caused by: io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type [io.micronaut.security.oauth2.configuration.OauthClientConfigurationProperties]: Could not resolve placeholder ${OAUTH_CLIENT_ID}
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2008)
at io.micronaut.context.DefaultBeanContext.createAndRegisterSingletonInternal(DefaultBeanContext.java:2768)
at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:2754)
at io.micronaut.context.DefaultBeanContext.loadContextScopeBean(DefaultBeanContext.java:2292)
at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1562)
... 8 common frames omitted
Caused by: io.micronaut.context.exceptions.ConfigurationException: Could not resolve placeholder ${OAUTH_CLIENT_ID}
at io.micronaut.context.env.DefaultPropertyPlaceholderResolver$PlaceholderSegment.getValue(DefaultPropertyPlaceholderResolver.java:260)
at io.micronaut.context.env.DefaultPropertyPlaceholderResolver.resolveRequiredPlaceholders(DefaultPropertyPlaceholderResolver.java:86)
at io.micronaut.context.env.PropertySourcePropertyResolver.resolvePlaceHoldersIfNecessary(PropertySourcePropertyResolver.java:799)
at io.micronaut.context.env.PropertySourcePropertyResolver.getProperty(PropertySourcePropertyResolver.java:303)
at io.micronaut.context.DefaultApplicationContext.getProperty(DefaultApplicationContext.java:200)
at io.micronaut.context.AbstractBeanDefinition.resolveValue(AbstractBeanDefinition.java:1946)
at io.micronaut.context.AbstractBeanDefinition.getValueForMethodArgument(AbstractBeanDefinition.java:793)
at io.micronaut.security.oauth2.configuration.$OauthClientConfigurationPropertiesDefinition.injectBean(Unknown Source)
at io.micronaut.security.oauth2.configuration.$OauthClientConfigurationPropertiesDefinition.doBuild(Unknown Source)
at io.micronaut.context.AbstractParametrizedBeanDefinition.build(AbstractParametrizedBeanDefinition.java:118)
at io.micronaut.context.BeanDefinitionDelegate.build(BeanDefinitionDelegate.java:149)
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1979)
... 12 common frames omitted
> Task :run FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':run'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_121\bin\java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 14s
3 actionable tasks: 3 executed
Provide the oauth configuration as specified in the docs:
https://guides.micronaut.io/latest/micronaut-oauth2-github-gradle-java.html#oauth-2-0-configuration
i.e. client-id: '${OAUTH_CLIENT_ID:defaultToken}'
Replace defaultToken with whatever your token is
I am new to graph databases and I am trying to start the Gremlin Server using the command: bin\gremlin-server.bat
But, I am getting this error:
Error: Could not find or load main class
org.apache.tinkerpop.gremlin.server.GremlinServer
Caused by: java.lang.ClassNotFoundException: org.apache.tinkerpop.gremlin.server.GremlinServer
NOTE: -i is deprecated. Please update your scripts. Using 'install' command...
Error: Could not find or load main class org.apache.tinkerpop.gremlin.server.util.GremlinServerInstall
Caused by: java.lang.ClassNotFoundException: org.apache.tinkerpop.gremlin.server.util.GremlinServerInstall
Can anyone help me with this ?
When we build our application using gradle, it is throwing the exception below:
org.gradle.internal.event.ListenerNotificationException: Failed to notify build listener.
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:86)
and Caused by: java.lang.OutOfMemoryError: Java heap space.
How to resolve this error to have clean build?
We currently use the MSBuild Scanner for our static code analysis at build time via bamboo. The Bamboo plug-in as far as I can tell does not support the scanner at this time so I am using command line.
I want to enable it for branches so we can gather more information within the company, however when I run the following command:
msbuild-scanner begin /k:"project" /v:${bamboo.version}.${bamboo.buildNumber} /n:"project" /d:sonar.branch=${bamboo.shortPlanName}
I get the below error:
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:100)
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:53)
Caused by: Insufficient privileges
ERROR:
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
Post-processing failed. Exit code: 1
This is caused because the project:branch combination doesn't exist. If I create the project and re-run it works.
Is there a way Sonarqube can allow project creation at the time of build?
You need to grant the technical user running analysis the Create Projects permission.
I am getting below error in neo4j console.log after copying jar files from dependency folder of elasticsearch to plugin folder of neo4j
2015-12-11 08:08:21.697+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#623dc0b8' was successfully initialized, but failed to start. Please see attach
ed cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#623dc0b8' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#623dc0b8' was successfully initialized, but failed to start. Please see attached cause exceptio
n.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:67)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:234)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:97)
at org.neo4j.server.CommunityBootstrapper.start(CommunityBootstrapper.java:48)
at org.neo4j.server.CommunityBootstrapper.main(CommunityBootstrapper.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase#623dc0b8' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:462)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:194)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /var/lib/neo4j/data/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:143)
at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:43)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
at org.neo4j.server.CommunityNeoServer$1.newGraphDatabase(CommunityNeoServer.java:66)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:95)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions#28d2afd8' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:434)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:66)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:102)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:139)
... 10 more
Caused by: org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: java.lang.IllegalArgumentException: No dependency satisfies type class org.neo4j.kernel.impl.util.StringLogger
at org.neo4j.kernel.impl.util.DependenciesProxy$ProxyHandler.invoke(DependenciesProxy.java:79)
at com.sun.proxy.$Proxy6.getStringLogger(Unknown Source)
at org.neo4j.elasticsearch.ElasticSearchKernelExtensionFactory.newKernelExtension(ElasticSearchKernelExtensionFactory.java:39)
at org.neo4j.elasticsearch.ElasticSearchKernelExtensionFactory.newKernelExtension(ElasticSearchKernelExtensionFactory.java:20)
Your problem could be because Neo4j and ElasticSearch using different version of Lucene.
In JVM you can't have one jar with two different versions.