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.
I fetched the latest Apache Cocoon 2.1.x source with Subversion svn co http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/ and tried to create a project in Netbeans 5 to work with them. I selected New Project from the menu and chose Web Application with Existing Ant Script. On the next panel it said to specify the location of the project's files, so I hit the topmost Browse button and selected the BRANCH_2_1_X directory created by svn. Even though Netbeans automatically filled in the path to BRANCH_2_1_X\build.xml in the Build Script field, the "specify the location of the project's files" message at the bottom of the window was still displayed. I entered a project name, and copied the Location into the Project Folder field, but was still unable to proceed any further in the wizard. Hitting "Back" then "Next" again, I noticed that the message had changed to "The selected file is not a valid Ant script". I repeated the process for a Java Project with Existing Ant Script, but encountered exactly the same behaviour. Admittedly, the build.xml in question consists solely of import entries, linking in various other Ant scripts from another directory. However, when I ran NB 4.1 and tried the same thing, there was no problem - as soon as I select the BRANCH_2_1_X directory, not only the Build Script but also the Project Name and Project Folder are automatically filled in, and the Next button is enabled. Plus, I can run the build in NB4.1 (or from the command line), so the script itself is obviously valid. It seems to me there are two problems here; firstly, that the real error message (about the "invalid" script) is not displayed to start with, only by hitting Back & Next. And secondly, that the new version of Netbeans doesn't consider the script valid when version 4.1 has no problem with it. However, I'm not sure if the problem is in the specific java/web projects modules, the underlying project infrastructure, the New Project wizard UI, etc...
I just checked out the same Cocoon sources and made a Web Application with Existing Ant Script using a NB dev build on Linux and it worked fine for me. Found all the targets in the main build.xml OK. Perhaps only reproducible on Windows? Or something else? Anything of note in your log file? Reproducible only when certain <import/>s are not commented out?
The log contains the following, if that helps any. *********** Exception occurred ************ at 10:32 PM on Feb 8, 2006 java.lang.IllegalArgumentException: Called DataObject.find on null at org.openide.loaders.DataObject.find(DataObject.java:444) at org.netbeans.modules.ant.freeform.Util.getAntProjectCookie(Util.java:75) at org.netbeans.modules.ant.freeform.Util.getAntScriptName(Util.java:59) at org.netbeans.modules.ant.freeform.ui.BasicProjectInfoPanel.updateProjectName(BasicProjectInfoPanel.java:225) at org.netbeans.modules.ant.freeform.ui.BasicProjectInfoPanel.update(BasicProjectInfoPanel.java:173) at org.netbeans.modules.ant.freeform.ui.BasicProjectInfoPanel.access$000(BasicProjectInfoPanel.java:35) at org.netbeans.modules.ant.freeform.ui.BasicProjectInfoPanel$1.insertUpdate(BasicProjectInfoPanel.java:58) at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:184) at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:754) at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:711) at javax.swing.text.PlainDocument.insertString(PlainDocument.java:114) at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:673) at javax.swing.text.JTextComponent.setText(JTextComponent.java:1441) at org.netbeans.modules.ant.freeform.ui.BasicProjectInfoPanel.browseProjectLocationActionPerformed(BasicProjectInfoPanel.java:444) at org.netbeans.modules.ant.freeform.ui.BasicProjectInfoPanel.access$700(BasicProjectInfoPanel.java:35) at org.netbeans.modules.ant.freeform.ui.BasicProjectInfoPanel$FormListener.actionPerformed(BasicProjectInfoPanel.java:427) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234) at java.awt.Component.processMouseEvent(Component.java:5488) at javax.swing.JComponent.processMouseEvent(JComponent.java:3126) at java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153) at java.awt.Dialog$1.run(Dialog.java:515) at java.awt.Dialog.show(Dialog.java:536) at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:810) at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:853) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:841) at org.openide.util.Mutex$1.run(Mutex.java:1188) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) I tried removing the entire contents of the build script and replaced them with a single <target name="compile"/> but it behaved the same. Curiously, I can create a "Java with existing script" project for another project on a network drive.
Ah. You must map Windows network shares to drive letters. The IDE does not currently support UNC paths. *** This issue has been marked as a duplicate of 46813 ***
No, the project with the problem is on the local disk, no UNC paths involved. The project on the network was just the first one I found that only had an Ant script and no nbproject yet (and it had a drive letter mapped).
Hmm... I think I may be onto something. I'd had the C:\development\cocoon directory set up in the Version Manager using the SVN profile, with http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/ specified as the Repository URL. However, that directory was the one I was checking out BRANCH_2_1_X into, so the working directory should have been C:\development\cocoon\BRANCH_2_1_X (or perhaps I'd have got away with just http://svn.apache.org/repos/asf/cocoon/branches/ as the URL). Once I removed the entry in the Versioning Manager (and shutdown/restarted Netbeans, as although the Remove button changed to disabled the entry didn't disappear from the list until I did) I can create a project for the directory without any problem. However, the exception could have been handled in a more informative way IMO, since it seems it wasn't the build script that was the problem after all...
Don't know what that means exactly. No steps to reproduce. Seems that FU.tFO(File) is returning null for a file which exists on disk (see stack trace).
Steps to reproduce? - In version manager, add a new entry using the SVN generic profile. - Choose a directory (C:\development\cocoon in my case), and enter http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/ as the URL. IIRC I left all the other fields blank. - In a command shell, cd to the directory entered above, and run svn co http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/ This will create a new subdirectory BRANCH_2_1_X - Back in NB, select New Project and choose Web Application with Existing Ant Script. Click Next. - On the next page, click the first Browse button and select the BRANCH_2_1_X directory. NB should fill in the Ant Script field, but leave the others blank. The text at the bottom of the window will not change from the "Select Files Location" message, but the exception will be shown in the log. - Click Back. Click Next. The message will now show the "Invalid Ant Script" message. - Cancel. Go into the Versioning Manager, select the SVN entry from before and click Remove. The entry remains in the list, but the Remove button is disabled. - Restart NB and go into the Versioning Manager. The SVN entry has gone. Close the window. - As before select New Project, Web App with Ant Script. Select the BRANCH_2_1_X directory. All the other fields popuplate automatically, not just the Ant Script one, and no exception is thrown. Is that explicit enough?
Yes, thanks. Will try to reproduce. Looks like the SVN profile does somethong bad with the NetBeans' filesystem - will explore...
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. We apologize for any inconvenience. Thank you. The NetBeans Team