org.gradle.internal.event.ListenerNotificationException: Failed to notify build listener - gradle

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?

Related

Unable to run Micronaut apps

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

Quarkus migration, rest endpoints test problem - TestInstantiationException because of IllegalArgumentException

I am migrating application to quarkus. To current point with success. But I meet a problem which currently I can not bypass. I have rest endpoints and when I run app they are working perfectly. But when I am trying to use quarkus test framework to test them (#QuarkusTest) I am getting a bit nondescriptive error:
org.junit.jupiter.api.extension.TestInstantiationException: TestInstanceFactory [io.quarkus.test.junit.QuarkusTestExtension] failed to instantiate test class [com.daimler.pia.input.globus.resource.rest.impl.GreetingResourceTest]: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.deployment.steps.ConfigBuildSteps#generateConfigSources threw an exception: java.lang.IllegalArgumentException
at org.objectweb.asm.ClassVisitor.<init>(ClassVisitor.java:79)
at io.quarkus.gizmo.GizmoClassVisitor.<init>(GizmoClassVisitor.java:22)
at io.quarkus.gizmo.ClassCreator.writeTo(ClassCreator.java:150)
at io.quarkus.gizmo.ClassCreator.close(ClassCreator.java:203)
at io.quarkus.deployment.steps.ConfigBuildSteps.generateConfigSources(ConfigBuildSteps.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:915)
at io.quarkus.builder.BuildContext.run(BuildContext.java:279)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[...]
[error]: Build step io.quarkus.jaeger.deployment.JaegerProcessor#setupTracer threw an exception: java.lang.IllegalArgumentException
[...]
[error]: Build step io.quarkus.deployment.logging.LoggingResourceProcessor#setupLoggingRuntimeInit threw an exception: java.lang.IllegalArgumentException
[...]
basicly after each [error] stack trace is the same.
I found some cases on web describing problems with IllegalArgumentException and Quarkus, but usually there was some additional information.
I tried to move example from https://github.com/quarkusio/quarkus-quickstarts/tree/master/getting-started-testing to my project, result was the same. Unfortunetly for time being I do not have time to deal with it. But eventually I will have to go back o that problem. Therefore I have decided to post here my problem becasue I propabbly am missing some small thing (or not) and maybe someone already solve that problem.

sonarQube execution failed with “Error during SonarQube Scanner execution”

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?

Spring Build ContextLoads FAILED

I have a big problem. When I'm building my Project, I get this Error:
com.eurofunk.RaceComApplicationTests > contextLoads FAILED
java.lang.IllegalStateException
Caused by: org.springframework.beans.factory.BeanCreationException
Caused by: org.springframework.beans.BeanInstantiationException
Caused by: java.lang.UnsatisfiedLinkError
Could you please help me?
A UnsatisfiedLinkError is thrown
if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
So this does not look like a spring related problem.
It looks more like a problem with the JRE or a bean tries to find a native library which does not exist.

Unable to start neo4j afer copying elasticsearch jar files to plugin folder

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.

Resources