[ mx4j-Bugs-977253 ] ClassCastException when trying to browse TabularData
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #977253, was opened at 2004-06-22 09:04 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=450647&aid=977253&group_id=47745 Category: HTTP Adaptor Group: Release 2.0.1 Status: Open Resolution: None Priority: 5 Submitted By: Lars Kühne (lkuehne) Assigned to: Nobody/Anonymous (nobody) Summary: ClassCastException when trying to browse TabularData Initial Comment: I have implemented an OpenMBean that has an attribute of type TabularData. The getter method is implemented using TabularDataSupport, basically: TabularDataSupport tabularDataSupport = new TabularDataSupport(...); tabularDataSupport.put(new CompositeDataSupport(...)); tabularDataSupport.put(new CompositeDataSupport(...)); return tabularDataSupport; When try I use the MX4J HttpAdaptor to look at the table data I get java.lang.ClassCastException at javax.management.openmbean.TabularDataSupport.get(TabularDataSupport.java:25 2) at mx4j.tools.adaptor.http.GetAttributeCommandProcessor.executeRequest(GetAttri buteCommandProcessor.java:152) at mx4j.tools.adaptor.http.HttpAdaptor$HttpClient.run(HttpAdaptor.java:979) The object being passed to TabularDataSupport.get() is a java.util.List and the code is trying to cast it to Object[]. To me it seems that GetAttributeCommandProcessor.executeRequest() is confused by the fact that TabularDataSupport implements the Map interface. There should be some additional case for TabluarData before checking "if (.. && attributeValue instanceof Map)". My own code seems OK, I can browse the TabularData in the JDK 1.5 jconsole tool. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=450647&aid=977253&group_id=47745 ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com