JDK-8156811 : Ensemble2 AdvanceMedia sample throws NoClassDefFoundError: javafx/scene/control/ButtonBuilder
  • Type: Bug
  • Component: javafx
  • Sub-Component: samples
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • Submitted: 2016-05-11
  • Updated: 2016-08-06
  • Resolved: 2016-08-06
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
This issue is reproducible with Java 9 b117.

1) Run http://download.oracle.com/otndocs/products/javafx/2/samples/Ensemble/index.html
2) Click on "Advanced Media".

Advance Media will not open and exception will be thrown.
Comments
Since the solution to this will be to replace the obsolete sample with Ensemble8, I am closing this as a duplicate of JDK-8160020
06-08-2016

Note that the JavaFX builders were deprecated in 8 by JDK-8124188 and removed in 9 by JDK-8092861. The Ensemble8 demo was updated to stop using the deprecated builders in 8u60 by JDK-8094957. So the easiest solution is likely going to be to replace the old Ensemble2 demo with Ensemble8 from the latest (8u92) release. It doesn't seem worth putting any effort into the old Ensemble2 demo given that we don't need it to be able to run on JDK 7 any longer.
14-05-2016

To give a little more info, the builder classes were deprecated in JDK 8 and removed in JDK 9. The version of Ensemble on OTN is the old FX 2 version of Ensemble that is still using these now-removed classes. The best solution is to replace this demo with a Ensemble8. If that is too much work, then we should fix the old FX 2 sample to not use builders.
12-05-2016

This is a problem in the test program. I guess we haven't run that particular example with JDK 9.
12-05-2016

Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError: javafx/scene/control/ButtonBuilder at ensemble.samples.media.AdvancedMedia$MediaControl.<init>(AdvancedMedia.java:172) at ensemble.samples.media.AdvancedMedia.<init>(AdvancedMedia.java:80) at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(java.base@9-ea/NativeConstructorAccessorImpl.java:62) at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(java.base@9-ea/DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(java.base@9-ea/Constructor.java:453) at java.lang.Class.newInstance(java.base@9-ea/Class.java:550) at ensemble.pages.SamplePage.createView(SamplePage.java:166) at ensemble.Ensemble2.goToPage(Ensemble2.java:585) at ensemble.Ensemble2.goToPage(Ensemble2.java:567) at ensemble.Ensemble2$10.changed(Ensemble2.java:301) at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(javafx.base@9-ea/ExpressionHelper.java:181) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(javafx.base@9-ea/ExpressionHelper.java:80) at javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(javafx.base@9-ea/ReadOnlyObjectPropertyBase.java:74) at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(javafx.base@9-ea/ReadOnlyObjectWrapper.java:102) at javafx.beans.property.ObjectPropertyBase.markInvalid(javafx.base@9-ea/ObjectPropertyBase.java:113) at javafx.beans.property.ObjectPropertyBase.set(javafx.base@9-ea/ObjectPropertyBase.java:147) at javafx.scene.control.SelectionModel.setSelectedItem(javafx.controls@9-ea/SelectionModel.java:102) at javafx.scene.control.MultipleSelectionModelBase.lambda$new$0(javafx.controls@9-ea/MultipleSelectionModelBase.java:67) at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(javafx.base@9-ea/ExpressionHelper.java:136) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(javafx.base@9-ea/ExpressionHelper.java:80) at javafx.beans.property.ReadOnlyIntegerPropertyBase.fireValueChangedEvent(javafx.base@9-ea/ReadOnlyIntegerPropertyBase.java:72) at javafx.beans.property.ReadOnlyIntegerWrapper.fireValueChangedEvent(javafx.base@9-ea/ReadOnlyIntegerWrapper.java:102) at javafx.beans.property.IntegerPropertyBase.markInvalid(javafx.base@9-ea/IntegerPropertyBase.java:114) at javafx.beans.property.IntegerPropertyBase.set(javafx.base@9-ea/IntegerPropertyBase.java:148) at javafx.scene.control.SelectionModel.setSelectedIndex(javafx.controls@9-ea/SelectionModel.java:68) at javafx.scene.control.MultipleSelectionModelBase.select(javafx.controls@9-ea/MultipleSelectionModelBase.java:411) at javafx.scene.control.MultipleSelectionModelBase.clearAndSelect(javafx.controls@9-ea/MultipleSelectionModelBase.java:359) at javafx.scene.control.TreeView$TreeViewBitSetSelectionModel.clearAndSelect(javafx.controls@9-ea/TreeView.java:1476) at com.sun.javafx.scene.control.behavior.CellBehaviorBase.simpleSelect(javafx.controls@9-ea/CellBehaviorBase.java:281) at com.sun.javafx.scene.control.behavior.CellBehaviorBase.doSelect(javafx.controls@9-ea/CellBehaviorBase.java:245) at com.sun.javafx.scene.control.behavior.CellBehaviorBase.mousePressed(javafx.controls@9-ea/CellBehaviorBase.java:175) at com.sun.javafx.scene.control.inputmap.InputMap.handle(javafx.controls@9-ea/InputMap.java:274) at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(javafx.base@9-ea/CompositeEventHandler.java:218) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(javafx.base@9-ea/CompositeEventHandler.java:80) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(javafx.base@9-ea/EventHandlerManager.java:238) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(javafx.base@9-ea/EventHandlerManager.java:191) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(javafx.base@9-ea/CompositeEventDispatcher.java:59) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(javafx.base@9-ea/BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(javafx.base@9-ea/EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(javafx.base@9-ea/BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(javafx.base@9-ea/EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(javafx.base@9-ea/BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(javafx.base@9-ea/EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(javafx.base@9-ea/BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(javafx.base@9-ea/EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(javafx.base@9-ea/BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(javafx.base@9-ea/EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(javafx.base@9-ea/BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(javafx.base@9-ea/EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(javafx.base@9-ea/EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(javafx.base@9-ea/EventUtil.java:54) at javafx.event.Event.fireEvent(javafx.base@9-ea/Event.java:198) at javafx.scene.Scene$MouseHandler.process(javafx.graphics@9-ea/Scene.java:3890) at javafx.scene.Scene$MouseHandler.access$1500(javafx.graphics@9-ea/Scene.java:3618) at javafx.scene.Scene.impl_processMouseEvent(javafx.graphics@9-ea/Scene.java:1879) at javafx.scene.Scene$ScenePeerListener.mouseEvent(javafx.graphics@9-ea/Scene.java:2627) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(javafx.graphics@9-ea/GlassViewEventHandler.java:381) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(javafx.graphics@9-ea/GlassViewEventHandler.java:294) at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method) at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(javafx.graphics@9-ea/GlassViewEventHandler.java:417) at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(javafx.graphics@9-ea/QuantumToolkit.java:388) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(javafx.graphics@9-ea/GlassViewEventHandler.java:416) at com.sun.glass.ui.View.handleMouseEvent(javafx.graphics@9-ea/View.java:555) at com.sun.glass.ui.View.notifyMouse(javafx.graphics@9-ea/View.java:937) 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:189) at java.lang.Thread.run(java.base@9-ea/Thread.java:804) Caused by: java.lang.ClassNotFoundException: javafx.scene.control.ButtonBuilder at sun.plugin2.applet.Plugin2ClassLoader$2.run(jdk.plugin@9-ea/Plugin2ClassLoader.java:912) at sun.plugin2.applet.Plugin2ClassLoader$2.run(jdk.plugin@9-ea/Plugin2ClassLoader.java:905) at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method) at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(jdk.plugin@9-ea/Plugin2ClassLoader.java:905) at sun.plugin2.applet.JNLP2ClassLoader.findClass(jdk.plugin@9-ea/JNLP2ClassLoader.java:377) at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(jdk.plugin@9-ea/Plugin2ClassLoader.java:218) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(jdk.plugin@9-ea/Plugin2ClassLoader.java:191) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(jdk.plugin@9-ea/Plugin2ClassLoader.java:179) at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:419) ... 68 more
11-05-2016