Are Guava-11.0.2.jar conflicting with com.google.common_1.0.0.0_0-6.jar?

烈酒焚心 提交于 2020-01-11 10:04:07

问题


I have a problem to deploy an application on weblogic server, after a discussion here on stackoverflow

i realized that the problem is that weblogic 12c is using a lib file com.google.common_1.0.0.0_0-6.jar , and my application is using Guava-11.0.2.jar, and it sound for me like they are conflicting, tried to search on google but i have no idea what to do, whats the proper solution to solve it?


回答1:


I came across the same problem, what I did was, I replaced the com.google.common_1.0.0.0_0-6.jar file from weblogic-home/modules with the latest Guava that's currently guava-13.0.1.jar, but then i saw that weblogic is looking for a file with the name com.google.common.... so I just rename the Guava file to com.google.common_1.0.0.0_0-6.jar, and it worked for me.

Hope it will work for you as well!




回答2:


It is a well known problem Weblogic. It solution is to use a setting file weblogic.xml, in which it is possible to specify the boot sequence libraries by classloader.




回答3:


The problem is easily resolved without such hacks as the one suggested by @meilechh. You can add prefer-application-packages to your weblogic.xml or weblogic-application.xml.

Look at http://docs.oracle.com/middleware/1212/wls/WLPRG/classloading.htm#WLPRG315 for the reference.



来源:https://stackoverflow.com/questions/13386474/are-guava-11-0-2-jar-conflicting-with-com-google-common-1-0-0-0-0-6-jar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!