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 146081 - Attempting to open JDK7 NetBeans projects says "Attribute xml:base is not allowed..."
Summary: Attempting to open JDK7 NetBeans projects says "Attribute xml:base is not all...
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL: http://norman.walsh.name/2005/04/01/x...
Keywords:
Depends on: 160806
Blocks:
  Show dependency tree
 
Reported: 2008-09-03 18:29 UTC by emcmanus
Modified: 2009-04-06 19:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log from the failed NetBeans (49.58 KB, text/plain)
2008-09-03 18:31 UTC, emcmanus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description emcmanus 2008-09-03 18:29:45 UTC
I downloaded 6.5beta and tried to use it to open one of the NetBeans projects that are predefined in the public JDK7
sources (at jdk7.dev.java.net or hg.openjdk.java.net).  This works fine with 6.1, but with 6.5beta a red error message
appears in the Project Name box in the Open Project dialogue and it refuses to open.  The message says:
Error in project.xml: Attribute 'xml:base' is not allowed to appear in element 'java-data'.
The project.xml in question is at make/netbeans/jmx/nbproject/project.xml (I also tried a few other predefined projects
with the same effect).  The <java-data> element is imported from make/netbeans/common/java-data-no-native.ent using
<!ENTITY>, and this is what it looks like:

<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
    <compilation-unit>
        <package-root>${root}/src/share/classes</package-root>
        <classpath mode="boot">${bootstrap.jdk}/jre/lib/rt.jar</classpath>
        <built-to>${root}/build/${platform}-${arch}/classes</built-to>
        <javadoc-built-to>${root}/build/javadoc/${name}</javadoc-built-to>
        <source-level>1.5</source-level>
    </compilation-unit>
</java-data>

The problem *might* be due to stricter validation (though I don't see anything wrong with the above), but if so the
utility of such validation is questionable since it is likely to lead people to abandon 6.5beta immediately, as I am
doing now.
Comment 1 emcmanus 2008-09-03 18:31:09 UTC
Created attachment 68978 [details]
messages.log from the failed NetBeans
Comment 2 Milan Kubec 2008-09-04 09:22:41 UTC
The problem is not stricter validation but validation by itself, it was introduced in 6.5.

Jesse, do you happen to know what kind of error is this? Are those projects in jdk7.dev.java.net valid freeform
projects? How were these projects created?
Comment 3 emcmanus 2008-09-04 11:34:56 UTC
The jdk7 projects were valid projects before, in the sense that NetBeans would open them.  So I think it is a regression
that NetBeans no longer does, whatever the reason.  This will probably be true for lots of other existing projects, so
it doesn't seem acceptable for NetBeans to refuse to open them.  Perhaps it could change this blocking error into a
warning, or perhaps there could be an option either in the dialogue or in the configuration settings that ignores
validation failure.
Comment 4 Jesse Glick 2008-09-05 18:35:47 UTC
The problem is triggered by the use of entity includes in project.xml, which inserts phantom xml:base attributes on the
included elements. Apparently XML Schema does not automatically permit this attribute (see URL for discussion). I will
try to find some way to work around it.
Comment 5 Jesse Glick 2008-09-05 18:49:27 UTC
core-main #87c764043ef0
Comment 6 Quality Engineering 2008-09-06 17:35:09 UTC
Integrated into 'main-golden', will be available in build *200809061401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/87c764043ef0
User: Jesse Glick <jglick@netbeans.org>
Log: #146081: xml:base attributes (from entity includes) mess up Schema validation.
Comment 7 emcmanus 2008-09-08 14:07:21 UTC
I have checked that the problem no longer occurs with the nightly build mentioned by Jesse.