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 152845 - ClassCastException: java.lang.String cannot be cast to java.lang.Class
Summary: ClassCastException: java.lang.String cannot be cast to java.lang.Class
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Winston Prakash
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-10 09:17 UTC by gerzhedowich
Modified: 2009-02-19 23:23 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 59800


Attachments
stacktrace (5.96 KB, text/plain)
2008-11-10 09:17 UTC, gerzhedowich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gerzhedowich 2008-11-10 09:17:07 UTC
Build: NetBeans IDE 6.5 RC2 (Build 200810270001)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Linux, 2.6.27-7-generic, i386

User Comments:
fret: Using Seam and  Visual Icefaces, converted is displaying error ( java.lang.String cannot be cast to java.lang.Class) on an inputText field in properties.



Stacktrace: 
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Class
        at org.netbeans.modules.visualweb.propertyeditors.ConverterPropertyEditor.getConverterClasses(ConverterPropertyEditor.java:204)
        at org.netbeans.modules.visualweb.propertyeditors.ConverterPropertyEditor.getConverterLabels(ConverterPropertyEditor.java:238)
        at org.netbeans.modules.visualweb.propertyeditors.ConverterPropertyEditor.getTags(ConverterPropertyEditor.java:90)
        at org.openide.explorer.propertysheet.RendererFactory.getRenderer(RendererFactory.java:225)
        at org.openide.explorer.propertysheet.SheetCellRenderer.getTableCellRendererComponent(SheetCellRenderer.java:153)
        at org.openide.explorer.propertysheet.BaseTable.prepareRenderer(BaseTable.java:608)
Comment 1 gerzhedowich 2008-11-10 09:17:15 UTC
Created attachment 73570 [details]
stacktrace
Comment 2 Peter Zavadsky 2008-11-14 22:45:58 UTC
There seems to be an issue with the com.sun.faces.application.Application.getConverterTypes() method. The implementation
(it was probably com.sun.faces.application.ApplicationImpl) should return an iterator over classes, but there seems to
be also string included.

I am adding generics to the client code, to better detect the problem if it appears again. However I am not sure which
implementation got there, and how did it pass non class object into it (probably a non-generic implementation).

Please, reopen with the new information if it happens again.

Fixed:

changeset:   108150:f7e6aedb5a89
tag:         tip
user:        Peter Zavadsky <pzavadsky@netbeans.org>
date:        Fri Nov 14 14:42:12 2008 -0800
summary:     #152845 Using generics to better detect(avoid) the problem of passing incorrect value type.
Comment 3 Quality Engineering 2008-11-16 04:12:50 UTC
Integrated into 'main-golden', will be available in build *200811160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f7e6aedb5a89
User: Peter Zavadsky <pzavadsky@netbeans.org>
Log: #152845 Using generics to better detect(avoid) the problem of passing incorrect value type.