-
Bug
-
Resolution: Fixed
-
Critical
-
6.0.0.FL
-
None
-
None
-
None
Steps to Reproduce
- load the zul
Current Result
Caused by:
java.lang.ClassNotFoundException: com.google.common.util.concurrent.internal.InternalFutureFailureAccess
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:538)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1022)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
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 org.eclipse.jetty.webapp.WebAppClassLoader.foundClass(WebAppClassLoader.java:642)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource(WebAppClassLoader.java:615)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:529)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1022)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
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 org.eclipse.jetty.webapp.WebAppClassLoader.foundClass(WebAppClassLoader.java:642)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource(WebAppClassLoader.java:615)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:529)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1022)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
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 org.eclipse.jetty.webapp.WebAppClassLoader.foundClass(WebAppClassLoader.java:642)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource(WebAppClassLoader.java:615)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:529)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3512)
at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3516)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2169)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2080)
at com.google.common.cache.LocalCache.get(LocalCache.java:4012)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4922)
at org.zkoss.zk.ui.ext.Scopes.getLockForScopeIfAny(Scopes.java:90)
at org.zkoss.zk.ui.event.impl.EventQueueProviderImpl.lookup0(EventQueueProviderImpl.java:101)
at org.zkoss.zk.ui.event.impl.EventQueueProviderImpl.lookup(EventQueueProviderImpl.java:63)
at org.zkoss.zkmax.ui.event.impl.EventQueueProviderImpl.lookup(EventQueueProviderImpl.java:57)
at org.zkoss.zk.ui.event.EventQueues.lookup(EventQueues.java:130)
at io.keikai.model.impl.EventQueueListenerAdaptor.addEventListener(EventQueueListenerAdaptor.java:53)
at io.keikai.model.impl.BookImpl.addEventListener(BookImpl.java:1287)
at io.keikai.ui.Spreadsheet.lambda$initBook0$7(Spreadsheet.java:873)
at io.keikai.ui.Spreadsheet.guardWithWriteLock(Spreadsheet.java:785)
at io.keikai.ui.Spreadsheet.initBook0(Spreadsheet.java:872)
at io.keikai.ui.Spreadsheet.setSBook(Spreadsheet.java:753)
at io.keikai.ui.Spreadsheet.setBook(Spreadsheet.java:3684)
at bug.CoeditController.doAfterCompose(CoeditController.java:30)
at org.zkoss.zk.ui.impl.UiEngineImpl.doAfterCompose(UiEngineImpl.java:621)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:944)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:891)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:778)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:838)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:796)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:742)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:465)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:373)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:253)
Expected Result
no error
Debug Information
- can be solved by manually including com.google.guava:guava:32.1.3-jre
- I can't find a way to reproduce it without keikai, but I believe it can also happen in zk (since a user mentioned it)
Root cause
But zk 10 excludes all its dependencies
<dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>32.1.2-jre</version> <scope>compile</scope> <exclusions> <exclusion> <artifactId>*</artifactId> <groupId>*</groupId> </exclusion> </exclusions> </dependency>
- https://github.com/google/guava/releases/tag/v32.1.2 mentioned that failureaccess is required
Guava requires one runtime dependency, which you can download here:
failureaccess-1.0.1.jar
Workaround
<dependency> <groupId>com.google.guava</groupId> <artifactId>failureaccess</artifactId> <version>1.0</version> </dependency>
- relates to
-
ZK-5667 ZK 3rd library dependency issue in ZK 10
- Open