You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "jorgeeflorez ." <jo...@gmail.com> on 2020/01/18 21:22:29 UTC

Import problem

Hello all,
I am trying to build a standalone application that will use Jackrabbit and
Oak (a Gradle project). I am having problems when the node store is being
built. This is the stack trace:

Exception in thread "main" java.lang.NoSuchMethodError:
com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
at
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.getExecutor(DocumentNodeStoreBuilder.java:440)
at
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.<init>(DocumentNodeStore.java:554)

It seems a Guava related problem. I tried to declare the dependency in my
project to 15.0 version but the problem persists.

Any help is welcome.

Regards,

Jorge

Fwd: Import problem

Posted by "jorgeeflorez ." <jo...@gmail.com>.
Hi Marcel,
yes, I am using Gradle 4.10. But I am starting to think that's the problem.
I just created the same project in maven 3.3, included the Tika dependency
and the exception was gone.

BTW; why do you have a dependency on jackrabbit-core????
>
I just copied dependencies from another project I had. I can't remember why
I included jackrabbit core there :(

Thanks.



El mar., 21 ene. 2020 a las 1:10, Julian Reschke (<ju...@gmx.de>)
escribió:

> On 21.01.2020 02:15, jorgeeflorez . wrote:
> > Hi Marcel,
> > thank you for your reply. These are the dependencies I declared in my
> > project:
> >      implementation group: 'org.apache.jackrabbit', name:
> 'jackrabbit-core',
> > version: '2.20.0'
> >      implementation group: 'org.apache.jackrabbit', name: 'oak-core',
> > version: '1.22.0'
> >      implementation group: 'org.apache.jackrabbit', name: 'oak-jcr',
> > version: '1.22.0'
> >      implementation group: 'org.apache.jackrabbit', name: 'oak-lucene',
> > version: '1.22.0'
> >      implementation group: 'org.apache.jackrabbit', name:
> 'oak-auth-ldap',
> > version: '1.22.0'
> >      implementation group: 'org.mongodb', name: 'mongo-java-driver',
> > version: '3.8.2'
> >      implementation group: 'org.apache.tika', name: 'tika-parsers',
> version:
> > '1.23'
> >
> >      implementation group: 'org.slf4j', name: 'slf4j-api', version:
> '1.7.30'
> >      implementation group: 'org.slf4j', name: 'slf4j-log4j12', version:
> > '1.7.30'
> >      implementation group: 'org.slf4j', name: 'slf4j-log4j12', version:
> > '1.7.30'
> >      implementation group: 'log4j', name: 'log4j', version: '1.2.16'
> >
> > If I remove the tika dependency my Main class runs without problem. I
> > looked at the parent pom
> > <
> https://repo1.maven.org/maven2/org/apache/jackrabbit/oak-parent/1.22.0/oak-parent-1.22.0.pom
> >and
> > added the dependency (I know Tika is used in text extraction and index
> > related stuff).
> > Will everything work if I remove it?
> >
> > Regards.
> > Jorge
>
> With Maven, you could do "mvn dependency:tree" to see who's referencing
> what. But you use a different tool, right?
>
> BTW; why do you have a dependency on jackrabbit-core????
>
> Best regards, Julian
>

Re: Import problem

Posted by Julian Reschke <ju...@gmx.de>.
On 21.01.2020 02:15, jorgeeflorez . wrote:
> Hi Marcel,
> thank you for your reply. These are the dependencies I declared in my
> project:
>      implementation group: 'org.apache.jackrabbit', name: 'jackrabbit-core',
> version: '2.20.0'
>      implementation group: 'org.apache.jackrabbit', name: 'oak-core',
> version: '1.22.0'
>      implementation group: 'org.apache.jackrabbit', name: 'oak-jcr',
> version: '1.22.0'
>      implementation group: 'org.apache.jackrabbit', name: 'oak-lucene',
> version: '1.22.0'
>      implementation group: 'org.apache.jackrabbit', name: 'oak-auth-ldap',
> version: '1.22.0'
>      implementation group: 'org.mongodb', name: 'mongo-java-driver',
> version: '3.8.2'
>      implementation group: 'org.apache.tika', name: 'tika-parsers', version:
> '1.23'
>
>      implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
>      implementation group: 'org.slf4j', name: 'slf4j-log4j12', version:
> '1.7.30'
>      implementation group: 'org.slf4j', name: 'slf4j-log4j12', version:
> '1.7.30'
>      implementation group: 'log4j', name: 'log4j', version: '1.2.16'
>
> If I remove the tika dependency my Main class runs without problem. I
> looked at the parent pom
> <https://repo1.maven.org/maven2/org/apache/jackrabbit/oak-parent/1.22.0/oak-parent-1.22.0.pom>and
> added the dependency (I know Tika is used in text extraction and index
> related stuff).
> Will everything work if I remove it?
>
> Regards.
> Jorge

With Maven, you could do "mvn dependency:tree" to see who's referencing
what. But you use a different tool, right?

BTW; why do you have a dependency on jackrabbit-core????

Best regards, Julian

Re: Import problem

Posted by "jorgeeflorez ." <jo...@gmail.com>.
Hi Marcel,
thank you for your reply. These are the dependencies I declared in my
project:
    implementation group: 'org.apache.jackrabbit', name: 'jackrabbit-core',
version: '2.20.0'
    implementation group: 'org.apache.jackrabbit', name: 'oak-core',
version: '1.22.0'
    implementation group: 'org.apache.jackrabbit', name: 'oak-jcr',
version: '1.22.0'
    implementation group: 'org.apache.jackrabbit', name: 'oak-lucene',
version: '1.22.0'
    implementation group: 'org.apache.jackrabbit', name: 'oak-auth-ldap',
version: '1.22.0'
    implementation group: 'org.mongodb', name: 'mongo-java-driver',
version: '3.8.2'
    implementation group: 'org.apache.tika', name: 'tika-parsers', version:
'1.23'

    implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
    implementation group: 'org.slf4j', name: 'slf4j-log4j12', version:
'1.7.30'
    implementation group: 'org.slf4j', name: 'slf4j-log4j12', version:
'1.7.30'
    implementation group: 'log4j', name: 'log4j', version: '1.2.16'

If I remove the tika dependency my Main class runs without problem. I
looked at the parent pom
<https://repo1.maven.org/maven2/org/apache/jackrabbit/oak-parent/1.22.0/oak-parent-1.22.0.pom>and
added the dependency (I know Tika is used in text extraction and index
related stuff).
Will everything work if I remove it?

Regards.
Jorge

El lun., 20 ene. 2020 a las 2:48, Marcel Reutegger
(<mr...@adobe.com.invalid>) escribió:

> Hi,
>
> The Guava method sameThreadExecutor() was removed in version 21 [0].
> I assume there must be a more recent Guava version than 15 on your
> classpath.
>
> Regards
>  Marcel
>
> [0] https://github.com/google/guava/wiki/Release21#commonutilconcurrent
>
> On 18.01.20, 22:22, "jorgeeflorez ." <jo...@gmail.com>
> wrote:
>
>     Hello all,
>     I am trying to build a standalone application that will use Jackrabbit
> and
>     Oak (a Gradle project). I am having problems when the node store is
> being
>     built. This is the stack trace:
>
>     Exception in thread "main" java.lang.NoSuchMethodError:
>
> com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
>     at
>
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.getExecutor(DocumentNodeStoreBuilder.java:440)
>     at
>
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.<init>(DocumentNodeStore.java:554)
>
>     It seems a Guava related problem. I tried to declare the dependency in
> my
>     project to 15.0 version but the problem persists.
>
>     Any help is welcome.
>
>     Regards,
>
>     Jorge
>
>
>

Re: Import problem

Posted by Marcel Reutegger <mr...@adobe.com.INVALID>.
Hi,

The Guava method sameThreadExecutor() was removed in version 21 [0].
I assume there must be a more recent Guava version than 15 on your
classpath.

Regards
 Marcel

[0] https://github.com/google/guava/wiki/Release21#commonutilconcurrent

On 18.01.20, 22:22, "jorgeeflorez ." <jo...@gmail.com> wrote:

    Hello all,
    I am trying to build a standalone application that will use Jackrabbit and
    Oak (a Gradle project). I am having problems when the node store is being
    built. This is the stack trace:
    
    Exception in thread "main" java.lang.NoSuchMethodError:
    com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
    at
    org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.getExecutor(DocumentNodeStoreBuilder.java:440)
    at
    org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.<init>(DocumentNodeStore.java:554)
    
    It seems a Guava related problem. I tried to declare the dependency in my
    project to 15.0 version but the problem persists.
    
    Any help is welcome.
    
    Regards,
    
    Jorge