weblogic 包加载与冲突等问题
2014-07-25 16:19
369 查看
问题1(org.apache.commons.lang.ClassUtils.getClass)
?在WEB-INF文件夹下,加上weblogic.xml,让WebLogic 10先引用WEB-INF下面的jar,内容如下:
?
http://hi.baidu.com/tk_ayj/blog/item/b5865bce25339a2df9dc61a4.html
这里解释了xml-api.jar的问题
http://stackoverflow.com/questions/4925901/classcastexception-while-parsing-xml-with-weblogic
这篇文档再次印证了那两个问题
http://www.liferay.com/community/wiki/-/wiki/Main/Weblogic+tips
问题2(java.lang.ClassCastException: **weblogic.xml.jaxp.RegistryDocumentBuilderFactory)
?删掉war包中的xml-apis就可以了
问题原因说明
因为我们刚在weblogic.xml里设置了优先加载WEB-INF中的jar,那么要删掉冲突的jar。
http://www.liferay.com/community/wiki/-/wiki/Main/Weblogic+tips 里说的很清楚:
The weblogic.xml
Web application deployment descriptor contains a
<prefer-web-inf-classes>
element (a
sub-element of the
<container-descriptor>
element). By default, this
element is set to
false. **Setting this
element to true subverts the classloader delegation model so that
class definitions
from the
Web application are loaded
in preference to
class definitions
in higher-level classloaders.** This
allows a Web application to
use its own version of a third-party
class, which might also be part of
WebLogic Server.
**When this setting
is enabled
in weblogic.xml,
the following jars has to be removed from portal WEB-INF/lib** (jars
with javax.xml
package):
jaxrpc.jar
stax.jar
wstx.jar
xml-apis.jar
问题3(java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval())
?把war中的hibernate-jpa-2.0-api-1.0.0.Final.jar删掉。
问题原因说明
war和Weblogic 10本身都有jpa的jar包,冲突。
问题4(**java.lang.NoClassDefFoundError: javax/persistence/Cacheable**)
?将hibernate-jpa-2.0-api-1.0.0.Final.jar放到%WEBLOGIC_HOME%\jdk160_11\jre\lib\ext中,让它在Weblogic 10的JPA jar之前引用。
如果使用的是jrockit,则应该将这个jar放在%WEBLOGIC_HOME%\jrockit_160_05\jre\lib\ext中
问题原因说明
Weblogic 10.3里的jpa是1.0的(%WEBLOGIC_HOME%\modules\javax.persistence_1.0.0.0_1-0-2.jar),而我们使用的是2.0版本的。而JPA 1.0好像不支持缓存,所以,单纯的删除hibernate-jpa-2.0-api-1.0.0.Final.jar是不行的。
问题5(**Cannot resolve reference to bean 'dorado.velocityHelper' while setting bean property 'velocityHelper';**)
?把velocity-tools-2.0.jar删掉
问题6(Bad date header)
?安装WebLogic 10gR3版本的CR380042_103GA.jar补丁,具体办法:
首先将CR380042_103GA.jar(点击下载)拷贝到WebLogic的domain的lib目录下;
然后修改setDomainEnv.sh/setDomainEnv.bat(前者对应linux系统,后者为windows系统),在最后设置的CLASSPATH中增加,如下:
?
问题7(javassist.util.proxy.ProxyFactory.setUseCache(Z))
?参考ISSUE: http://www.bsdn.org/projects/dorado7/issue/dorado7-1157
问题8:(weblogic.application.ModuleException)
?注意还要在WEB-INF目录下添加一个weblogic.xml,设置属性优先使用当前应用的包文件。配置内容参考问题1
问题9:No bean named 'dorado.packagesConfigLoader'
is defined
解决办法就是在WEB-INF目录下添加weblogic.xml文件,配置内容参考问题1
相关文章推荐
- Weblogic环境下hibernate、antlr类加载冲突问题分析及解决方案
- weblogic 包加载与冲突等问题
- weblogic中jar包冲突问题的解决办法
- weblogic包冲突问题
- netcdf放在weblogic下与spring-modules.jar冲突问题的解决
- JS的覆盖特性来解决文件冲突问题,css的加载问题
- weblogic10以上版本与hibernate3jar包冲突问题
- eclipse集成weblogic加载开源包的问题
- weblogic.jar与js.jar冲突问题的解决
- Jsp include 模板页中css和js冲突问题以及各jsp加载顺序
- OSGI Bundle和Web容器加载类冲突问题的分析和解决
- S(struts2)SH自动加载时jar包冲突问题的解决
- jQuery Mobile 加载对话框页面时同名javascript函数冲突、覆盖问题
- 解决weblogic下通过war加载jar包中的struts的action找不到的问题
- 关于weblogic10.3.6.0与hibernate3的JAR包冲突问题
- 【同一个Server Weblogic两个Domain CookieName冲突导致session失效问题】【关于WebLogic的Session丢失的问题】
- OSGI Bundle和Web容器加载类冲突问题的分析和解决
- 解决weblogic下jar包冲突的问题
- [Archer's Un-x Lab]Brew Python 与 Xcode Plugin 加载Python的冲突问题
- weblogic下开发hibernate发生jar包冲突问题