jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-3692) java.lang.NoClassDefFoundError: org/apache/lucene/index/sorter/Sorter$DocComparator
Date Tue, 01 Dec 2015 05:36:11 GMT

    [ https://issues.apache.org/jira/browse/OAK-3692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15033090#comment-15033090
] 

Chetan Mehrotra edited comment on OAK-3692 at 12/1/15 5:35 AM:
---------------------------------------------------------------

No clear answer here. As some of the packages are split between various lucene jars this problem
is coming now. And as we embed the Lucene classes and export them (for SPI implementations)
we need to manage the version. In addition we have baseline plugin watching us so need to
keep that happy ;). Bumping the version to 4.8.0 would not be logically correct as that somewhat
implies we are embedding Lucene 4.8 (which we are at 4.7.1). So if possible we need to avoid
that

Looking at baseline docs there is support for [filters|http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-3.0.0/doc/site/baseline-mojo.html#filters].
Possibly we can use that and have baseline plugin exclude scanning {{org.apache.lucene}} package.
So giving that a try (see [attached patch|^OAK-3692.patch])

{code:xml}
        <executions>
          <execution>
            <id>baseline</id>
            <configuration>
             <filters>
               <filter>org.apache.jackrabbit.oak.plugins.index.lucene.*</filter>
             </filters>
            </configuration>
          </execution>
        </executions>
{code}

Above config would force Maven bundle plugin to only consider the packages in oak-lucene.
So any change in that would still be detected but in other cases like in Lucene no check would
be performed. Can you give this a try?

Also just to note - Baseline check is disabled on branches. So you can still embed the dependency
there untill we figure out correct solution here


was (Author: chetanm):
No clear answer here. As some of the packages are split between various lucene jars this problem
is coming now. And as we embed the Lucene classes and export them (for SPI implementations)
we need to manage the version. In addition we have baseline plugin watching us so need to
keep that happy ;). Bumping the version to 4.8.0 would not be logically correct as that somewhat
implies we are embedding Lucene 4.8 (which we are at 4.7.1). So if possible we need to avoid
that

Looking at baseline docs there is support for [filters|http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-3.0.0/doc/site/baseline-mojo.html#filters].
Possibly we can use that and have baseline plugin exclude scanning {{org.apache.lucene}} package.
So give that a try.

Also just to note - Baseline check is disabled on branches. So you can still embed the dependency
there untill we figure out correct solution here

> java.lang.NoClassDefFoundError: org/apache/lucene/index/sorter/Sorter$DocComparator
> -----------------------------------------------------------------------------------
>
>                 Key: OAK-3692
>                 URL: https://issues.apache.org/jira/browse/OAK-3692
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Vikas Saurabh
>            Assignee: Vikas Saurabh
>            Priority: Blocker
>             Fix For: 1.3.12
>
>         Attachments: OAK-3692.patch
>
>
> I'm getting following exception while trying to include oak trunk build into AEM:
> {noformat}
> 27.11.2015 20:41:25.946 *ERROR* [oak-lucene-2] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvider
Uncaught exception in org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvider@36ba558b
> java.lang.NoClassDefFoundError: org/apache/lucene/index/sorter/Sorter$DocComparator
>                 at org.apache.jackrabbit.oak.plugins.index.lucene.util.SuggestHelper.getLookup(SuggestHelper.java:108)
>                 at org.apache.jackrabbit.oak.plugins.index.lucene.IndexNode.<init>(IndexNode.java:106)
>                 at org.apache.jackrabbit.oak.plugins.index.lucene.IndexNode.open(IndexNode.java:69)
>                 at org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker$1.leave(IndexTracker.java:98)
>                 at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:153)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord$3.childNodeChanged(MapRecord.java:444)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:487)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compareBranch(MapRecord.java:565)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:470)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:436)
>                 at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:583)
>                 at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord$2.childNodeChanged(MapRecord.java:403)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord$3.childNodeChanged(MapRecord.java:444)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:487)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:436)
>                 at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:394)
>                 at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:583)
>                 at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
>                 at org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker.update(IndexTracker.java:108)
>                 at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvider.contentChanged(LuceneIndexProvider.java:73)
>                 at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:131)
>                 at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:125)
>                 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>                 at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ClassNotFoundException: org.apache.lucene.index.sorter.Sorter$DocComparator
not found by org.apache.jackrabbit.oak-lucene [95]
>                 at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1573)
>                 at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
>                 at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
>                 at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>                 ... 27 common frames omitted
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message