facebook

deploying to Websphere 6.1: Failed to read web-app_2_5.xsd

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #324696 Reply

    sgits
    Member

    I’m attempting to deploy a project to a local, development Websphere 6.1 profile in the following manner: Servers tab > Rclick server > Add Deployment… > select a project

    However, the deployment fails with the following error message:

    org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

    I tried visiting that particular URL in my browser and sometimes the .xsd is available and sometimes not. When it is available, I then get similar errors pertaining to either javaee_5.xsd or jsp_2_1.xsd, which I see are referenced in web-app_2_5.xsd as follows:

      <xsd:include schemaLocation="javaee_5.xsd"/>
      <xsd:include schemaLocation="jsp_2_1.xsd"/>

    How can I proceed with my deployments? Is there a way to prevent the deployment process from reaching out to the Internet, perhaps by using the XML Catalog instead?

    Thanks!

    – Ted

    Attachments:
    You must be logged in to view attached files.
    #324717 Reply

    support-swapna
    Moderator

    sgits ,

    Sorry that you are seeing this issue. Thank you for the log files.

    Can you please answer some more questions for us ?

    1. What kind of a project is it? Is it a portlet project? Please share the project details.

    2. Can you please try exporting the project as WAR or EAR file (whichever is appropriate) and deploying the file using the WAS admin console to see if the issue persists?

    3. Do you know which particular file is referencing the xsds?

    Let us know how it works for you.

    #324739 Reply

    sgits
    Member

    Hi Swapna,

    Thanks for your reply.

    >> 1. What kind of a project is it? Is it a portlet project? Please share the project details.
    It’s a Struts1 app, which I deploy to our test and production environments as a WAR file.

    >> 3. Do you know which particular file is referencing the xsds?
    It’s web.xml.

    >> 2. Can you please try exporting the project as WAR or EAR file (whichever is appropriate)
    >> and deploying the file using the WAS admin console to see if the issue persists?

    This method resulted in a failure to upload the WAR file, both in the existing local profile connected to MyEclipse and a brand new, unconnected profile I created this morning. Checking the logs/server1/SystemErr.log, I see the following:

    [3/28/12 16:00:07:347 GMT] 00000022 SystemErr     R org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: IWAE0022E Exception occurred loading deployment descriptor for module "UII.war" in EAR file "c:\my-dev\IBM\WAS6.1Ex\profiles\TestServer\wstemp<!-- [display] -->\upload\UII_war.ear"
    Stack trace of nested exception:
    org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: WEB-INF/web.xml
    Stack trace of nested exception:
    org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceLoadException: IWAE0007E Could not load resource "WEB-INF/web.xml" in archive "UII.war"
    Stack trace of nested exception:
    org.eclipse.emf.common.util.WrappedException: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'javaee:descriptionGroup' to a(n) 'group' component.
    

    This leads me to believe that the issue lies in my local installation of Websphere and not MyEclipse. I did some research and discovered that Websphere 6.1 is at JEE 2.4, not JEE 2.5, so I changed the following in the web.xml:

    From:

    <web-app version="2.5" 
        xmlns="http://java.sun.com/xml/ns/javaee" 
        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">

    To:

    <web-app version="2.4" 
        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_4.xsd">
    

    Deployments via MyEclipse to the local Websphere profile are now successful, so I think I’m good now. I still find it a bit odd that I can continue to deploy WAR files to my test and production environments without issue, and I was able to deploy a project to a local profile five days ago.

    Regardless, thanks for pointing me in the right direction!

    – Ted

    #324763 Reply

    support-swapna
    Moderator

    sgits ,

    Glad that it is working.
    Do let us know if you have any issues.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: deploying to Websphere 6.1: Failed to read web-app_2_5.xsd

You must be logged in to post in the forum log in