This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 146693 - Validating against wrong sevlet schema
Summary: Validating against wrong sevlet schema
Status: RESOLVED DUPLICATE of bug 76060
Alias: None
Product: javaee
Classification: Unclassified
Component: DD Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-09 19:46 UTC by driscoll
Modified: 2008-10-01 11:52 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Failing web.xml file. (2.42 KB, text/plain)
2008-09-12 23:41 UTC, driscoll
Details

Note You need to log in before you can comment on or make changes to this bug.
Description driscoll 2008-09-09 19:46:26 UTC
When I enter the following code in web.xml, I get a validation error:


    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

This is valid in 2.5, but wrong in 2.4 - hence, I suspect you're evaluating againt the wrong schema.
Comment 1 Petr Jiricka 2008-09-12 23:00:05 UTC
So this is in a 2.5 application? I can not reproduce this issue - works fine for me. This is when you select "Validate
XML" in the editor popup menu? Can you please paste the output from the validator? Thanks.
Comment 2 driscoll 2008-09-12 23:41:46 UTC
Created attachment 69787 [details]
Failing web.xml file.
Comment 3 driscoll 2008-09-12 23:46:03 UTC
Sorry for what turns out to be scant information in the bug.

I've attached the offending xml file.

Yes, it validates fine - but that's not where I see the error.

In the file browser, it shows up as clipboard with an "x".  And when I double click to open, get a modal:
Fatal errors found in web.xml file.
It is highly recommended that you fix... etc.

Validating returns no error.

Mouseover of the icon shows a DOM graph error:  Schema2BeansRuntime exception property url-pattern already bound.

So, *something* is using the wrong schema - but not the validate command.
Comment 4 Petr Jiricka 2008-09-19 16:35:30 UTC
Confirmed, I can reproduce now. This is Erno's area, reassigning.
Comment 5 Erno Mononen 2008-10-01 11:52:16 UTC
Seems like a duplicate of issue 76060, the underlying problem is the same. Likely would need to enhance schema2beans as 
described in the mentioned issue. Closing as a dupe, thanks for reporting.

*** This issue has been marked as a duplicate of 76060 ***