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 229588 - java.lang.ClassCastException: org.netbeans.modules.maven.repository.ui.BasicArtifactMD cannot be cast to org.netbeans.core.multiview.ContextAwareDescription
Summary: java.lang.ClassCastException: org.netbeans.modules.maven.repository.ui.BasicA...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-10 16:59 UTC by markiewb
Modified: 2013-05-13 12:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Shows the issue (190.80 KB, image/png)
2013-05-10 16:59 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-05-10 16:59:28 UTC
Created attachment 134296 [details]
Shows the issue

* create/open a maven project
* add some dependencies (non-test)
* in the context menu of the dependency select "view artifact details" --> Exception

java.lang.ClassCastException: org.netbeans.modules.maven.repository.ui.BasicArtifactMD cannot be cast to org.netbeans.core.multiview.ContextAwareDescription
	at org.netbeans.core.multiview.MultiViewPeer.peerComponentShowing(MultiViewPeer.java:338)
	at org.netbeans.core.multiview.MultiViewTopComponent.componentShowing(MultiViewTopComponent.java:128)
[catch] at org.openide.windows.WindowManager.componentShowing(WindowManager.java:339)
	at org.netbeans.core.windows.WindowManagerImpl.componentShowing(WindowManagerImpl.java:1191)
	at org.netbeans.core.windows.view.DefaultView.changeGUI(DefaultView.java:168)
	at org.netbeans.core.windows.ViewRequestor.dispatchRequest(ViewRequestor.java:275)
	at org.netbeans.core.windows.ViewRequestor.processRequest(ViewRequestor.java:251)
	at org.netbeans.core.windows.ViewRequestor.postRequest(ViewRequestor.java:189)
	at org.netbeans.core.windows.ViewRequestor.scheduleRequest(ViewRequestor.java:127)
	at org.netbeans.core.windows.Central.activateModeTopComponent(Central.java:1792)
	at org.netbeans.core.windows.WindowManagerImpl.topComponentRequestActive(WindowManagerImpl.java:1325)
	at org.openide.windows.TopComponent.requestActive(TopComponent.java:861)
	at org.netbeans.modules.maven.indexer.api.ui.ArtifactViewer.showArtifactViewer(ArtifactViewer.java:100)
	at org.netbeans.modules.maven.indexer.api.ui.ArtifactViewer.showArtifactViewer(ArtifactViewer.java:83)
	at org.netbeans.modules.maven.api.CommonArtifactActions$ShowArtifactAction.actionPerformed(CommonArtifactActions.java:120)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
	at java.awt.Component.processMouseEvent(Component.java:6505)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
	at java.awt.Component.processEvent(Component.java:6270)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4861)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
	at java.awt.Container.dispatchEventImpl(Container.java:2273)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:688)
	at java.awt.EventQueue$3.run(EventQueue.java:686)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:702)
	at java.awt.EventQueue$4.run(EventQueue.java:700)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

-----
Example pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.mycompany</groupId>
  <artifactId>mavenproject1</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>mavenproject1</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
      
          
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2.1</version>
    </dependency>
  </dependencies>
</project>



------
Product Version: NetBeans IDE Dev (Build 201305052300)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
Comment 1 Milos Kleint 2013-05-13 11:29:04 UTC
a multiview problem I believe
Comment 2 Theofanis Oikonomou 2013-05-13 12:13:54 UTC
This should be fixed by http://hg.netbeans.org/core-main/rev/33f2b72194bb available in build *201305062300*. Please try the latest build and reopen if it still happens for you. Thank you