My PR adding the creation of a karaf feature repository file and
attaching the feature repository to the JDBC driver, has problems in
the JDBC driver team's RH EL7 build:
 https://github.com/pgjdbc/pgjdbc/pull/1554#issuecomment-535722657
 https://github.com/pgjdbc/pgjdbc/pull/1554#issuecomment-536174617

Does anyone see what the problem is?

(I have googled NoSuchElementException and karaf but haven't found
anything obvious).

Here are version numbers of maven and java (kind of old maven, but an as
recent as possible java 8) from the build machine and a stack trace from
the maven build failure:

mvn --version
Apache Maven 3.0.5 (Red Hat 3.0.5-17)
Maven home: /usr/share/maven
Java version: 1.8.0_222, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.el7_7.x86_64/jre
Default locale: en_CA, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", family: 
"unix"

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.karaf.tooling:karaf-maven-plugin:4.2.5:features-generate-descriptor 
(generate-features-file) on project postgresql: Unable to create features.xml 
file: org.apache.maven.plugin.MojoExecutionException: 
java.util.NoSuchElementException
role: org.eclipse.aether.RepositorySystem
roleHint:
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to create 
features.xml file: org.apache.maven.plugin.MojoExecutionException: 
java.util.NoSuchElementException
role: org.eclipse.aether.RepositorySystem
roleHint:
at 
org.apache.karaf.tooling.features.GenerateDescriptorMojo.execute(GenerateDescriptorMojo.java:364)
at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: 
java.util.NoSuchElementException
role: org.eclipse.aether.RepositorySystem
roleHint:
at 
org.apache.karaf.tooling.utils.DependencyHelperFactory.createDependencyHelper(DependencyHelperFactory.java:63)
at 
org.apache.karaf.tooling.features.GenerateDescriptorMojo.execute(GenerateDescriptorMojo.java:346)
... 21 more
Caused by: 
org.codehaus.plexus.component.repository.exception.ComponentLookupException: 
java.util.NoSuchElementException
role: org.eclipse.aether.RepositorySystem
roleHint:
at 
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:257)
at 
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)
at 
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:239)
at 
org.apache.karaf.tooling.utils.DependencyHelperFactory.createDependencyHelper(DependencyHelperFactory.java:58)
... 22 more
Caused by: java.util.NoSuchElementException
at 
org.sonatype.guice.plexus.locators.RealmFilter$FilteredItr.next(RealmFilter.java:96)
at 
org.sonatype.guice.plexus.locators.RealmFilter$FilteredItr.next(RealmFilter.java:54)
at 
org.sonatype.guice.plexus.locators.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:60)
at 
org.sonatype.guice.plexus.locators.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:48)
at 
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
... 25 more

Reply via email to