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 56929 - Refactoring doesn't work in WebFreeform
Summary: Refactoring doesn't work in WebFreeform
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Freeform (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2005-03-24 13:18 UTC by zikmund
Modified: 2006-03-24 12:57 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
java.lang.NullPointerException at org.netbeans.modules.refactoring.ui.RefactoringPanel.createNode(RefactoringPanel.java:448) (768 bytes, text/plain)
2005-03-24 13:18 UTC, zikmund
Details
java.lang.NullPointerException at org.netbeans.modules.refactoring.ui.RefactoringOperationListener.operationMove(RefactoringOperationListener.java:137) (985 bytes, text/plain)
2005-03-24 15:56 UTC, zikmund
Details
Freeform project sources (without nbproject - just create it with wizard defaults) (3.31 KB, application/x-compressed)
2005-03-24 15:57 UTC, zikmund
Details
Exception screenshot after Moving class to 'a' package (63.31 KB, image/jpeg)
2005-03-25 13:44 UTC, zikmund
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zikmund 2005-03-24 13:18:30 UTC
Build 20050324-0408

1) Create WebFreeform project with a java class
2) Move class to another package (drag and drop)
3) Refactoring window appears
4) EXCEPTION - java.lang.NullPointerException
see attachment
Comment 1 zikmund 2005-03-24 13:18:58 UTC
Created attachment 21098 [details]
java.lang.NullPointerException at org.netbeans.modules.refactoring.ui.RefactoringPanel.createNode(RefactoringPanel.java:448)
Comment 2 zikmund 2005-03-24 13:40:11 UTC
1) It works fine in Java freeform project.
2) It worked fine in build 200503141900 -> reassigning to PetrPisl.
Comment 3 Petr Jiricka 2005-03-24 15:03:09 UTC
Martin, can you please look at this? Thanks.
Comment 4 Martin Grebac 2005-03-24 15:39:55 UTC
Could you attach the freeform files and provide steps how did you create it? Thanks.

This seems to be a problem in web freeform, not in refactoring or j2ee refactoring.
Comment 5 zikmund 2005-03-24 15:55:55 UTC
Little bit different exception (see attachemnt) on this project (create Freeform
project from attached sources without any classpath settings, just use default
detected values)
Comment 6 zikmund 2005-03-24 15:56:40 UTC
Created attachment 21110 [details]
java.lang.NullPointerException at org.netbeans.modules.refactoring.ui.RefactoringOperationListener.operationMove(RefactoringOperationListener.java:137)
Comment 7 zikmund 2005-03-24 15:57:51 UTC
Created attachment 21111 [details]
Freeform project sources (without nbproject - just create it with wizard defaults)
Comment 8 Martin Grebac 2005-03-24 19:01:57 UTC
I'm still not able to reproduce with latest sources. I followed this steps:

1. Unzip the attachment to some folder
2. Run IDE with fresh userdir
3. Create web freeform, navigate to unzipped folder, click next-next-...-finish
4. Select Timer...java and drag and drop it to other package
5. Refactoring dialog is shown, everything is fine
6. Tried to stop/start ide and again step 4
7. Still works fine

I must be missing something (or was it fixed in the meantime)?
Comment 9 zikmund 2005-03-25 13:43:42 UTC
Martine, I followed your steps with different result on WinXP SP2, JDK
1.5.0_02-fcs, see my comments:

Your steps 1-4
5-B) Refactoring dialog appears, press Next
6-B) Refactoring Output window appears, but it is empty
7-B) EXCEPTION dialog appears (Refactoring Output is still empty)
  -- see attached screenshot
Comment 10 zikmund 2005-03-25 13:44:34 UTC
Created attachment 21139 [details]
Exception screenshot after Moving class to 'a' package
Comment 11 zikmund 2005-03-25 13:46:00 UTC
BTW: the exception in step 7-B is the first attached exception attached to this
issue (my 2nd comment) - java.lang.NullPointerException at
org.netbeans.modules.refactoring.ui.RefactoringPanel.createNode(RefactoringPanel.java:448)
Comment 12 Martin Grebac 2005-03-25 15:37:06 UTC
I tried on jdk 1.5.0_01 and still works, interesting, is this a windows only issue?
Comment 13 Jan Becicka 2005-03-25 15:54:25 UTC
It looks like a problem with ClassPath. 
ClassPath cp = ClassPath.getClassPath(file, ClassPath.SOURCE);
cp.getResourceName(file) returns null - it is strange, isn't it?



Comment 14 zikmund 2005-03-29 08:27:51 UTC
Reproducible on WinXP SP2 with JDK 1.5.0_01-b06. Probably Win specific problem.
Comment 15 Martin Grebac 2005-03-29 12:40:06 UTC
This is a regression caused by recent fixes in classpath area for web freeform.
PetrP already has some changes prepared that fix the problem -> reassigning.
Comment 16 Petr Pisl 2005-03-30 09:00:42 UTC
It should be fixed in the trunk.
Comment 17 zikmund 2005-03-31 11:28:22 UTC
Verified in 200503301800.