JDK-8160988 : NoClassDefFound exception when using getDeclaredMethod method of MediaView class
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-07-07
  • Updated: 2016-09-16
  • Resolved: 2016-09-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Using getDeclaredMethod of class javafx.scene.media.MediaView with parameters ("setX", double.class) reports an exception:
Caused by: java.lang.ClassNotFoundException: com.sun.media.jfxmediaimpl.platform.ios.IOSMediaPlayer
	at java.net.URLClassLoader.findClass(URLClassLoader.java:385)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	... 13 more

Tagging this as regression, as this failure was not present in previous JDK9 versions (e.g., b96 and below).
Comments
http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/0e03eab4b551
02-09-2016

Looks good. +1
02-09-2016

change looks fine to me, approved
02-09-2016

Please review the following: http://cr.openjdk.java.net/~almatvee/8160988/webrev.00/ Reviewers: kcr, ddehaven Removed dependency on IOSMediaPlayer. Overlay functionality required by IOSMediaPlayer is moved to separate interface and if it is implemented my platform specific media player, then MediaView will provided required information.
30-08-2016

This bug was very likely exposed by the reorganization of the build when the Jigsaw m3 changes when in. It looks like there is a hard dependency on the IOSMediaPlayer class from shared code: modules/media/src/main/java/javafx/scene/media/MediaView.java:import com.sun.media.jfxmediaimpl.platform.ios.IOSMediaPlayer; modules/media/src/main/java/javafx/scene/media/MediaView.java: private IOSMediaPlayer getIOSPlayer() { modules/media/src/main/java/javafx/scene/media/MediaView.java: return (IOSMediaPlayer) getMediaPlayer().retrieveJfxPlayer(); This dependency must be removed (e.g., by using reflection and checking at runtime whether the class is available).
25-07-2016

There is the same issue happened on Ubuntu16.04-x64+jdk9b128-64bit. RULE "graphics/api/node/DisableMediaViewTest.java" any any RULE "graphics/api/node/FocusableMediaView_dTest.java" any any RULE "graphics/api/node/Transformations_bTest.java" any any RULE "graphics/api/node/VisibleMediaView_bTest.java" any any
25-07-2016

There is the same issue happened on Ubuntu16.04-x64+jdk9b126-64bit. RULE "graphics/api/node/DisableMediaViewTest.java" any any RULE "graphics/api/node/FocusableMediaView_dTest.java" any any RULE "graphics/api/node/Transformations_bTest.java" any any RULE "graphics/api/node/VisibleMediaView_bTest.java" any any
13-07-2016

There is the same issue happened on Mac10.11-x64+jdk9b126-64bit. RULE "graphics/api/node/DisableMediaViewTest.java" any any RULE "graphics/api/node/FocusableMediaView_dTest.java" any any RULE "graphics/api/node/Transformations_bTest.java" any any RULE "graphics/api/node/VisibleMediaView_bTest.java" any any
11-07-2016