1
votes

I have a struts2/spring project on JBoss EAP 5.x, while starting server, it gives me such error message :

Failed to parse source: Failed to resolve schema nsURI=http://java.sun.com/xml/ns/javaee location=http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd

The only xml file used web-app_3_0.xsd is my web.xml, as below.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
        id="WebApp_ID" version="3.0">
  <display-name>XXXXXX</display-name>
  <jsp-config>
    <taglib>
          <taglib-uri>HTTP://java.sun.com/jsp/jstl/core</taglib-uri>
          <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
    </taglib>
  </jsp-config>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>

I did tried to access URL as below, all are accessible.

How is it happen ? What means failed to resolve, Is that means I can't get access to that remote file ?

1
Has your server access to the internet? I think using one of the schemas in $JBOSS_INSTALL/docs/schemas/ as location could be a solution, but the newest version of web_app.xsd I find as of JBoss EAP 5.1.2 is 2.5. - Aaron
BTW you should consider upgrading to JBoss EAP 6.x or 7.x, it would probably solve your problem and 5.x is not supported by RedHat anymore since last month - Aaron
I'll try to put web-app_3_0.xsd over there to see how it going... - RRTW
That could be a solution, I think JBoss should resolve the namespace without the help of any location hint. It probably can't since it doesn't know the schema. - Aaron
I'm able to access internet(Server still in my laptop), and JBoss EAP 5.x is my office demand to use it... :-( - RRTW

1 Answers

0
votes

web-app_3_0.xsd is the schema of JavaEE 6 applications' deployment descriptor, and JBoss EAP 5.x is only JavaEE 5 compliant, so you won't be able to deploy your JavaEE 6 application to it.

You should either downgrade your application to JavaEE 5 or deploy it to a JavaEE 6 compliant application server.