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 40313 - ClassCastException Thrown When Refreshing the Contents of the WEB-INF Folder of a Web Application
Summary: ClassCastException Thrown When Refreshing the Contents of the WEB-INF Folder ...
Status: RESOLVED DUPLICATE of bug 38854
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-20 10:55 UTC by clockskew
Modified: 2004-03-05 10:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log file outlining exception details. I have regenerated the exception a few times. (35.83 KB, text/plain)
2004-02-20 10:57 UTC, clockskew
Details
Log file outlining exception details. I have regenerated the exception a few times. (48.70 KB, text/plain)
2004-02-20 11:02 UTC, clockskew
Details
Screenshots of the IDE and the folder that causes the error (174.74 KB, application/zip)
2004-03-03 11:15 UTC, clockskew
Details

Note You need to log in before you can comment on or make changes to this bug.
Description clockskew 2004-02-20 10:55:49 UTC
This is not a showstopper but it can become 
annoying. I'm not too sure if this has already 
been reported (I'll leave it to you to mark as a 
duplicate :)

To reproduce the bug:
1. Create a new project.
2. Mount a new local directory into the 
filesystem. (in my case: C:\Documents and 
Settings\Greg\My Documents\TEST2)
3. Create a new web module in that directory. The 
standard web-project structure is generated and a 
separate filesystem is created for the /WEB-
INF/classes folder
4. Right-click on the /WEB-INF/classes filesystem 
and hit 'Refresh Folder'. A dialog will appear 
indicating a ClassCastException. This will also 
occur if you access the /classes directory under 
the WEB-INF node under the filesystem the project 
was initially created under.

System details:
Toshiba Satellite M30
OS: Windows XP SP-1
CPU: Intel Centrino 1.4GHz
Memory: 512MB

If I get a chance to try this on Linux, I'll let 
you know.
Comment 1 clockskew 2004-02-20 10:57:37 UTC
Created attachment 13544 [details]
Log file outlining exception details. I have regenerated the exception a few times.
Comment 2 clockskew 2004-02-20 11:02:03 UTC
Created attachment 13545 [details]
Log file outlining exception details. I have regenerated the exception a few times.
Comment 3 _ tboudreau 2004-02-20 11:51:05 UTC
Passing to web module - the exception is in core, but I suspect that you should not let 
your folders provide a refresh action.
Comment 4 Petr Jiricka 2004-02-23 13:27:10 UTC
Pavle, this looks like a duplicate of issue 38735, isn't it?
Comment 5 Pavel Buzek 2004-02-23 20:15:41 UTC
This should be evaluated for 3.6.

I cannot reproduce this problem. Does it happen all the time? Is the
TEST2 folder empty at the beginning? What name does the
WEB-INF/classes filesystem show on it? I suppose the first exception
(IllegalStateEx) is logged when the module is mounted, correct?
This exception may be the cause - the exception means that IDE is not
able to associated the WEB-INF/classes filesystem with the web module
filesystem, maybe the classes FS is invalid.

Providing refresh action is ok - DelegatingFileSystem extends
MultiFileSystem and contains only one filesystem which is the
ExLocalFS. The refresh action is not provided by the DelegatingFS but
is automatically added by the MultiFS from the ExLocalFS.
Comment 6 clockskew 2004-02-24 12:41:34 UTC
Yep. This problem happens all the time, even for a newly created web
module.

The WEB-INF/classes filesystem is named as 'C:\Documents and
Settings\Greg\My Documents\TEST : /WEB-INF/classes'. This is one of
the filesystems that is auto-mounted when you create a web module. No
exception dialogs appear when the module is created and mounted. I
only  get one when I attempt to refresh the /WEB-INF/classes filesystem.

When I get some time, I'll give this a go on Linux. That will probably
be this weekend at the earliest...
Comment 7 zikmund 2004-02-25 16:31:06 UTC
I can't reproduce it too on 200402221900 build, W2K SP3.
I'll test it on WinXP soon.

clockskew, can you please explain to me item 1? I don't understand,
what you mean by this... (I tested it starting at item 2).

Thanks, Karel.
Comment 8 Pavel Buzek 2004-02-25 17:28:27 UTC
I would assume this mean just what it says: menu Project|Project
Manager, click New. That;s at least how I tested this. But I cannot
speak for the submitter.
Comment 9 Pavel Buzek 2004-02-26 18:46:36 UTC
lowering priority, cannot reproduce
Comment 10 clockskew 2004-03-03 11:11:18 UTC
I've had a chance to test this on Linux, and the same problem occurs.

System details:
OS: GNU/Linux Redhat 9
CPU: Pentium 4 2.4GHz HT
Memory: 512MB
Comment 11 clockskew 2004-03-03 11:15:48 UTC
Created attachment 13790 [details]
Screenshots of the IDE and the folder that causes the error
Comment 12 clockskew 2004-03-03 11:32:04 UTC
zikmund,

To create a new project:

1. Click 'Project -> Project Manager'
2. Click 'New' in the Project Manager dialog box.
3. Enter a project name and click 'OK'

A fresh workspace will be initialised. From here you can mount a new
filesystem, create a new web module, etc.

After you mount a filesystem, click on the filesystem in the navigator
and then:
1. Click 'File->New'. A 'New Wizard' will appear.
2. In the 'Choose Template' panel, expand the 'JSP & Servlets' folder
and select 'Web Module'.
3. Click 'Next'
4. In the next panel enter a web module directory and click 'Finish'.

The web-project filestructure and filesystems will be created. The
folder to test is outlined in the screenshots I attached earlier.
Comment 13 _ rkubacki 2004-03-04 20:33:42 UTC
Should be addressed by Radek's fix in refresh action:

nbcvs -q log -N core/src/org/netbeans/core/ExFsRefreshAction.java
 
RCS file: /cvs/core/src/org/netbeans/core/ExFsRefreshAction.java,v
Working file: core/src/org/netbeans/core/ExFsRefreshAction.java
head: 1.3
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 5;     selected revisions: 5
description:
----------------------------
revision 1.3
date: 2004/02/13 09:34:56;  author: rmatous;  state: Exp;  lines: +5 -2
fixed #38854 ClassCastException


*** This issue has been marked as a duplicate of 38854 ***
Comment 14 clockskew 2004-03-05 10:41:10 UTC
Thanks guys.

I suspected a duplicate. I'll be sure to keep an eye out and search 
for them in the future before complaining... (and possibly see if I 
can get my hands on what's current in CVS)

Cheers,


Greg