开发者

web-app_2_5.xsd showing errors when validating web.xml in Weblogic

开发者 https://www.devze.com 2023-03-31 05:58 出处:网络
I have done a Dynamic Web project with Spring 3.0 using Tomcat Server & it works fine. When i deployed the same in Weblogic Server; it throws me an error:

I have done a Dynamic Web project with Spring 3.0 using Tomcat Server & it works fine. When i deployed the same in Weblogic Server; it throws me an error:

VALIDATION PROBLEMS WERE FOUND problem: cvc-enumeration-valid: string value '2.5' is not a valid enumeration value for web-app-versionType in namespace http://java.sun.com/xml/ns/j2ee: 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) ---
weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND

Starting lines of web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">

But the same works 开发者_运维问答in Tomcat.


Weblogic 9.2, which you are apparently using, is a J2EE 1.4 appserver. Servlet 2.5 is a JavaEE 5 API, and is therefore not supported. Your server only goes as high as Servlet 2.4.


Do you have display-name tag, in my case I had the tag display-name which was causing the grief, also I changed the namespace from _http://java.sun.com/xml/ns/j2ee to _http://java.sun.com/xml/ns/javaee

eg:

 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLon="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
 version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号