Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 72360 - Can't create project for Apache Cocoon sources in NB5.0
Can't create project for Apache Cocoon sources in NB5.0
Product: obsolete
Classification: Unclassified
Component: vcsgeneric
PC Windows XP
: P3 (vote)
Assigned To: Martin Entlicher
Depends on:
  Show dependency treegraph
Reported: 2006-02-07 19:07 UTC by ats37
Modified: 2009-12-21 07:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description ats37 2006-02-07 19:07:16 UTC
I fetched the latest Apache Cocoon 2.1.x source with Subversion
svn co
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...
Comment 1 Jesse Glick 2006-02-08 18:44:33 UTC
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?
Comment 2 ats37 2006-02-08 23:03:39 UTC
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(
	at org.netbeans.modules.ant.freeform.Util.getAntProjectCookie(
	at org.netbeans.modules.ant.freeform.Util.getAntScriptName(
	at javax.swing.text.AbstractDocument.fireInsertUpdate(
	at javax.swing.text.AbstractDocument.handleInsertString(
	at javax.swing.text.AbstractDocument.insertString(
	at javax.swing.text.PlainDocument.insertString(
	at javax.swing.text.AbstractDocument.replace(
	at javax.swing.text.JTextComponent.setText(
	at javax.swing.AbstractButton.fireActionPerformed(
	at javax.swing.AbstractButton$Handler.actionPerformed(
	at javax.swing.DefaultButtonModel.fireActionPerformed(
	at javax.swing.DefaultButtonModel.setPressed(
	at java.awt.Component.processMouseEvent(
	at javax.swing.JComponent.processMouseEvent(
	at java.awt.Component.processEvent(
	at java.awt.Container.processEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.LightweightDispatcher.retargetMouseEvent(
	at java.awt.LightweightDispatcher.processMouseEvent(
	at java.awt.LightweightDispatcher.dispatchEvent(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.EventQueue.dispatchEvent(
[catch] at
	at java.awt.Dialog$
	at org.openide.util.Mutex$
	at java.awt.event.InvocationEvent.dispatch(
	at java.awt.EventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(

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.
Comment 3 Jesse Glick 2006-02-08 23:56:19 UTC
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 ***
Comment 4 ats37 2006-02-09 00:57:23 UTC
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).
Comment 5 ats37 2006-02-09 01:06:07 UTC
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 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 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...
Comment 6 Jesse Glick 2006-02-09 01:49:56 UTC
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).
Comment 7 ats37 2006-02-09 08:06:15 UTC
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 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
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"
- 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?
Comment 8 Martin Entlicher 2006-02-09 14:26:37 UTC
Yes, thanks. Will try to reproduce. Looks like the SVN profile does somethong
bad with the NetBeans' filesystem - will explore...
Comment 9 Quality Engineering 2009-12-21 07:46:04 UTC
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

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo