问题
When migrating our application from weblogic 12.1.3 to 12.2.1 we run into the following stacktrace during deployment of our EAR:
<2018-06-05 16:17:03,765> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "518856605645758" for task "2" on [partition-name: DOMAIN]. Error is: "java.lang.ClassNotFoundException: afu.com.sun.source.tree.Tree$Kind"
java.lang.ClassNotFoundException: afu.com.sun.source.tree.Tree$Kind
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1029)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:104)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
Truncated. see log file for complete stacktrace
I cannot find anything on the internet about this class and who might be using it, and so I have no clue how to solve this.
Question: Where does the afu.com.sun.* package come from, and how do I get rid of the dependency on this Tree class?
回答1:
This is related to the checker framework (https://checkerframework.org/). You probably just need to add a dependency to your classpath: org.checkerframework:checker-qual, or org.checkerframework:checker-compat-qual for Java 6 or 7.
回答2:
I managed to fix this by updating our dependency on Guava from 23.5-jre to 24.1-jre. This adds a transitive dependency to the checker framework that Cliffred mentioned.
来源:https://stackoverflow.com/questions/50717324/java-lang-classnotfoundexception-afu-com-sun-source-tree-treekind