JDK-8152355 : IllegalAccessError: javafx.media cannot access jdk.internal.ref
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-03-21
  • Updated: 2016-06-02
  • Resolved: 2016-04-22
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
Relates :  
Relates :  
Description
java.lang.IllegalAccessError: class com.sun.media.jfxmedia.locator.ConnectionHolder$FileConnectionHolder (in module javafx.media) cannot access class jdk.internal.ref.Cleaner (in module java.base) because module java.base does not export jdk.internal.ref to module javafx.media
	at com.sun.media.jfxmedia.locator.ConnectionHolder$FileConnectionHolder.closeConnection(javafx.media@9-ea/ConnectionHolder.java:234)
	at test.sun.media.jfxmedia.locator.ConnectionHolderTestCloseConnection.runTest(ConnectionHolderTestCloseConnection.java:43)
	at mts.java.AbstractTest.start(AbstractTest.java:87)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(javafx.graphics@9-ea/LauncherImpl.java:842)
	at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(javafx.graphics@9-ea/PlatformImpl.java:346)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$5(javafx.graphics@9-ea/PlatformImpl.java:315)
	at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(javafx.graphics@9-ea/PlatformImpl.java:314)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(javafx.graphics@9-ea/InvokeLaterDispatcher.java:96)
	at com.sun.glass.ui.win.WinApplication._runLoop(javafx.graphics@9-ea/Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(javafx.graphics@9-ea/WinApplication.java:191)
	at java.lang.Thread.run(java.base@9-ea/Thread.java:804)

Comments
Changeset: 258332993afd Author: kcr Date: 2016-04-22 09:01 -0700 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/258332993afd
22-04-2016

Change looks fine to me, approved
22-04-2016

Note that this change is needed as a result of the fix for JDK-8148117, which is part of the work for JEP 260 (encapsulate most internal APIs).
19-04-2016

To reproduce this, simply run the HelloMedia program with a local media file, using a "file:" URL. For example: java hello.HelloMedia file:///media/mediafile.flv
19-04-2016

http://cr.openjdk.java.net/~kcr/8152355/webrev.00/ Simple fix to add the needed qualified export.
19-04-2016

This is happening because the class moved and we need a new qualified export. I will fix this up after the jigsaw integration.
21-03-2016

Affected tests: Test: test/sun/media/jfxmedia/locator/ConnectionHolderTestCloseConnection.java#ConnectionHolderTestCloseConnection_1
21-03-2016