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 159576 - java.io.IOException: cvc-type.3.1.3: The value '14_SecurityEEApp-war' of element 'foreign-project' is not valid.
Summary: java.io.IOException: cvc-type.3.1.3: The value '14_SecurityEEApp-war' of elem...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milan Kubec
URL: http://statistics.netbeans.org/except...
Keywords:
: 169920 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-04 02:08 UTC by shche123
Modified: 2009-09-11 21:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 80284


Attachments
stacktrace (4.70 KB, text/plain)
2009-03-04 02:08 UTC, shche123
Details

Note You need to log in before you can comment on or make changes to this bug.
Description shche123 2009-03-04 02:08:10 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments:
bombjack: Hi,
I was attempting to add a file to the /lib folder in an ear-file by selecting properties on an enterpriseapplication project, going to the packaging section and adding a file/folder. This works well, but when I changed the location in the ear-file where I wanted the file to go to be /lib/ I got this exception.

This worked well in Netbeans 6.1.
This is a big problem in our project so I hope it is easy to fix :)

shche123: error while create an EE aproject with all three modules - Web, EJB, Client 
the last screen of the wizard

esmithbss: Adding a JBI Module to a composite Application.



Stacktrace: 
java.io.IOException: cvc-type.3.1.3: The value '14_SecurityEEApp-war' of element 'foreign-project' is not valid.
        at org.netbeans.spi.project.support.ant.AntProjectHelper.saveXml(AntProjectHelper.java:322)
        at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:587)
        at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:100)
        at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:138)
        at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:289)
        at org.netbeans.api.project.ProjectManager$6.run(ProjectManager.java:597)
Comment 1 shche123 2009-03-04 02:08:24 UTC
Created attachment 77683 [details]
stacktrace
Comment 2 Milan Kubec 2009-03-24 10:30:46 UTC
Reassigning for evaluation, 'foreign-project' has probably wrong definition of type.
Comment 3 Exceptions Reporter 2009-08-25 18:59:39 UTC
This issue already has 13 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=80284
Comment 4 Jun Qian 2009-08-25 22:44:48 UTC
According to the ant project reference schema definition
(org.netbeans.modules.project.ant.ant-project-references[12].xsd in project.ant module), the "foreign-project" attribute
in project.xml needs to be a xsd:NCName (i.e., "[_A-Za-z][-._A-Za-z0-9]*"). The name "14_SecurityEEApp-war" starts with
a digit and is not a valid xsd:NCName. Therefore, the validation error is correct based on the schema definition.

That said, IMHO, the schema definition should be relaxed, since NetBeans does allow the user to create a project with a
name that is not a xsd:NCName. 

Also see http://www.netbeans.org/issues/show_bug.cgi?id=141330 for a similar schema relaxation.

 
Comment 5 Milan Kubec 2009-09-08 10:13:49 UTC
*** Issue 169920 has been marked as a duplicate of this issue. ***
Comment 6 Milan Kubec 2009-09-08 10:18:10 UTC
Fixed.

http://hg.netbeans.org/core-main/rev/5cff206b6fdb
Comment 7 Quality Engineering 2009-09-11 21:40:18 UTC
Integrated into 'main-golden', will be available in build *200909111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5cff206b6fdb
User: Milan Kubec <mkubec@netbeans.org>
Log: #159576: schema relaxation for foreign-project