Closed PredatorVI closed 4 years ago
After fiddling around to make sure my project was running using Java8 and not the default JRE used by the deployment tool, I see a slightly different, but similar error. It acts like there is a missing implementation of some of the JavaFX stuff, but JavaFX is supposed to be part of the Oracle Java 1.8.0u212 JDK is not?
[2019-09-19T21:26:56.348][Instance 1][Port 37286] Using java-based Pisces rasterizer
[2019-09-19T21:26:56.348][Instance 1][Port 37286] Not using dirty region optimizations
[2019-09-19T21:26:56.348][Instance 1][Port 37286] Not using texture mask for primitives
[2019-09-19T21:26:56.348][Instance 1][Port 37286] Not forcing power of 2 sizes for textures
[2019-09-19T21:26:56.348][Instance 1][Port 37286] Using hardware CLAMP_TO_ZERO mode
[2019-09-19T21:26:56.349][Instance 1][Port 37286] Not opting in for HiDPI pixel scaling
[2019-09-19T21:26:56.361][Instance 1][Port 37286] Prism pipeline name = com.sun.prism.sw.SWPipeline
[2019-09-19T21:26:56.361][Instance 1][Port 37286] *** Fallback to Prism SW pipeline
[2019-09-19T21:26:56.365][Instance 1][Port 37286] (X) Got class = class com.sun.prism.sw.SWPipeline
[2019-09-19T21:26:56.366][Instance 1][Port 37286] Initialized prism pipeline: com.sun.prism.sw.SWPipeline
[2019-09-19T21:26:56.415][Instance 1][Port 37286] vsync: true vpipe: false
[2019-09-19T21:26:56.582][Instance 1][Port 37286] Exception in Application start method
[2019-09-19T21:26:56.585][Instance 1][Port 37286] QuantumRenderer: shutdown
[2019-09-19T21:26:56.590][Instance 1][Port 37286] java.lang.RuntimeException: Exception in Application start method
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$180(LauncherImpl.java:182)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at java.lang.Thread.run(Thread.java:748)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] Caused by: java.lang.AbstractMethodError: com.sun.glass.ui.Timer._resume(J)V
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.glass.ui.Timer.resume(Timer.java:151)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.javafx.tk.quantum.QuantumToolkit.resumeTimer(QuantumToolkit.java:511)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.javafx.tk.quantum.QuantumToolkit.access$000(QuantumToolkit.java:135)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.javafx.tk.quantum.QuantumToolkit$PulseTask.set(QuantumToolkit.java:202)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.javafx.tk.quantum.QuantumToolkit.setAnimationRunnable(QuantumToolkit.java:865)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.javafx.tk.quantum.MasterTimer.postUpdateAnimationRunnable(MasterTimer.java:105)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.updateAnimationRunnable(AbstractMasterTimer.java:324)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.access$100(AbstractMasterTimer.java:253)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at com.sun.scenario.animation.AbstractMasterTimer.addAnimationTimer(AbstractMasterTimer.java:210)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at javafx.animation.AnimationTimer.start(AnimationTimer.java:104)
[2019-09-19T21:26:56.590][Instance 1][Port 37286] at javafx.scene.web.WebEngine$PulseTimer.start(WebEngine.java:1233)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at javafx.scene.web.WebEngine$PulseTimer.access$1000(WebEngine.java:1210)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at javafx.scene.web.WebEngine.<init>(WebEngine.java:902)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at javafx.scene.web.WebEngine.<init>(WebEngine.java:868)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at javafx.scene.web.WebView.<init>(WebView.java:273)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at com.machinepublishers.jbrowserdriver.App.start(App.java:123)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$187(LauncherImpl.java:863)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$165(PlatformImpl.java:326)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at com.sun.javafx.application.PlatformImpl.lambda$null$163(PlatformImpl.java:295)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at java.security.AccessController.doPrivileged(Native Method)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at com.sun.javafx.application.PlatformImpl.lambda$runLater$164(PlatformImpl.java:294)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at com.machinepublishers.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:94)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] at com.machinepublishers.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:53)
[2019-09-19T21:26:56.591][Instance 1][Port 37286] ... 1 more
[2019-09-19T21:26:56.591][Instance 1][Port 37286] ```
I don't suppose you are using Settings.Builder and calling headless(false)
? (Which wouldn't work on a server like Ubuntu with no window manager installed)
Seems like maybe it can't find the headless toolkit impl (a fork of Monocle which ships with the project).
Let me know any custom Settings.Builder settings and I will try to reproduce. Thanks for all the env details.
Do openjdk-8-jre and openjdk-8-jre-headless install to different paths? Maybe try one vs the other.
This is my builder code:
Settings dcJBrowser = Settings.builder()
.userAgent(UserAgent.CHROME)
.headless(true)
.ssl("trustanything")
.hostnameVerification(false)
.loggerLevel(Level.ALL)
.logJavascript(true)
.processes(50)
.javaOptions("-Dprism.verbose=true", "-Dprism.useFontConfig=false")
.build();
JBrowserDriver jbrowser = new JBrowserDriver(dcJBrowser);
I removed (to be safe) the openjdk-8-jdk and openjdk-8-jre and made sure only the headless version was installed. It wasn't obvious which was being used. I then did the update-alternatives and selected the openjdk version, set the /usr/lib/jvm/default-java symlink to the openjdk version, updated my tools to use the openjdk JAVA_HOME and still had similar issues.
I can't figure out what changed. I'm going all out and installing ubuntu-desktop and will keep trying.
I installed ubuntu-desktop, installed openjfx (again) and the non-headless version of openjdk-8-jre and openjdk-8-jdk and rebuilt/reran my test code.
root@go-agent01:~# dpkg -l | grep openj
ii libopenjfx-java 8u60-b27-4 all JavaFX/OpenJFX 8 - Rich client application platform for Java (Java libraries)
ii libopenjfx-jni 8u60-b27-4 amd64 JavaFX/OpenJFX 8 - Rich client application platform for Java (native libraries)
ii libopenjpeg5:amd64 1:1.5.2-3.1 amd64 JPEG 2000 image compression/decompression library - runtime
ii openjdk-8-jdk:amd64 8u222-b10-1ubuntu1~16.04.1 amd64 OpenJDK Development Kit (JDK)
ii openjdk-8-jdk-headless:amd64 8u222-b10-1ubuntu1~16.04.1 amd64 OpenJDK Development Kit (JDK) (headless)
ii openjdk-8-jre:amd64 8u222-b10-1ubuntu1~16.04.1 amd64 OpenJDK Java runtime, using Hotspot JIT
ii openjdk-8-jre-headless:amd64 8u222-b10-1ubuntu1~16.04.1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)
ii openjfx 8u60-b27-4 amd64 JavaFX/OpenJFX 8 - Rich client application platform for Java
[2019-09-20T16:22:08.822][Instance 1][Port 36865] Prism pipeline init order: sw
[2019-09-20T16:22:08.822][Instance 1][Port 36865] Using java-based Pisces rasterizer
[2019-09-20T16:22:08.822][Instance 1][Port 36865] Not using dirty region optimizations
[2019-09-20T16:22:08.822][Instance 1][Port 36865] Not using texture mask for primitives
[2019-09-20T16:22:08.823][Instance 1][Port 36865] Not forcing power of 2 sizes for textures
[2019-09-20T16:22:08.823][Instance 1][Port 36865] Using hardware CLAMP_TO_ZERO mode
[2019-09-20T16:22:08.823][Instance 1][Port 36865] Not opting in for HiDPI pixel scaling
[2019-09-20T16:22:08.828][Instance 1][Port 36865] Prism pipeline name = com.sun.prism.sw.SWPipeline
[2019-09-20T16:22:08.828][Instance 1][Port 36865] *** Fallback to Prism SW pipeline
[2019-09-20T16:22:08.831][Instance 1][Port 36865] (X) Got class = class com.sun.prism.sw.SWPipeline
[2019-09-20T16:22:08.832][Instance 1][Port 36865] Initialized prism pipeline: com.sun.prism.sw.SWPipeline
[2019-09-20T16:22:08.880][Instance 1][Port 36865] vsync: true vpipe: false
[2019-09-20T16:22:09.041][Instance 1][Port 36865] Exception in Application start method
[2019-09-20T16:22:09.049][Instance 1][Port 36865] QuantumRenderer: shutdown
[2019-09-20T16:22:09.052][Instance 1][Port 36865] java.lang.RuntimeException: Exception in Application start method
[2019-09-20T16:22:09.052][Instance 1][Port 36865] at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
[2019-09-20T16:22:09.052][Instance 1][Port 36865] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$180(LauncherImpl.java:182)
[2019-09-20T16:22:09.052][Instance 1][Port 36865] at java.lang.Thread.run(Thread.java:748)
[2019-09-20T16:22:09.052][Instance 1][Port 36865] Caused by: java.lang.AbstractMethodError: com.sun.glass.ui.Timer._resume(J)V
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.glass.ui.Timer.resume(Timer.java:151)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.javafx.tk.quantum.QuantumToolkit.resumeTimer(QuantumToolkit.java:511)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.javafx.tk.quantum.QuantumToolkit.access$000(QuantumToolkit.java:135)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.javafx.tk.quantum.QuantumToolkit$PulseTask.set(QuantumToolkit.java:202)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.javafx.tk.quantum.QuantumToolkit.setAnimationRunnable(QuantumToolkit.java:865)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.javafx.tk.quantum.MasterTimer.postUpdateAnimationRunnable(MasterTimer.java:105)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.updateAnimationRunnable(AbstractMasterTimer.java:324)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.access$100(AbstractMasterTimer.java:253)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.scenario.animation.AbstractMasterTimer.addAnimationTimer(AbstractMasterTimer.java:210)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at javafx.animation.AnimationTimer.start(AnimationTimer.java:104)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at javafx.scene.web.WebEngine$PulseTimer.start(WebEngine.java:1233)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at javafx.scene.web.WebEngine$PulseTimer.access$1000(WebEngine.java:1210)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at javafx.scene.web.WebEngine.<init>(WebEngine.java:902)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at javafx.scene.web.WebEngine.<init>(WebEngine.java:868)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at javafx.scene.web.WebView.<init>(WebView.java:273)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.machinepublishers.jbrowserdriver.App.start(App.java:123)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$187(LauncherImpl.java:863)
[2019-09-20T16:22:09.053][Instance 1][Port 36865] at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$165(PlatformImpl.java:326)
[2019-09-20T16:22:09.054][Instance 1][Port 36865] at com.sun.javafx.application.PlatformImpl.lambda$null$163(PlatformImpl.java:295)
[2019-09-20T16:22:09.054][Instance 1][Port 36865] at java.security.AccessController.doPrivileged(Native Method)
[2019-09-20T16:22:09.054][Instance 1][Port 36865] at com.sun.javafx.application.PlatformImpl.lambda$runLater$164(PlatformImpl.java:294)
[2019-09-20T16:22:09.054][Instance 1][Port 36865] at com.machinepublishers.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:94)
[2019-09-20T16:22:09.054][Instance 1][Port 36865] at com.machinepublishers.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:53)
[2019-09-20T16:22:09.054][Instance 1][Port 36865] ... 1 more
[2019-09-20T16:22:09.054][Instance 1][Port 36865]
I upgraded to use jBrowserDriver v 1.1.0-RC2. The tests don't hang but using jBrowserDriver throws the following:
org.openqa.selenium.WebDriverException: org/openqa/selenium/WindowType
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'go-agent01.wp.bluecoat.com', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-164-generic', java.version: '1.8.0_212'
Driver info: driver.version: JBrowserDriver
at com.machinepublishers.jbrowserdriver.Util.handleException(Util.java:136)
at com.machinepublishers.jbrowserdriver.JBrowserDriver.getKeyboard(JBrowserDriver.java:1007)
at org.openqa.selenium.interactions.Actions.<init>(Actions.java:69)
at com.bluecoat.webpulse.qa.selenium.SeleniumBase.getDriver(SeleniumBase.java:346)
at com.bluecoat.webpulse.qa.selenium.SeleniumDriverFactory.get(SeleniumDriverFactory.java:88)
at com.bluecoat.webpulse.qa.accountprovisioner.AccountProvisionerTestBase.validateThreatExplorerSignup(AccountProvisionerTestBase.java:115)
at com.bluecoat.webpulse.qa.accountprovisioner.Test_Endpoint_TexAdv_TrialSubscription.test_TexAdvanced_AddTrialUsingAddProductReasonCode(Test_Endpoint_TexAdv_TrialSubscription.java:273)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:505)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:135)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:193)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:94)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:146)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.NoClassDefFoundError: org/openqa/selenium/WindowType
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at sun.rmi.server.Util.getRemoteInterfaces(Util.java:244)
at sun.rmi.server.Util.getRemoteInterfaces(Util.java:216)
at sun.rmi.server.Util.createProxy(Util.java:146)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:226)
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:383)
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:346)
at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:225)
at com.machinepublishers.jbrowserdriver.RemoteObject.<init>(RemoteObject.java:26)
at com.machinepublishers.jbrowserdriver.TargetLocatorServer.<init>(TargetLocatorServer.java:33)
at com.machinepublishers.jbrowserdriver.Context.init(Context.java:109)
at com.machinepublishers.jbrowserdriver.JBrowserDriverServer.init(JBrowserDriverServer.java:175)
at com.machinepublishers.jbrowserdriver.JBrowserDriverServer.getKeyboard(JBrowserDriverServer.java:518)
at com.machinepublishers.jbrowserdriver.JBrowserDriverServer.getKeyboard(JBrowserDriverServer.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.WindowType
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 34 more
I've reverted back to trying to get Oracle Java 8u221 (updated from 8u212) working. I don't have the full ubuntu-desktop installed. I did install the full gtk+2.0 set of packages. I've reverted my code back to using Selenium 3.141.0 (same as jbrowserdriver v1.0.1) but with the same results.
Am I correct in my understanding that jBrowserDriver v1.0.1 should work with Oracle JDK 8 (any revision)?
It likely isn't just a headless Linux issue. I'm seeing the same behavior on Windows. I've attached my full dependency tree and system properties that includes the full class path. Maybe something obvious will jump out at someone. The specific exception is:
Caused by: java.lang.AbstractMethodError: com.sun.glass.ui.Timer._resume(J)V
I tried setting breakpoints but it seems it's in a separate process and I'm not quite sure how to enable debugging at that level.
I think I'm missing something simple because I had this working, but it seems related to JavaFX. However, the messages are different than the first time I worked through issues and I've been unsuccessful finding a workaround/resolution. My environment is:
Oracle Java 1.8.0u212 Ubuntu 16.04 (latest patches as of 9/18/2019) Maven 3.3.9 JBrowserDriver v1.0.1 (newer RCx versions hang during startup) Other packages: openjfx, openjdk-8-jre, openjdk-8-jre-headless, libgtk2.0-bin
When I run it, I see the following output and my test hangs. I hope someone with more experience/knowledge can direct me to the right solution. Thanks!