After updating the pom.xml for my application from JCR-OAK 1.44.0 to 1.46.0, my application failed to compile due to the Guava library not being found. I also see from the 1.46 changelog:
[OAK-9994] - avoid leaking out transitive dependencies to Guava I assumed the dependency was no longer automatically resolved, so I added an entry for the latest Guava version 31.1-jre, and the code compiles again. However it looks like JCR oak needs a specific version of Guava to function correctly, or it will fail. (If I change the version to 15.0, it works). I'm not sure what the intent of all the changes are in this release, but I think the old behavior of providing the dependency of the version required by oak is the better approach. Error with version 31.1-jre: *************************** APPLICATION FAILED TO START *************************** Description: An attempt was made to call a method that does not exist. The attempt was made from the following location: org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.getExecutor(DocumentNodeStoreBuilder.java:496) The following method did not exist: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService; The calling method's class, org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder, was loaded from the following location: jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ wms.dm/WEB-INF/lib/oak-store-document-1.46.0.jar!/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.class The called method's class, com.google.common.util.concurrent.MoreExecutors, is available from the following locations: jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ wms.dm/WEB-INF/lib/guava-31.1-jre.jar!/com/google/common/util/concurrent/MoreExecutors.class The called method's class hierarchy was loaded from the following locations: com.google.common.util.concurrent.MoreExecutors: file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ wms.dm/WEB-INF/lib/guava-31.1-jre.jar Action: Correct the classpath of your application so that it contains compatible versions of the classes org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder and com.google.common.util.concurrent.MoreExecutors