weblogic上部署项目出错

一、

Unable to access the selected application.
Exception in AppMerge flows' progression
Exception in AppMerge flows' progression
Unmarshaller failed
网上各种方法,我这问题出现在weblogic.xml命名空间上,估计是这个命名空间有问题,找了之前的,虽然是错的,也解决掉了
出错的xml:
<wls:weblogic-web-app xmlns:wls="http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
修改后:
<wls:weblogic-web-app xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
二、这个问题是之前没有用maven时候在weblogic上还可以,后来改为maven项目就出错了

2017-12-29 17:46:52,891 ERROR org.springframework.web.context.ContextLoader 331 - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [application-context.xml]; nested exception is java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory cannot be cast to javax.xml.parsers.DocumentBuilderFactory

这个是因为maven引入的xml-apis.jar包和weblogic中jar包中有类冲突,所以排除掉这个包即可,在maven的pom中加入配置如下

<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>

或者在发布的war包中删除xml-apis.jar文件

转载于:https://www.cnblogs.com/hujiapeng/p/8145708.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值