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.
Current build (200807170007) errors: 1. New java application projects cannot be created (an xml problem with the root node) 2. Newly created project from sources: cannot edit libraries used (NPE on saving) I'm not using Groovy, but even after manually editing the used libs in project.properties, the Groovy lib is always ensured to be added to the source path. Seems, there's some hardcoded code in the Groovy extensions (without asking for the need of Groovy), which interferes with the rest of the project api. Setting to P1 because cannot even create new standard java apps.
> 1. New java application projects cannot be created (an xml problem with the root node) ... is there an exception ? > 2. Newly created project from sources: cannot edit libraries used (NPE on saving) ... please attach stack-trace ...
/1/ No exception, just an error message occurs while creating a project (creation is aborted, project incomplete, thus cannot be opened). BTW, the project.xml file seems to be incomplete, probably the template/creation code is buggy ? /2/ Have to answer later - currently no acces (at work ;-) )
/1/ No exception, just an error message occurs while creating a project (creation is aborted, project incomplete, thus cannot be opened). BTW, the project.xml file seems to be incomplete, probably the template/creation code is buggy ? /2/ Have to answer later - currently no access (at work ;-) )
Oops - sorry for the duplicated post
error message ... IDE generate full stack trace into $HOME/.netbeans/Dev/var/log/messages.log file, please attach this file into this issue. Thanks in advance.
Created attachment 65189 [details] log and uigestures files
Created attachment 65190 [details] log and uigestures files
Sorry, accidently set the first attachment's mime type wrong - is it possible to remove it?
Changing libraries in properties sheet (first IOE): Annotation: Saving nbproject/project.xml in C:\Dokumente und Einstellungen\Peter\Eigene Dateien\NetBeansProjects\FelixTutorial Annotation: Saving nbproject/project.xml in C:\Dokumente und Einstellungen\Peter\Eigene Dateien\NetBeansProjects\FelixTutorial Annotation: Saving nbproject/project.xml in C:\Dokumente und Einstellungen\Peter\Eigene Dateien\NetBeansProjects\FelixTutorial Saving nbproject/project.xml in C:\Dokumente und Einstellungen\Peter\Eigene Dateien\NetBeansProjects\FelixTutorial Saving nbproject/project.xml in C:\Dokumente und Einstellungen\Peter\Eigene Dateien\NetBeansProjects\FelixTutorial Caused: org.xml.sax.SAXParseException: cvc-complex-type.4: Attribute 'id' must appear on element 'root'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:410) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3165) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.addDefaultAttributes(XMLSchemaValidator.java:2859) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2041) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:685) at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:273) at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:240) at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:186) at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:100) at javax.xml.validation.Validator.validate(Validator.java:127) at org.openide.xml.XMLUtil.validate(XMLUtil.java:496) at org.netbeans.modules.project.ant.ProjectXMLCatalogReader.validate(ProjectXMLCatalogReader.java:144) at org.netbeans.spi.project.support.ant.AntProjectHelper.saveXml(AntProjectHelper.java:318) Caused: java.io.IOException: cvc-complex-type.4: Attribute 'id' must appear on element 'root'. at org.netbeans.spi.project.support.ant.AntProjectHelper.saveXml(AntProjectHelper.java:321) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:589) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:99) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:137) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:217) at org.netbeans.api.project.ProjectManager$7.run(ProjectManager.java:611) at org.netbeans.api.project.ProjectManager$7.run(ProjectManager.java:601) at org.openide.util.Mutex.writeAccess(Mutex.java:433) at org.openide.util.Mutex$1R.run(Mutex.java:1305) at org.openide.util.Mutex.doWrapperAccess(Mutex.java:1318) at org.openide.util.Mutex.writeAccess(Mutex.java:426) at org.netbeans.api.project.ProjectManager.saveProject(ProjectManager.java:600) at org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties.save(J2SEProjectProperties.java:421) at org.netbeans.modules.java.j2seproject.ui.customizer.CustomizerProviderImpl$StoreListener.actionPerformed(CustomizerProviderImpl.java:147) at org.netbeans.modules.project.uiapi.CustomizerDialog$OptionListener$2$1.run(CustomizerDialog.java:244) at org.openide.util.Mutex.writeAccess(Mutex.java:433) at org.openide.util.Mutex$1R.run(Mutex.java:1305) at org.netbeans.api.project.ProjectManager$2$1.run(ProjectManager.java:120) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:120) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:499) at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:215) at org.netbeans.api.project.ProjectManager$2.execute(ProjectManager.java:118) at org.openide.util.Mutex.doWrapperAccess(Mutex.java:1320) at org.openide.util.Mutex.writeAccess(Mutex.java:384) at org.netbeans.modules.project.uiapi.CustomizerDialog$OptionListener$2.run(CustomizerDialog.java:240) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
xml validation related issue?
*** This issue has been marked as a duplicate of 140300 ***
Obviously not a duplicate - still cannot edit my project properties (libraries)
Please can you attach the broken project file or better the complete (nbproject folder). Thanks
Created attachment 65477 [details] The project from existing sources as requested
Created attachment 65478 [details] A newly created broken project
Used NetBeans IDE Build 200807221016 for latest tests. Could anybody probably try to create a new java application project without error before releasing a new daily build? You'll probably get much more information, even just-in-time ;-)
The attached newly created project is missing completely primary configuration data, not j2se project issue. The project from existing source looks fine. I've tried the reported build 200807221016 and it works fine. Creating of a project (j2se, web) is a part of commit validation when it fails there is no promoted build of the ide. Seems as some xml parser problem.
@tzezula: What does it mean, when You say "project with ex. sources works fine"? I can work with the project, yes, but I cannot change the referenced libraries, as the same error occurs as when creating a new java application project. Seems to belong to some broken xml template or schema.
On my setup I am able to change the project libraries, platform, source level in the reported IDE 200807221016. There is no template of the project, the project.xml is generated by code, the broken schema is possible problem. But strange, the exception logs: Attribute 'id' must appear on element 'root' The root element is generated by code like: Element newRootNode = doc.createElementNS(projectConfigurationNamespace, "root"); //NOI18N newRootNode.setAttribute("id", rootName); //NOI18N String label = newRoots2lab.get(newRoot); if (label != null && label.length() > 0 && !label.equals(getRootDisplayName(null, rootName))) { newRootNode.setAttribute("name", label); //NOI18N } ownerElement.appendChild(newRootNode); So the root has to have always the id.
I'm not able to reproduce the issue in latest (today's sources) dev build at all - I can create j2seproject and I can customize libraries. - What project did you actually created - I see from the log that it's some kind of tutorial project. If it's stored project structure it might be broken and new XML validation can reject such project.xml - Does it happen for regular j2seproject (New Project -> Java -> Java Application) - Did you do any changes in JDK XML parser installation? - Could you try some more recent dev build?
@tzezula: Could You probably give me the location in hg.netbeans.org where to find the code? I'll try build 200807240010 this evening (in about 9 hours); if I'll fail, I'll try to find out more about the problem. BTW: Which JDK build version do You use? @mkubec: /1/ A very simple project with only one file and Apache Felix lib to be referenced. /2/ Yes. /3/ No. But probably some latest build version of JDK is needed? Which one are You using? /4/ Yes, but only after release ;-) I'm currently at work, must not use any dev builds here ... I've used the latest build I could get yesterday for testing.
The location in hg: -module java.j2seproject -class J2SEProjectGenerator -method createProject starting on line 125 I am using Apple's JDK 1.5 (build 1.5.0_13-119) If the problem continues I can add some log messages into the project system to find out more info.
I've tested on these JDKs: java version "1.5.0_15" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04) Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing) java version "1.6.0_06" Java(TM) SE Runtime Environment (build 1.6.0_06-b02) Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing) No problem found.
What version of IDE do you use?
Perhaps reporter is using an old JDK that has http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6531160 broken? Or something like this? Seems likely to be a JAXP bug. messages.log claim reporter is using original JDK 6 release, long obsoleted by patch updates.
@jglick: Thank You, You're right. Sorry for the inconvinience. The problem is: I've installed JDK versions 1.6.0 and 1.6.0_06, the first one is selected by the installation, the second one is used as a Java platform in the IDE. Probably the installation routine can ignore the buggy 1.6.0? If only the buggy one is found, the installation should issue an error and quit, otherwise it should issue a warning about the buggy one and ignore it. Leaving this open, as NetBeans should probably take some action (error/warning) when installed/started with the buggy JDK 1.6.0
Agreed. There is already some code in project.ant which checks the active JAXP for some bugs; could probably be extended. A separate bug should be filed for the installer if it misdetected the right JDK to use.
Filed a new bug: http://www.netbeans.org/issues/show_bug.cgi?id=141648
Not a NetBeans issue - JDK bug.
NB should explicitly check for the JDK bug during startup and issue a friendly error message.
*** Issue 142898 has been marked as a duplicate of this issue. ***
Needs to be fixed in 6.5, I think. Rather than showing a warning and refusing to start, could just disable validation in case JAXP looks broken.
Could you please point me to Bug priority guidelines that says that bug in JDK is P1 issue for NetBeans. Thanks.
Jesse, could you explain "JAXP looks broken", what should be checked in such a method 'doesJAXPLookBroken()'. If we refuse validation on certain JDK aren't we going to create invalid documents, that will be refused then on JDK with correct JAXP implementation? Why do we want to put another hacks to code, just to refuse buggy JDK? We have Release Notes document provided with each release with important facts about given release. One of such important facts for 6.5 release is that NetBeans IDE cannot run on Open JDK 6 because of broken JAXP implementation. If we would really want to check for the JDK version, shouldn't it be done in installer or launcher?
This issue needs some discussion, setting as INCOMPLETE until there is clear conclusion about what and how we really want to fix. Lowering priority to P2 since there is no justification why JDK bug should be P1 issue for NetBeans.
*** Issue 142545 has been marked as a duplicate of this issue. ***
Clearest way to reproduce is ant -f openide.util/build.xml test-single -Dtest.includes='**/XMLUtilTest*' -Dnbjdk.home=/space/jdk1.6.0 -Dpermit.jdk6.builds=true An earlier workaround I had for JDK #6529766 does not seem to be helping here; will investigate more.
I think I can work around the validator bug. The problem is that newRootNode.setAttribute("id", rootName) is actually a DOM Level 1 call which does not work well with some versions of JAXP; newRootNode.setAttributeNS(null, "id", rootName) would work better. Since it would be a lot of work to change all occurrences of setAttribute, can just change the validation code (which AFAIK is all that is affected) to validate a deep copy of the DOM tree in which DOM 1 attributes have been replaced with DOM 2 attributes. core-main #5f91025658eb
Despite the workaround, I can hardly recommend that anyone try to run NB on JDK 1.6.0_00. There have been numerous fixes made in the various update releases and I expect some of these bugs affect NetBeans. If the current releases of Open JDK 6 do not include the patch updates then I would consider it unsuitable for running production code.
Integrated into 'main-golden', available in build *200808071401* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/5f91025658eb User: Jesse Glick <jglick@netbeans.org> Log: #140905: problems validating project.xml files on JDK 6 (no updates), or with standalone Xerces.
*** Issue 145593 has been marked as a duplicate of this issue. ***
*** Issue 148722 has been marked as a duplicate of this issue. ***
Comment on attachment 65189 [details] log and uigestures files Hi,
v/c