This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 152355 - Missing j2ee web service schemas
Summary: Missing j2ee web service schemas
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 major with 1 vote (vote)
Target Milestone: 2.0   Edit
Assignee: John Lanuti CLA
QA Contact: David Williams CLA
URL:
Whiteboard:
Keywords:
: 171068 171412 172206 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-31 13:40 EDT by Tim deBoer CLA
Modified: 2020-04-29 10:20 EDT (History)
18 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim deBoer CLA 2006-07-31 13:40:24 EDT
During development on the latest WTP 1.5.1 I-build, I noticed that the following error had appeared on my web.xml file, even though it had passed validation with no errors previously. After restarting WTP, the error went away.

Severity and Description	Path	Resource	Location	Creation Time	Id
Referenced file contains errors (http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd).  For more information, right click on the message and select "Show Details..."	Web1/WebContent/WEB-INF	web.xml	line 1	1154351479703	159
Comment 1 Nitin Dahyabhai CLA 2006-07-31 14:22:39 EDT
Tim, do you also have the details that were mentioned in the message?
Comment 2 Tim deBoer CLA 2006-07-31 17:14:28 EDT
Sorry, I don't and the error went away by itself after a restart. If I see it again I'll copy the details as well.
Comment 3 David Williams CLA 2006-08-02 22:13:32 EDT
Lawrence .. I think you are familar with this IBM one ... does this mean some server was down? Or is there something wrong with this schema? 

When I check the schema (redirected to)
http://www-128.ibm.com/developerworks/webservices/jsrproject/j2ee_web_services_client_1_1.xsd

at a "validation service", such as 
http://www.w3.org/2001/03/webdata/xsv
it shows errors (if I say complete schema). 

Even if I read the content into WTP, and validate it directly, it says there's an error ... "The prefix "xsd" for element "xsd:schema" is not bound"

See how much education I need? :) 
Comment 4 ekkehard gentz CLA 2006-10-16 06:44:42 EDT
I just installed eclipse 3.2.1
and WTP 1.5.1 (200609210005)
on Mac OSX 10.4.8, java 1.5.0_06

and with each web.xml I get this error

...Referenced file contains errors
(http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd).  For
more information, right click on the message and select "Show Details...

cleaning project, restarting eclipse - nothing helps.
BTW: what do you mean by "restarting WTP" ?
Comment 5 Lawrence Mandel CLA 2006-10-16 16:11:23 EDT
This is a problem that crops up every once and a while as the server that hosts the schema is one that tends to go down for maintenance or some other reason. The best way to work around this problem is to download the schema from the main J2EE schemas page (http://java.sun.com/xml/ns/j2ee/) and add the schema to the WTP XML catalog.

I'm resolving as won't fix as from a WTP standpoint I don't have a potential solution to the problem of the server being unavailable other than shipping the J2EE schemas with WTP, which we do not have legal permission to do.
Comment 6 Tim deBoer CLA 2006-10-16 16:36:21 EDT
Does this also happen if the user just happens to be disconnected from the internet?

Can't we provide a better error message if this happens? A warning like "Schema ABC could not be downloaded from xyz.org" would be much more user friendly than a cryptic error.
Comment 7 Lawrence Mandel CLA 2006-10-16 16:57:35 EDT
>Does this also happen if the user just happens to be disconnected from the
>internet?

No. In this (typical) case the file will not be marked with errors because none of the schemas will be downloaded. The problem is when only certain schemas are downloaded.

>Can't we provide a better error message if this happens? A warning like "Schema
>ABC could not be downloaded from xyz.org" would be much more user friendly than
>a cryptic error.

This seems like a doable fix. I've reopened to investigate Tim's suggestion.
Comment 8 ekkehard gentz CLA 2006-10-16 17:36:12 EDT
>Can't we provide a better error message if this happens? A warning like "Schema
>ABC could not be downloaded from xyz.org" would be much more user friendly than
>a cryptic error.

and if you add "...or add schema ABC to the Schema Catalog..." this would be perfect. 
just done it and the error went away.
Comment 9 Kenneth Evans, Jr. CLA 2006-10-18 13:09:49 EDT
I get the same error doing the "Creating Bottom Up Web Service" tutorial.  Line 33 of the resulting web.xml has an error that says "Content is not allowed in trailing section."  My experience is that this eventually goes away.  In fact, I just redid the demo and got the error.  I compared the file to a previous try, for which the error disappeared by itself, and they compare exactly (except for the project name, which is different).

There is nothing wrong with the file that I can see.  The error is invalid.  And it will eventually go away.

It looks like I can produce it just by following the directions in the above tutorial.  This might help you track you down.

This is 1.5.0.

I don't see any signs of the server being unavailable.  It is pretty repeatable (often, if not always).

See Bug #150345 for a similar problem.
Comment 10 Lawrence Mandel CLA 2006-10-18 17:22:53 EDT
Hmm. Interesting Ken. I'll try to reproduce again but my experiences with this bug have been that the error is due to a missing J2EE schema.
Comment 11 Nils Hammar CLA 2007-01-22 13:21:00 EST
I have investigated the cause and the actual culprit is the file http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd which refers to http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd instead of http://java.sun.com/xml/ns/j2ee/j2ee_web_services_client_1_1.xsd

So this is actually NOT an Eclipse bug, but a SUN bug. I have now filed a bug report to SUN regarding this, but who knows about how long that will take to be resolved...
Comment 12 Lawrence Mandel CLA 2007-01-22 13:29:03 EST
Thanks for following up Nils. Do you have a reference for the bug you opened?
Comment 13 Nils Hammar CLA 2007-01-23 01:38:59 EST
Feedback from SUN:

************************************************
Dear Java Developer,

Thank you for your interest in improving the quality of Java Technology.

Your report has been assigned an internal review ID of 894672, which is NOT visible on the Sun Developer Network (SDN).

Please be aware that the large volume of reports we receive sometimes prevents us from responding individually to each message.

We currently have a three week average response time.  If the information is determined to be a new Bug or RFE, or a duplicate of a known Bug or RFE, you will receive a followup email containing a seven digit bug number.  You may search for, view, or vote for this bug in the Bug Database at http://bugs.sun.com/.

If you just reported an issue that could have a major impact on your project and require a timely response, please consider purchasing one of the support offerings described at http://developers.sun.com/services/.

The Sun Developer Network (http://developers.sun.com) is a free service that Sun offers. To join, visit http://developers.sun.com/global/join_sdn.html.

For a limited time, SDN members can obtain fully licensed Java IDEs for web and enterprise development.  More information is at http://developers.sun.com/prodtech/javatools/free/.

Thank you for using our bug submit page.

Regards,
Java Developer Bug Report Review Team



---------------------------------------------------------------
Comment 14 Chuck Bridgham CLA 2007-01-24 22:24:56 EST
*** Bug 171068 has been marked as a duplicate of this bug. ***
Comment 15 Oleksandr Alesinskyy CLA 2007-01-25 08:23:10 EST
Ok, http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd really refers to unavailable
http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd,
but why validation fails on some Eclipse installations and succeed on others?
In both cases XML catalogs have identical entries and none of them refers to this file (or its local copy).

Regards,
Oleksandr
Comment 16 Lawrence Mandel CLA 2007-01-25 10:47:07 EST
WTP also includes a cache resolver that allows the tools to retrieve this resource remotely and use it for validation. (See Window->Preferences->Internet->Cache.)

This error will not appear in the case where the file was cached correctly before it became unavailable.
Comment 17 Carey Evans CLA 2007-01-25 19:58:19 EST
Instead of using a local copy, I've added an XML Catalog entry as follows:

 URI:      http://java.sun.com/xml/ns/j2ee/j2ee_web_services_client_1_1.xsd
 Key Type: Schema Location
 Key:      http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd

This made Eclipse download and cache Sun's copy of the file the first time it was needed, instead of the IBM version which has currently lost its HTTP redirect (for me).  Using the developerWorks link from comment #3 probably would have worked, too.

Could this catalog entry be added to Web Tools?
Comment 18 estelle dumas CLA 2007-01-26 04:59:47 EST
hello, I've encountered the same problem. 
Here are the details of the error message :

The errors below were detected when validating the file "j2ee_web_services_client_1_1.xsd" via the file "web.xml".  In most cases these errors can be detected by validating "j2ee_web_services_client_1_1.xsd" directly.  However it is possible that errors will only occur when j2ee_web_services_client_1_1.xsd is validated in the context of web.xml.

I did what Carey said. It works fine.
But I hope this catalog entry will be added to Web Tools.
Comment 19 Lawrence Mandel CLA 2007-01-26 12:02:29 EST
Carey, excellent suggestion. The XML catalog displays an error when adding this resource. I've opened bug 171825 to track the problem. The catalog does use the entry to correctly resolve the new location.

David W. - Do you think there will be any issue adding the URI redirect Carey details in comment #17 to the catalog? Should we discuss this with Eclipse legal?
Comment 20 Nitin Dahyabhai CLA 2007-01-30 15:14:55 EST
*** Bug 172206 has been marked as a duplicate of this bug. ***
Comment 21 John Lanuti CLA 2007-01-31 16:09:35 EST
Chuck what do you think of the suggested redirect workaround?
Comment 22 Lawrence Mandel CLA 2007-01-31 16:10:42 EST
I'm reassigning this bug to John as he's actively investigating the best solution. Thanks John.
Comment 23 Chuck Bridgham CLA 2007-01-31 18:16:20 EST
Sounds like a great solution if we get clearance
Comment 24 John Lanuti CLA 2007-02-01 12:08:11 EST
I'm working with ibm.com to restore these links.  I do like the catalog entry workaround, and am investigating legal implications.

For me, this affects "out of the box" user experience and may negatively impact a new adopter's first impressions of WTP.
Comment 25 John Lanuti CLA 2007-02-02 11:42:32 EST
ibm.com has agreed to restore the links and in the long run, sun can fix their defect to point to the xsd's on their own site.
Comment 26 David Williams CLA 2007-02-06 01:31:46 EST
I am untargetting this bug, since there's nothing for us to literally do for 1.5.3 per se, though we do expect it to be fixed on the host by then, we would not hold up our release if it was not. 

I've looked for bug 894672 on the sun site, didn't see it, which means it's still be triaged, I guess. Once it goes "public", if someone would make a note here, then we could all go and vote for it. :) 

Comment 27 Oleksandr Alesinskyy CLA 2007-02-06 02:54:04 EST
"I am untargetting this bug, since there's nothing for us to literally do for
1.5.3 per se".

In my opinion it, at least, shall be mentioned in readme (or some other place in documentation).

Regards,
Oleksandr
Comment 28 David Williams CLA 2007-02-06 03:13:43 EST
(In reply to comment #27)
> 
> In my opinion it, at least, shall be mentioned in readme (or some other place
> in documentation).
> 

Perhaps if for some reason it's not fixed by the time 1.5.3 is released, someone would contribute a FAQ entry? 

Comment 29 abhi shelat CLA 2007-02-06 14:59:19 EST
This bug is still so incredibly frustrating for me.


I have implemented the mapping suggested in #17 by
Window->Preferences->Web and XML->XML Catalog

and then

"Add..." and the values suggested.

However, I cannot seem to convince the project to abide by the remapping.

When I create a dynamic web project, the web.xml file immediately has 52 errors of the "s4s-elt-character: Non whitespace..." form stemming from the fact that the ibm.com URI seems to redirect one to a marketing webpage instead of the .xsd file.

I even tried downloading the j2ee_1_4.xsd file and manually changed the ibm ref to java.sun.com...  This seemed to work at first, but then stopped working after restarting eclipse.

I do not know how to work around this and any help would be appreciated.

I am running Version: 3.2.1 Build id: M20060921-0945 on a Mac.

Comment 30 abhi shelat CLA 2007-02-06 16:22:52 EST
I have discovered one workaround for the problem I mentioned above.

If you continue to get these s4s... bugs on the mac client, close the project.

Then reopen the project but make sure that you do *not* click on the web.xml file to open it or view it.  By closing and opening the project, the bugs will go away.  As long as web.xml is not opened, then you can make changes to the rest of the code and the service can be "run on a server," etc.

The  situation of referring to an external schema on a foreign website seems to create a major problem---for reliability if not security.  does one typically bundle these schema files in their own local deployments?  if so, how?

Comment 31 Petri Sirkkala CLA 2007-02-07 04:10:41 EST
(In reply to comment #29)
> This bug is still so incredibly frustrating for me.
...
> 
> However, I cannot seem to convince the project to abide by the remapping.
> 
> When I create a dynamic web project, the web.xml file immediately has 52 errors
> of the "s4s-elt-character: Non whitespace..." form stemming from the fact that
> the ibm.com URI seems to redirect one to a marketing webpage instead of the
> .xsd file.
> 

You might want to empty the Preferences -> Internet -> Cache and then do a Project -> Clean.

Hope this helps.

-Pete
Comment 32 Chuck Bridgham CLA 2007-02-08 14:11:59 EST
*** Bug 171412 has been marked as a duplicate of this bug. ***
Comment 33 michel Chalmandrier CLA 2007-02-09 06:01:35 EST
(In reply to comment #17)
I've added the modifications mentionned in comment #17
in my XML Catalog entry 
but I always have the problem .
I have clean the Preferences -> Internet -> Cache and I rebuild my project
but the  url http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd
reappear in the Preferences -> Internet -> Cache 

somebody can help me ?
Thanks
michel
Comment 34 michel Chalmandrier CLA 2007-02-09 07:49:29 EST
(In reply to comment #17)
I've added the modifications mentionned in comment #17
in my XML Catalog entry 
but I always have the problem .
I have clean the Preferences -> Internet -> Cache and I rebuild my project
but the  url http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd
reappear in the Preferences -> Internet -> Cache 

somebody can help me ?
Thanks
michel
Comment 35 John Lanuti CLA 2007-02-12 10:32:49 EST
The original schemas have been restored to the IBM website.  

i.e. http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd
Comment 36 Nils Hammar CLA 2007-02-12 10:48:58 EST
Still no response from Sun regarding this however. When that's fixed this bug is completely fixed.

And in reality it was never an Eclipse bug at all...

Comment 37 John Lanuti CLA 2007-04-03 11:49:20 EDT
Closing as part of mass query to clean up old resolved bugs in untargetted milestones.
Comment 38 Carsten Friedrich CLA 2020-03-20 01:49:42 EDT
Seems like the file is gone again from the IBM website. At least, at the moment it's not accessible there.
Comment 39 Fulvio Mondini CLA 2020-04-29 05:40:00 EDT
True... but I've resolved applying the workaround in comment 17
Comment 40 Fulvio Mondini CLA 2020-04-29 05:44:22 EDT
(In reply to Fulvio Mondini from comment #39)
> True... but I've resolved applying the workaround in comment 17

Forget it ... it's still here, nothing has changed. :-(