[ https://issues.apache.org/jira/browse/OAK-9024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089747#comment-17089747 ]
Manfred Baedke commented on OAK-9024: ------------------------------------- oak-solr-osgi embeds org.apache.zookeeper.zookeeper, because it's a runtime dependency of org.apache.solrsolr-core. zookeeper has a compile dependency to org.slf4j.slf4j-log4j12 (for some - certainly not good - reason). That's why we see that import. First I tried to embed the runtime dependencies transitively, which simply breaks the maven build. I don't understand why, the exception is {code} [ERROR] Manifest org.apache.jackrabbit:oak-solr-osgi:bundle:1.27-SNAPSHOT : Got unexpected exception while analyzing:org.apache.felix.scrplugin.SCRDescriptorException: Unable to load compiled class: com.google.common.collect.Constraints$NotNullConstraint at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:156) at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:146) at org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin.analyzeJar(SCRDescriptorBndPlugin.java:179) at aQute.bnd.osgi.Analyzer.doPlugins(Analyzer.java:879) at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:239) at aQute.bnd.osgi.Builder.analyze(Builder.java:408) at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:909) at aQute.bnd.osgi.Builder.build(Builder.java:118) at org.apache.felix.bundleplugin.ManifestPlugin.getAnalyzer(ManifestPlugin.java:308) at org.apache.felix.bundleplugin.ManifestPlugin.execute(ManifestPlugin.java:111) at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:364) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:954) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:192) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: java.lang.IllegalAccessError: class com.google.common.collect.Constraints$NotNullConstraint cannot access its superinterface com.google.common.collect.Constraint (com.google.common.collect.Constraints$NotNullConstraint is in unnamed module of loader java.net.URLClassLoader @368e9d5c; com.google.common.collect.Constraint is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @53c68ce) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:144) ... 32 more {code} That's probably why the runtime dependencies are added manually here. But adding the runtime dependency slf4j-log4j12 explicitly also helps. Find attached OAK-9024.patch, where I also updated the zookeeper version to match the solr version. > oak-solr-osgi imports org.slf4j.impl > ------------------------------------ > > Key: OAK-9024 > URL: https://issues.apache.org/jira/browse/OAK-9024 > Project: Jackrabbit Oak > Issue Type: Bug > Components: solr > Reporter: Julian Reschke > Assignee: Manfred Baedke > Priority: Minor > Fix For: 1.28.0 > > Attachments: OAK-9024.patch > > > From the manifest: > {{org.slf4j.impl;version="[1.6,2)"}} -- This message was sent by Atlassian Jira (v8.3.4#803005)