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 56812 - ClassCastException at org.netbeans.modules.java.j2seproject.classpath.ClassPathSupport$Item.getLibrary()
Summary: ClassCastException at org.netbeans.modules.java.j2seproject.classpath.ClassPa...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 4.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-22 17:54 UTC by _ gtzabari
Modified: 2005-03-24 13:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack-trace (1.82 KB, text/plain)
2005-03-22 17:54 UTC, _ gtzabari
Details
Diff for webaps (2.09 KB, patch)
2005-03-24 10:45 UTC, Petr Hrebejk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2005-03-22 17:54:05 UTC
dev build 200503211900

This makes it impossible to add a library to the classpath.
Comment 1 _ gtzabari 2005-03-22 17:54:19 UTC
Created attachment 21040 [details]
stack-trace
Comment 2 _ gtzabari 2005-03-22 17:55:41 UTC
Correction, this only seems to happen if you "Add library" while a missing
library entry is selected.
Comment 3 Jesse Glick 2005-03-23 17:26:16 UTC
Wrong component.
Comment 4 Tomas Zezula 2005-03-24 08:49:36 UTC
Introduced durring the customizer rewrite.
Comment 5 Tomas Zezula 2005-03-24 08:52:55 UTC
I've tried it and it worked for me.
I've added the library with has missing jar file into j2seproject in the
j2seproject customizer without exception being thrown.
Did I something wrng?
Comment 6 Petr Hrebejk 2005-03-24 10:29:13 UTC
The bug is there. When a lib is no longer defined, the project depends on it, an
it's line is selected in the customizer, then I get the exception.

Will try to fix it.
Comment 7 Petr Hrebejk 2005-03-24 10:44:18 UTC
Fixed in j2seproject.

Checking in
src/org/netbeans/modules/java/j2seproject/ui/customizer/ClassPathUiSupport.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/ClassPathUiSupport.java,v
 <--  ClassPathUiSupport.java
new revision: 1.4; previous revision: 1.3
done
Checking in
src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEClassPathUi.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEClassPathUi.java,v
 <--  J2SEClassPathUi.java
new revision: 1.7; previous revision: 1.6
done
Comment 8 Petr Hrebejk 2005-03-24 10:45:19 UTC
Created attachment 21092 [details]
Diff for webaps
Comment 9 Petr Hrebejk 2005-03-24 10:46:20 UTC
Passing to web apps they might want to apply the diff
Comment 10 Andrei Badea 2005-03-24 13:20:45 UTC
Petre, thank you for the diff!

Applied to the EJB project:

Checking in ClassPathUiSupport.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/ClassPathUiSupport.java,v
 <--  ClassPathUiSupport.java
new revision: 1.3; previous revision: 1.2
done
Checking in EjbJarClassPathUi.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/EjbJarClassPathUi.java,v
 <--  EjbJarClassPathUi.java
new revision: 1.5; previous revision: 1.4
done
Comment 11 Andrei Badea 2005-03-24 13:21:45 UTC
Applied to the web project:

Checking in ClassPathUiSupport.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/customizer/ClassPathUiSupport.java,v
 <--  ClassPathUiSupport.java
new revision: 1.5; previous revision: 1.4
done
Checking in WebClassPathUi.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/customizer/WebClassPathUi.java,v
 <--  WebClassPathUi.java
new revision: 1.5; previous revision: 1.4
done