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文件


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM