Am 17.06.2024 um 17:28 schrieb Raffaele Gambelli:
Hi all,
I would like to start exploring oak, I've imported full project in Eclipse STS
but everywhere there is an import to org.apache.jackrabbit.guava I have errors.
Eclipse's Maven support doesn't understand the shade plugin, so
1) you need to build oak-shaded-guava with maven from the command line, and
2) *exclude* that module when you import the project (or remove it once
you imported "everything").
I have this kind of problem even if I create an hello-world project depending
on oak-core, when I run the application it says:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/jackrabbit/guava/common/base/Predicate
at
org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore.<init>(MemoryNodeStore.java:73)
at it.cegeka.oak.Hello.main(Hello.java:15)
Caused by: java.lang.ClassNotFoundException:
org.apache.jackrabbit.guava.common.base.Predicate
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 2 more
I cannot find any class named
org.apache.jackrabbit.guava.common.base.Predicates, could you help me?
It's generated using the "shade" plugin within oak-shaded-guava.
If I run mvn clean install or run my hello world main class from command line
it works, but I would like run it in eclipse to debug.
Thanks
Cordiali saluti / Best regards,
Raffaele Gambelli
Senior Java Developer
E raffaele.gambe...@cegeka.com<mailto:raffaele.gambe...@cegeka.com>
[CEGEKA] Via Ettore Cristoni, 84
IT-40033 Bologna (IT), Italy
T +39 02 2544271
WWW.CEGEKA.COM<https://www.cegeka.com>
[http://signature.cegeka.com/SignatureRO/bannerRO.jpg]
Best regards, Julian