Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Build is failing when switching to Java 11

I am working on upgrading my e4 RCP application to Java 11. All the plugins and features compile just fine in the IDE and I can export the product and run it. I'm trying to get the Tycho build working again with the new java version. Unfortunately, I'm getting some strange errors that I can't make sense of. It is almost as if there are two versions of java be used and they are clashing. 

Any suggestions for how to debug these errors?

Thanks,
Ken


[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.1.0:compile (default-compile) on project com.example.core.util: Compilation failure: Compilation failure:
[ERROR] /Users/ken/gitlab/mainExample/bundles/com.example.core.util/src/com/example/core/util/saving/OldSaveFileReader.java:[1559]
[ERROR] TheWriteMethod = Current.getClass().getMethod("readObject", ClassParameterArray);
[ERROR]                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from Method to Method
[ERROR] /Users/ken/gitlab/mainExample/bundles/com.example.core.util/src/com/example/core/util/SWTResourceManager.java:[162]
[ERROR] image = getImage(clazz.getResourceAsStream(path));
[ERROR]        ^^^^^^^^
[ERROR] The method getImage(java.io.InputStream) in the type SWTResourceManager is not applicable for the arguments (java.io.InputStream)
[ERROR] /Users/ken/gitlab/mainExample/bundles/com.example.core.util/src/com/example/core/util/ResourceManager.java:[370]
[ERROR] Method getBundleMethod = BundleContextClass.getMethod("getBundle", new Class[0]); //$NON-NLS-1$
[ERROR]                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from Method to Method
[ERROR] /Users/ken/gitlab/mainExample/bundles/com.example.core.util/src/com/example/core/util/ResourceManager.java:[374]
[ERROR] Constructor<?> pathConstructor = PathClass.getConstructor(new Class[]{String.class});
[ERROR]                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from Constructor<capture#8-of ?> to Constructor<?>
[ERROR] /Users/ken/gitlab/mainExample/bundles/com.example.core.util/src/com/example/core/util/ResourceManager.java:[379]
[ERROR] Method findMethod = PlatformClass.getMethod("find", new Class[]{BundleClass, IPathClass}); //$NON-NLS-1$
[ERROR]                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from Method to Method
[ERROR] /Users/ken/gitlab/mainExample/bundles/com.example.core.util/src/com/example/core/util/ResourceManager.java:[391]
[ERROR] Constructor<?> pathConstructor = PathClass.getConstructor(new Class[]{String.class});
[ERROR]                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from Constructor<capture#19-of ?> to Constructor<?>
[ERROR] /Users/ken/gitlab/mainExample/bundles/com.example.core.util/src/com/example/core/util/ResourceManager.java:[395]
[ERROR] Method findMethod = PluginClass.getMethod("find", new Class[]{IPathClass}); //$NON-NLS-1$
[ERROR]                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from Method to Method
[ERROR] /Users/ken/gitlab/mainExample/bundles/com.example.core.util/src/com/example/core/util/saving/OldSaveFileWriter.java:[825]
[ERROR] TheWriteMethod = Current.getClass().getMethod("writeObject", ClassParameterArray);
[ERROR]                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from Method to Method
[ERROR] 8 problems (8 errors)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :com.example.core.util

Back to the top