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 204274 - IllegalArgumentException: Called DataObject.find on null
Summary: IllegalArgumentException: Called DataObject.find on null
Status: RESOLVED WORKSFORME
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 204764 206780 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-26 12:51 UTC by Jaroslav Havlin
Modified: 2011-12-29 12:27 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182324


Attachments
stacktrace (1.72 KB, text/plain)
2011-10-26 12:52 UTC, Jaroslav Havlin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Havlin 2011-10-26 12:51:56 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-7678-on-20110810)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

User Comments:
jhavlin: Tried to create JavaHelp Help Set from New File wizard (clicking Finish button)




Stacktrace: 
java.lang.IllegalArgumentException: Called DataObject.find on null
   at org.openide.loaders.DataObject.find(DataObject.java:513)
   at org.netbeans.modules.apisupport.project.ui.wizard.common.CreatedModifiedFiles$PackageInfo$1.run(CreatedModifiedFiles.java:1196)
   at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127)
   at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:566)
   at org.netbeans.modules.apisupport.project.ui.wizard.common.CreatedModifiedFiles$PackageInfo.run(CreatedModifiedFiles.java:1152)
   at org.netbeans.modules.apisupport.project.ui.wizard.common.CreatedModifiedFiles.run(CreatedModifiedFiles.java:329)
Comment 1 Jaroslav Havlin 2011-10-26 12:52:01 UTC
Created attachment 112454 [details]
stacktrace
Comment 2 Jaroslav Havlin 2011-10-26 13:41:11 UTC
Could be caused by hard-coded slash in paths on Windows. I will try to prepare a patch.
Comment 3 Jaroslav Havlin 2011-10-26 14:50:50 UTC
Sorry, I was wrong, slashes are correct.
Giving up.

File package-info.java and its parent directories are not created. File project.xml is modified correctly (dependency to javahelp added).
It seems to work on Linux.
Comment 4 Jaroslav Havlin 2011-10-31 15:49:22 UTC
It is probably caused by different line endings on Windows. File package-info.java is created from a template and then modified, but it contains some unexpected \r characters.
For example in CasualDiff.java:300, character positions are incorrect and output file is corrupted.
Comment 5 Jaroslav Havlin 2011-11-09 09:11:54 UTC
I have also noticed that when updating project properties (right click on project and selecting Properties), e.g. changing version number, file manifest.mf is re-created with windows line-endings, although originally it had unix line endings. It could be related to this issue.
Comment 6 Jesse Glick 2011-11-14 16:16:03 UTC
(In reply to comment #4)
> It is probably caused by different line endings on Windows. File
> package-info.java is created from a template and then modified, but it contains
> some unexpected \r characters.
> For example in CasualDiff.java:300, character positions are incorrect and
> output file is corrupted.

I was unable to reproduce on XP. If it continues to occur for you, please try to investigate further. Maybe a bug in java.source? Maybe dupe of bug #194569?
Comment 7 Jesse Glick 2011-11-14 16:16:19 UTC
(In reply to comment #5)
> I have also noticed that when updating project properties (right click on
> project and selecting Properties), e.g. changing version number, file
> manifest.mf is re-created with windows line-endings, although originally it had
> unix line endings. It could be related to this issue.

Probably unrelated.
Comment 8 Jaroslav Havlin 2011-11-15 15:28:01 UTC
I tested it with current daily build and it works fine on Windows 7 as well.
Comment 9 Jesse Glick 2011-11-15 16:16:51 UTC
*** Bug 204764 has been marked as a duplicate of this bug. ***
Comment 10 Quality Engineering 2011-11-16 15:49:58 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/d885062c5e51
User: Jesse Glick <jglick@netbeans.org>
Log: Cleaner recovery from #204274.
Comment 11 Jesse Glick 2011-12-29 12:27:21 UTC
*** Bug 206780 has been marked as a duplicate of this bug. ***