My eclipse (STS 3.9.2 oxygen, On Ubuntu 16.04, JDK 9.0.4) keeps giving following error. The code used to compile/work fine earlier and only change made was JDK version from 1.8 to 9 and maven compiler plugin was changed accordingly.
Class in question is trying to implement interface org.openqa.selenium.WebElement and get no problems with any other methods.
- Command line compilation with Maven/Java 9 compiles fine
- If I comment the method and ask eclipse to implement missing methods, it generates exact same signature and then complains that method not implemented/override.
- I have tried removing all .project files, and with a new workspace with same results.
Description Resource Path Location Type
The method sendKeys(CharSequence...) of type JavaScriptDriver.JSWebElement must override or implement a supertype method JavaScriptDriver.java /selenium-shared/src/main/java/com/finovera/downloader/driver line 287 Java Problem
The type JavaScriptDriver.JSWebElement must implement the inherited abstract method WebElement.sendKeys(CharSequence...) JavaScriptDriver.java /selenium-shared/src/main/java/com/finovera/downloader/driver line 98 Java Problem
One more update. This looks like a bug in eclipse compiler as it logging exception as follows in the work space log file. With the assumption I'm looking at right version of the file ClassFileReader.java, it seems like it has to do something about how some library is compiled. Unfortunately log file does not log any other useful information.
Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.getMemberTypes(ClassFileReader.java:712) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:419) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:1022) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:1003) at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:303) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:249)
It's very hard to create a test case. I created another implementation and compiles fine. Copy same block to offending file, compiler error shows up. Trying to dissemble complicated piece of code to which part it's not happy with.
