Unable to run Micronaut apps - gradle

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

Related

deploy ESB ROUTE on Jenkins using nexus3

ive an error while deployment from Jenkins. I am trying to deploy an ESB route using Nexus 3.
Here is the error message :
MetaServlet ReturnCode= 170
Error Executing action 'requestDeployEsbTask'. Error= Error while esb deploying the task, org.apache.karaf.features.internal.util.MultiException: Error:
Unable to create resource for bundle
 
I'm here if you need some more information. I wanna understand how to fix this error to create the ressource bundle.
Here are some more logs :
Caused by: org.osgi.framework.BundleException: Unable to build resource for mvn:org.myorg.esb_route.route/route_esb/1.0.0: Unsupported 'Bundle-ManifestVersion' value: 1
      at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:82)
      at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:71)
      at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:822)
      ... 14 more
   Caused by: org.osgi.framework.BundleException: Unsupported 'Bundle-ManifestVersion' value: 1
      at org.apache.felix.utils.resource.ResourceBuilder.doBuild(ResourceBuilder.java:90)
      at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:80)
      ... 16 more
I do not understand the error : org.osgi.framework.BundleException: Unsupported 'Bundle-ManifestVersion' value: 1
If someone can help me to understand what i need to change in my conf to deploy it would be bnice :)

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?

Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'

Our Jenkins has a Maven/Tycho build using Java8 that worked perfectly in February, but stopped working now in April. (Since it was not run during this interval, I'm not sure when it stopped working exactly.)
The exception that gets thrown right after downloading the p2 repositories (or maybe right in the middle) is:
[WARNING] Error initializing: org.eclipse.tycho.p2.resolver.P2DependencyResolver#18bef28
java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted (DefaultEquinoxEmbedder.java:312)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:286)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:281)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.initialize (P2DependencyResolver.java:429)
Caused by: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:302)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:281)
at org.eclipse.tycho.osgi.configuration.OSGiProxyConfigurator.afterFrameworkStarted (OSGiProxyConfigurator.java:41)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.doStart (DefaultEquinoxEmbedder.java:185)
...and...
[WARNING] Error injecting: org.eclipse.tycho.p2.resolver.P2DependencyResolver
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error notifying InjectionListener org.eclipse.sisu.plexus.PlexusBeanBinder#1b6fe69 of org.eclipse.tycho.p2.resolver.P2DependencyResolver.
Reason: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
while locating org.eclipse.tycho.p2.resolver.P2DependencyResolver
1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
...and of course...
[ERROR] Internal error: java.lang.RuntimeException: Could not instantiate required component: com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) Error notifying InjectionListener org.eclipse.sisu.plexus.PlexusBeanBinder#1b6fe69 of org.eclipse.tycho.p2.resolver.P2DependencyResolver.
[ERROR] Reason: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
[ERROR] while locating org.eclipse.tycho.p2.resolver.P2DependencyResolver
[ERROR] at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:1.3.0, parent: sun.misc.Launcher$AppClassLoader#647e05] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.eclipse.tycho.core.DependencyResolver annotated with #com.google.inject.name.Named(value=p2)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.eclipse.tycho.core.DependencyResolver
[ERROR] roleHint: p2
[ERROR] -> [Help 1]
My first thought was that Maven takes new releases of it's plug-ins, but there are no versions missing in the pom.xml and Maven does not warn about it either.
I tried updating from Tycho 0.22 to 0.26 to 1.3, but neither version worked.
I tried running the build with Maven 3.0 and 3.6, but neither worked.
I tried Java 8 with 32bit and 64bit, and Java 11.
Now I have no idea where to even start to search for the source of the problem. Can anyone shed some light on this?
(If you need some more information, just ask. The files are pretty long, so I'd rather not copy all of them into this question before narrowing down where the problem might be.)
It helped for me to clean local maven repository.
Normally its located in <User-home>/.m2
HTH
I think I have similar setup as yours: An Eclipse RCP project which should be build on Jenkins in a Docker container by Maven/Tycho.
The following issue gave me a hint in the right direction: https://bugs.eclipse.org/bugs/show_bug.cgi?id=552877
When I ran Maven with -X I got the following debug-output:
[DEBUG] Using local repository at ?/.m2/repository
This led me to the following question: Why does maven use "?" as my home directory
But additionally to the -s argument I also needed to set the user.home parameter explicitly. (But that is probably only needed because I have not set the local repository location in the settings.xml)
This finally results in this Maven call: mvn -B clean verify --fail-at-end -s /some/folder/settings.xml -Duser.home=/another/folder

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