Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Problems after upgrade
Problems after upgrade [message #163036] Tue, 07 March 2006 11:01 Go to next message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
I was running WTP (I think 1.0) under Eclipse 3.1 and in order to try to
fix another problem I upgraded yesterday.

Most of my projects were fine, but one or two are throwing up odd errors
which I do not understand.

My web.xml file is being rejected although it has not changed. It starts:-

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID"
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">
<servlet>
<description>TrackTrans XML servlet</description>
<display-name>TrackTrans</display-name>
<servlet-name>TrackTrans</servlet-name>
<servlet-class>uk.co.dga.xml.TrackTrans</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

But WTP tags the first line, the description line and the servlet-name line
as errors:-

Severity Description Resource In Folder Location Creation Time Id
2 Referenced file contains errors
(http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd). For more information,
right click on the message and select "Show Details..." web.xml
TrackTrans/WebContent/WEB-INF line 1 07 March 2006 10:25:12 3499
Severity Description Resource In Folder Location Creation Time Id
2 cvc-complex-type.2.4.a: Invalid content was found starting with element
'description'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-name}' is
expected. web.xml TrackTrans/WebContent/WEB-INF line 8 07 March 2006
10:25:12 3500
Severity Description Resource In Folder Location Creation Time Id
2 cvc-id.3: A field of identity constraint 'web-app-servlet-name-uniqueness'
matched element 'web-app', but this element does not have a simple type.
web.xml TrackTrans/WebContent/WEB-INF line 10 07 March 2006 10:25:12 3501

Anyone got any ideas as to what it might be going on about.

It also seems only to be able to find the level 2 DOM definitions of
org.w3c.dom.Text and org.w3c.dom.DOMImplementation. And yet the language
level is set to 5.0, and it is accepting Generics (which obviously did not
exist in 1.4. This however is probably not a WTP error, but a JDT error.

David
Re: Problems after upgrade [message #163047 is a reply to message #163036] Tue, 07 March 2006 11:56 Go to previous messageGo to next message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
David Goodenough wrote:

> I was running WTP (I think 1.0) under Eclipse 3.1 and in order to try to
> fix another problem I upgraded yesterday.
The versions I am running are Eclipse 3.1.2 and WST 1.0.1.v200602130105.
>
> Most of my projects were fine, but one or two are throwing up odd errors
> which I do not understand.
>
> My web.xml file is being rejected although it has not changed. It
> starts:-
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID"
> 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">
> <servlet>
> <description>TrackTrans XML servlet</description>
> <display-name>TrackTrans</display-name>
> <servlet-name>TrackTrans</servlet-name>
> <servlet-class>uk.co.dga.xml.TrackTrans</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> But WTP tags the first line, the description line and the servlet-name
> line as errors:-
>
> Severity Description Resource In Folder Location
> Creation Time Id
> 2 Referenced file contains errors
> (http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd). For more information,
> right click on the message and select "Show Details..." web.xml
> TrackTrans/WebContent/WEB-INF line 1 07 March 2006 10:25:12 3499
> Severity Description Resource In Folder Location
> Creation Time Id
> 2 cvc-complex-type.2.4.a: Invalid content was found starting with
> element 'description'. One of
> '{"http://java.sun.com/xml/ns/j2ee":servlet-name}' is
> expected. web.xml TrackTrans/WebContent/WEB-INF line 8 07 March
> 2006
> 10:25:12 3500
> Severity Description Resource In Folder Location
> Creation Time Id
> 2 cvc-id.3: A field of identity constraint
> 'web-app-servlet-name-uniqueness' matched element 'web-app', but this
> element does not have a simple type.
> web.xml TrackTrans/WebContent/WEB-INF line 10 07 March 2006 10:25:12
> 3501
>
> Anyone got any ideas as to what it might be going on about.
>
> It also seems only to be able to find the level 2 DOM definitions of
> org.w3c.dom.Text and org.w3c.dom.DOMImplementation. And yet the language
> level is set to 5.0, and it is accepting Generics (which obviously did not
> exist in 1.4. This however is probably not a WTP error, but a JDT error.
One further point on this one, which suggests that it might be a WTP problem
is that there is another project in the same workspace but it is an "Other
Project" which has identical code (I cut and pasted it to check) and does
not have this problem. I have checked that the workspace default is Java
5.0 and that neither project overrides that default.
>
> David
Re: Problems after upgrade [message #163085 is a reply to message #163047] Tue, 07 March 2006 14:22 Go to previous messageGo to next message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
David Goodenough wrote:

> David Goodenough wrote:
>
>> I was running WTP (I think 1.0) under Eclipse 3.1 and in order to try to
>> fix another problem I upgraded yesterday.
> The versions I am running are Eclipse 3.1.2 and WST 1.0.1.v200602130105.
>>
>> Most of my projects were fine, but one or two are throwing up odd errors
>> which I do not understand.
>>
>> My web.xml file is being rejected although it has not changed. It
>> starts:-
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app id="WebApp_ID"
>> 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">
>> <servlet>
>> <description>TrackTrans XML servlet</description>
>> <display-name>TrackTrans</display-name>
>> <servlet-name>TrackTrans</servlet-name>
>> <servlet-class>uk.co.dga.xml.TrackTrans</servlet-class>
>> <load-on-startup>1</load-on-startup>
>> </servlet>
I notice in all the sample web-apps in the tomcat5.5 directory that the
description and display name tags should be outside the servlet tag. So
I moved them but to no avail. WTP still complains.

David
>>
>> But WTP tags the first line, the description line and the servlet-name
>> line as errors:-
>>
>> Severity Description Resource In Folder Location
>> Creation Time Id
>> 2 Referenced file contains errors
>> (http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd). For more information,
>> right click on the message and select "Show Details..." web.xml
>> TrackTrans/WebContent/WEB-INF line 1 07 March 2006 10:25:12 3499
>> Severity Description Resource In Folder Location
>> Creation Time Id
>> 2 cvc-complex-type.2.4.a: Invalid content was found starting with
>> element 'description'. One of
>> '{"http://java.sun.com/xml/ns/j2ee":servlet-name}' is
>> expected. web.xml TrackTrans/WebContent/WEB-INF line 8 07 March
>> 2006
>> 10:25:12 3500
>> Severity Description Resource In Folder Location
>> Creation Time Id
>> 2 cvc-id.3: A field of identity constraint
>> 'web-app-servlet-name-uniqueness' matched element 'web-app', but this
>> element does not have a simple type.
>> web.xml TrackTrans/WebContent/WEB-INF line 10 07 March 2006 10:25:12
>> 3501
>>
>> Anyone got any ideas as to what it might be going on about.
>>
>> It also seems only to be able to find the level 2 DOM definitions of
>> org.w3c.dom.Text and org.w3c.dom.DOMImplementation. And yet the language
>> level is set to 5.0, and it is accepting Generics (which obviously did
>> not
>> exist in 1.4. This however is probably not a WTP error, but a JDT error.
> One further point on this one, which suggests that it might be a WTP
> problem is that there is another project in the same workspace but it is
> an "Other Project" which has identical code (I cut and pasted it to check)
> and does
> not have this problem. I have checked that the workspace default is Java
> 5.0 and that neither project overrides that default.
>>
>> David
Re: Problems after upgrade [message #163109 is a reply to message #163085] Tue, 07 March 2006 16:24 Go to previous message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
David Goodenough wrote:

> David Goodenough wrote:
>
>> David Goodenough wrote:
>>
>>> I was running WTP (I think 1.0) under Eclipse 3.1 and in order to try to
>>> fix another problem I upgraded yesterday.
>> The versions I am running are Eclipse 3.1.2 and WST 1.0.1.v200602130105.
>>>
>>> Most of my projects were fine, but one or two are throwing up odd errors
>>> which I do not understand.
>>>
>>> My web.xml file is being rejected although it has not changed. It
>>> starts:-
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <web-app id="WebApp_ID"
>>> 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">
>>> <servlet>
>>> <description>TrackTrans XML servlet</description>
>>> <display-name>TrackTrans</display-name>
>>> <servlet-name>TrackTrans</servlet-name>
>>> <servlet-class>uk.co.dga.xml.TrackTrans</servlet-class>
>>> <load-on-startup>1</load-on-startup>
>>> </servlet>
> I notice in all the sample web-apps in the tomcat5.5 directory that the
> description and display name tags should be outside the servlet tag. So
> I moved them but to no avail. WTP still complains.
>
> David
>>>
>>> But WTP tags the first line, the description line and the servlet-name
>>> line as errors:-
>>>
>>> Severity Description Resource In Folder Location
>>> Creation Time Id
>>> 2 Referenced file contains errors
>>> (http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd). For more
>>> information, right click on the message and select "Show Details..."
>>> web.xml
>>> TrackTrans/WebContent/WEB-INF line 1 07 March 2006 10:25:12 3499
>>> Severity Description Resource In Folder Location
>>> Creation Time Id
>>> 2 cvc-complex-type.2.4.a: Invalid content was found starting with
>>> element 'description'. One of
>>> '{"http://java.sun.com/xml/ns/j2ee":servlet-name}' is
>>> expected. web.xml TrackTrans/WebContent/WEB-INF line 8 07 March
>>> 2006
>>> 10:25:12 3500
>>> Severity Description Resource In Folder Location
>>> Creation Time Id
>>> 2 cvc-id.3: A field of identity constraint
>>> 'web-app-servlet-name-uniqueness' matched element 'web-app', but this
>>> element does not have a simple type.
>>> web.xml TrackTrans/WebContent/WEB-INF line 10 07 March 2006 10:25:12
>>> 3501
>>>
>>> Anyone got any ideas as to what it might be going on about.
>>>
>>> It also seems only to be able to find the level 2 DOM definitions of
>>> org.w3c.dom.Text and org.w3c.dom.DOMImplementation. And yet the
>>> language level is set to 5.0, and it is accepting Generics (which
>>> obviously did not
>>> exist in 1.4. This however is probably not a WTP error, but a JDT
>>> error.
>> One further point on this one, which suggests that it might be a WTP
>> problem is that there is another project in the same workspace but it is
>> an "Other Project" which has identical code (I cut and pasted it to
>> check) and does
>> not have this problem. I have checked that the workspace default is Java
>> 5.0 and that neither project overrides that default.
>>>
>>> David
Well it turned out that the first problem (with web.xml) was a corrupt copy
of the xsd file in the cache. I turned off the cache and suddenly it
worked. Perhaps as a suggestion the quick-fix for this kind of error should
suggest clearing the cache and reloading it (if it is turned on). This
would be in the case where there were parsing errors in a file in the
cache. In the Show-Details response it just gave mountains of errors.

That just leaves the Java problem.

Dav id
Previous Topic:Problem building .war from eclipse
Next Topic:XML Parser No Code Found
Goto Forum:
  


Current Time: Fri Apr 26 05:17:19 GMT 2024

Powered by FUDForum. Page generated in 0.03023 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top