weblogic10.3.6 启动项目报 weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
<Nov 9, 2017 2:47:56 PM CST> <Error> <J2EE> <BEA-160197>
<Unable to load descriptor /payment/applications/payment-api/WEB-INF/web.xml
of module payment-api. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-enumeration-valid:
string value '3.0' is not a valid enumeration value for web-app-versionType in namespace http://java.sun.com/xml/ns/javaee:<null>
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:245)
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:231)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:155)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:323)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
......
原因:
项目中用到的是javaEE6.0,生成的web.xml中默认是web-app_3_0.xsd的定义,而 weblogic10.3.6并不支持web-app_3_0.xsd的定义,需要weblogic 12c版本才支持
解决办法:
将web.xml中web-app版本改为2.5即可。
如下:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
参考文献:
http://blog.csdn.net/wangmuming/article/details/22187307
https://stackoverflow.com/questions/3166283/weblogic-11g-and-javaee-6
http://fm928.blog.163.com/blog/static/7481352015460339174/