Details
-
Type:
Epic
-
Status: To-Do (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 10.0.0 Major Release
-
Labels:None
-
Epic Name:Run IGB in Java 21
-
Story Points:5
-
Sprint:Summer 4 2022 July 4, Spring 2 2023 Jan 16, Spring 3 2023 Feb 1
Description
IGB uses Java 1.8, a very old version of Java that is not well supported anymore.
For this task, determine if we can build and run IGB using a more up-to-date JVM.
Javafx: https://search.maven.org/artifact/org.openjfx/javafx/18.0.1/pom
For notes on how we did different parts, see: IGBF-3513
Attachments
- jdepOutput.txt
- 128 kB
Activity
Removing the following lines from parent pom:
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target>
Same result.
Tried using JDK 11 (from Azul), same error occurred.
Why is bug reporting happening at Oracle, not openjdk?
Updated maven-compiler-plugin to version 3.10.1.
Removed all configurations and added configuration:
<configuration> <release>8</release> </configuration>
Project was then able to build using oracle jdk until the following error was reached:
[INFO] Running com.lorainelab.igb.preferences.IgbPreferencesParseTest
[ERROR] Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.089 s <<< FAILURE! - in com.lorainelab.igb.preferences.IgbPreferencesParseTest
[ERROR] readJsonIgbPrefs(com.lorainelab.igb.preferences.IgbPreferencesParseTest) Time elapsed: 0.07 s <<< ERROR!
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)[ERROR] checkForDataProviderId(com.lorainelab.igb.preferences.IgbPreferencesParseTest) Time elapsed: 0.001 s <<< ERROR!
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)[ERROR] checkForDataProviderName(com.lorainelab.igb.preferences.IgbPreferencesParseTest) Time elapsed: 0 s <<< ERROR!
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)[ERROR] checkForDataProviderLoadPriority(com.lorainelab.igb.preferences.IgbPreferencesParseTest) Time elapsed: 0.001 s <<< ERROR!
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)[ERROR] writePreferencesToJsonFromModel(com.lorainelab.igb.preferences.IgbPreferencesParseTest) Time elapsed: 0 s <<< ERROR!
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at com.lorainelab.igb.preferences.IgbPreferencesParseTest.init(IgbPreferencesParseTest.java:30)[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] IgbPreferencesParseTest.init:30 NoClassDefFound javax/xml/bind/JAXBException
[ERROR] IgbPreferencesParseTest.init:30 NoClassDefFound javax/xml/bind/JAXBException
[ERROR] IgbPreferencesParseTest.init:30 NoClassDefFound javax/xml/bind/JAXBException
[ERROR] IgbPreferencesParseTest.init:30 NoClassDefFound javax/xml/bind/JAXBException
[ERROR] IgbPreferencesParseTest.init:30 NoClassDefFound javax/xml/bind/JAXBException
[INFO]
[ERROR] Tests run: 5, Failures: 0, Errors: 5, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for IGB Project 9.1.10:
[INFO]
[INFO] IGB Project ........................................ SUCCESS [ 0.037 s]
[INFO] Core - Heatmap Editor .............................. SUCCESS [ 2.766 s]
[INFO] Core - Affymetrix Common ........................... SUCCESS [ 7.845 s]
[INFO] Plugin - Sorting API and Impl ...................... SUCCESS [ 8.568 s]
[INFO] Plugin - Data caching API .......................... SUCCESS [ 0.103 s]
[INFO] Core - Synonym Lookup .............................. SUCCESS [ 2.914 s]
[INFO] Core - Genometry (Data Models) ..................... SUCCESS [ 11.593 s]
[INFO] Core - Preferences ................................. FAILURE [ 1.555 s]
According to this StackOverFlow post (https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception) the required code was removed in later versions of Java. Thus, the classes are not on the JDK classpath.
Compiled again but skipping tests. Above error avoided. Got new error related to JavaFX:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project igb-javafx-util: Compilation failure: Compilation failure:
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[10,26] package javafx.application does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[11,26] package javafx.embed.swing does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[12,20] package javafx.stage does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[19,26] cannot find symbol
[ERROR] symbol: class JFXPanel
[ERROR] location: class org.lorainelab.igb.javafx.DirectoryChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[78,13] cannot find symbol
[ERROR] symbol: class DirectoryChooser
[ERROR] location: class org.lorainelab.igb.javafx.DirectoryChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[12,26] package javafx.application does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[13,26] package javafx.embed.swing does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[14,20] package javafx.stage does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[15,32] package javafx.stage.FileChooser does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[22,26] cannot find symbol
[ERROR] symbol: class JFXPanel
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[27,27] cannot find symbol
[ERROR] symbol: class ExtensionFilter
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[28,20] cannot find symbol
[ERROR] symbol: class ExtensionFilter
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[63,57] cannot find symbol
[ERROR] symbol: class ExtensionFilter
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[97,13] cannot find symbol
[ERROR] symbol: class FileChooser
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[200,12] cannot find symbol
[ERROR] symbol: class ExtensionFilter
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[19,64] cannot find symbol
[ERROR] symbol: class JFXPanel
[ERROR] location: class org.lorainelab.igb.javafx.DirectoryChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[55,13] cannot find symbol
[ERROR] symbol: variable Platform
[ERROR] location: class org.lorainelab.igb.javafx.DirectoryChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[57,27] cannot find symbol
[ERROR] symbol: class DirectoryChooser
[ERROR] location: class org.lorainelab.igb.javafx.DirectoryChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[79,9] cannot find symbol
[ERROR] symbol: class DirectoryChooser
[ERROR] location: class org.lorainelab.igb.javafx.DirectoryChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[79,43] cannot find symbol
[ERROR] symbol: class DirectoryChooser
[ERROR] location: class org.lorainelab.igb.javafx.DirectoryChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[22,64] cannot find symbol
[ERROR] symbol: class JFXPanel
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[74,13] cannot find symbol
[ERROR] symbol: variable Platform
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[76,27] cannot find symbol
[ERROR] symbol: class FileChooser
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[98,9] cannot find symbol
[ERROR] symbol: class FileChooser
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[98,39] cannot find symbol
[ERROR] symbol: class FileChooser
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[127,13] cannot find symbol
[ERROR] symbol: variable Platform
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[129,27] cannot find symbol
[ERROR] symbol: class FileChooser
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[174,13] cannot find symbol
[ERROR] symbol: variable Platform
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[176,27] cannot find symbol
[ERROR] symbol: class FileChooser
[ERROR] location: class org.lorainelab.igb.javafx.FileChooserUtil
[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 :igb-javafx-util
Trying again, using Zulu JDK 18+FX:
mvn -DskipTests=true clean package
Error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.015 s
[INFO] Finished at: 2022-07-08T10:51:00-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project igb-javafx-util: Compilation failure: Compilation failure:
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[10,26] package javafx.application does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[11,26] package javafx.embed.swing does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[12,20] package javafx.stage does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[19,26] cannot find symbol
[ERROR] symbol: class JFXPanel
[ERROR] location: class org.lorainelab.igb.javafx.DirectoryChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/DirectoryChooserUtil.java:[78,13] cannot find symbol
[ERROR] symbol: class DirectoryChooser
[ERROR] location: class org.lorainelab.igb.javafx.DirectoryChooserUtil
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[12,26] package javafx.application does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[13,26] package javafx.embed.swing does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[14,20] package javafx.stage does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[15,32] package javafx.stage.FileChooser does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-javafx-util/src/main/java/org/lorainelab/igb/javafx/FileChooserUtil.java:[22,26] cannot find symbol
Solved above by adding JavaFX artifacts: javafx-swing and javafx-controls, versions 17.
This was helpful:
https://github.com/openjfx/samples/blob/master/CommandLine/Non-modular/Maven/hellofx/pom.xml
Got new error:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb/src/main/java/com/affymetrix/igb/view/load/FeatureTreeView.java:[17,54] package com.sun.java.swing.plaf.windows.WindowsBorders does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb/src/main/java/com/affymetrix/igb/view/load/FeatureTreeView.java:[536,30] cannot find symbol
symbol: class DashedBorder
location: class com.affymetrix.igb.view.load.FeatureTreeView.FeatureTreeCellRenderer
[INFO] 2 errors
[INFO] -------------------------------------------------------------
Possible fix:
https://javaworklife.wordpress.com/2019/02/03/java-8-to-java-11-part-2/
Edited com.affymetrix.igb.view.load.FeatureTreeView.FeatureTreeCellRenderer because package com.sun.java.swing.plaf.windows is gone:
//import com.sun.java.swing.plaf.windows.WindowsBorders.DashedBorder; import javax.swing.BorderFactory; .. // border = new DashedBorder(selectionBorderColor); border = BorderFactory.createDashedBorder(selectionBorderColor);
Next error:
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[39,19] package javafx.fxml does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[40,19] package javafx.fxml does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[65,24] package javafx.scene.web does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[66,24] package javafx.scene.web does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[68,27] package netscape.javascript does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[69,27] package netscape.javascript does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[83,13] cannot find symbol
[ERROR] symbol: class WebView
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[97,13] cannot find symbol
[ERROR] symbol: class WebEngine
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[82,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[84,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[86,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[88,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[90,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[92,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[94,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[205,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[256,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[294,6] cannot find symbol
[ERROR] symbol: class FXML
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[229,9] cannot find symbol
[ERROR] symbol: class JSObject
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[229,27] cannot find symbol
[ERROR] symbol: class JSObject
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[265,13] cannot find symbol
[ERROR] symbol: class JSObject
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[265,31] cannot find symbol
[ERROR] symbol: class JSObject
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[269,22] cannot find symbol
[ERROR] symbol: class JSException
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[278,9] cannot find symbol
[ERROR] symbol: class FXMLLoader
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[278,33] cannot find symbol
[ERROR] symbol: class FXMLLoader
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[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 :plugins-manager
Added new artifact: javafx-web to project. Imported javafx-web, javafx-fxml, and javafx-controls into plugin-manager pom.xml. This resolved all the above errors except for the netscape related errors shown below:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project plugins-manager: Compilation failure: Compilation failure:
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[68,27] package netscape.javascript does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[69,27] package netscape.javascript does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[229,9] cannot find symbol
[ERROR] symbol: class JSObject
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[229,27] cannot find symbol
[ERROR] symbol: class JSObject
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[265,13] cannot find symbol
[ERROR] symbol: class JSObject
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[265,31] cannot find symbol
[ERROR] symbol: class JSObject
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/AppManagerFxPanel.java:[269,22] cannot find symbol
[ERROR] symbol: class JSException
[ERROR] location: class org.lorainelab.igb.plugin.manager.AppManagerFxPanel
[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 :plugins-manager
Need to find out what to use instead of netscape packages.
Found this issue from several years ago: https://bugs.openjdk.org/browse/JDK-8132743
See JDK-8090136 for some of the background on this. We need to create a new jdk module for the netscape.javascript package that is used in liveconnect for AWT and FX applets (to allow an applet to access the applet web page via JavaScript), and also for FX WebVIew in the JavaScript bridge.
The implementation of the JSObject.getWindow(Applet) method will need to move to a class in the plugin module. This should be a reasonably straight-forward refactoring.
This new module will need to be moved to the (open) jdk repo so that we don't have a situation where the open part of FX depends on a closed module to build it.
I wonder if this "netscape" javascript module is related to the JavaFX issue Java 1.8 issue being worked on by Nowlan? (cc: Nowlan Freese)
Trying to fix the above error by adding javafx dependencies to App Manager module and adding new artifact to parent pom.
New artifacts added:
<dependency> <groupId>org.openjfx</groupId> <artifactId>javafx-fxml</artifactId> <version>${javafx.version}</version> </dependency>
Including javafx-controls and javafx-fxml to app manager "plugins/plugin-manager/".
Changed parent POM to specify java18 and remove "release" tag. This caused errors in Preferences module:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project igb-preferences: Compilation failure: Compilation failure:
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-preferences/src/main/java/org/lorainelab/igb/preferences/IgbPreferencesParser.java:[15,22] package javax.xml.bind does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-preferences/src/main/java/org/lorainelab/igb/preferences/IgbPreferencesParser.java:[16,22] package javax.xml.bind does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-preferences/src/main/java/org/lorainelab/igb/preferences/IgbPreferencesParser.java:[17,22] package javax.xml.bind does not exist
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-preferences/src/main/java/org/lorainelab/igb/preferences/IgbPreferencesParser.java:[31,13] cannot find symbol
[ERROR] symbol: class JAXBContext
[ERROR] location: class org.lorainelab.igb.preferences.IgbPreferencesParser
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-preferences/src/main/java/org/lorainelab/igb/preferences/IgbPreferencesParser.java:[32,13] cannot find symbol
[ERROR] symbol: class Unmarshaller
[ERROR] location: class org.lorainelab.igb.preferences.IgbPreferencesParser
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb-preferences/src/main/java/org/lorainelab/igb/preferences/model/IgbPreferences.java:[7,33] package javax.xml.bind.annotation does not exist
...
According to June 2022 update to this question on stackoverflow.com, titled "Java 11 package javax.xml.bind does not exist [duplicate]", we lost package javax.xml.bind in higher versions of the JDK.
To restore it, we can do something like;
<dependency> <groupId>jakarta.xml.bind</groupId> <artifactId>jakarta.xml.bind-api</artifactId> <version>4.0.0</version> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <version>4.0.0</version> <scope>runtime</scope> </dependency>
Unfortunately several of the previous comments are no longer relevant because I was incorrectly using release tag in the compiler plugin configuration section.
Committed my work thus far to my fork on branch. See:
https://bitbucket.org/aloraine/integrated-genome-browser/branch/IGBF-3142
As of commit:
"IGBF-3142 Add jakarta (for XML) to module pom; update code to use package name jakarta not javax"
Latest build error is:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project igb: Compilation failure: Compilation failure:
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb/src/main/java/com/affymetrix/igb/view/load/FeatureTreeView.java:[184,52] incompatible types: java.util.Enumeration<capture#1 of ? extends javax.swing.tree.TreeNode> cannot be converted to java.util.Enumeration<javax.swing.tree.TreeNode>
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb/src/main/java/com/affymetrix/igb/view/load/FeatureTreeView.java:[279,63] incompatible types: java.util.Enumeration<javax.swing.tree.TreeNode> cannot be converted to java.util.Enumeration<javax.swing.tree.DefaultMutableTreeNode>
[ERROR] /Users/aloraine/src/aloraine-integrated-genome-browser/core/igb/src/main/java/com/affymetrix/igb/view/load/FeatureTreeView.java:[862,81] incompatible types: java.util.Enumeration<javax.swing.tree.TreeNode> cannot be converted to java.util.Enumeration<javax.swing.tree.DefaultMutableTreeNode>
According to this StackOverflow post, the Enumerations returned by TreeNode interface and implementing subclasses now contain generics, starting with Java 10.
Project now builds under JDK 18. Next: need to ensure that it can run. Probably need to incorporate the javax and jakarta code into the big OSGi bundle?
I spoke too soon. The compile phase completes but "install" fails with a maven bundle plugin error:
[ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:3.0.0:bundle (default-bundle) on project heatmap-editor: Internal error in maven-bundle-plugin: Null query -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.felix:maven-bundle-plugin:3.0.0:bundle (default-bundle) on project heatmap-editor: Internal error in maven-bundle-plugin
Maybe updating the plugin would be a good idea now? Current version info: https://mvnrepository.com/artifact/org.apache.felix/maven-bundle-plugin/5.1.6
Tabling this for when more time is available and the need is greater.
Using Azul Zulu version 17.0.5+8 (zulu17.38.21-ca-fx-jdk17.0.5-macosx_x64)
Changed source and target to 17 in pom.xml.
After mvn clean install seeing the same error as Dr. Loraine reported in the previous comment regarding heatmap-editor. Changed maven-bundle-plugin to most recent version (5.1.8).
After mvn clean install seeing new error:
[WARNING] Bundle org.lorainelab.igb:external-sort:bundle:9.1.10 : Service-Component is normally generated by bnd. If you want to point at specific component XML files (wildcards are allowed, see findEntries) make sure it ends in '.xml'. Found *
[ERROR] Bundle org.lorainelab.igb:external-sort:bundle:9.1.10 : Service-Component refers to com.google.code.externalsorting.ExternalMergeSort that is annotated with the deprecated bnd Component annotation. Support for this was removed in 4.0.0 because they were taken over by OSGi. Please update to the comparable OSGi annotations
ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:5.1.8:bundle (default-bundle) on project external-sort: Error(s) found in bundle configuration -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.felix:maven-bundle-plugin:5.1.8:bundle (default-bundle) on project external-sort: Error(s) found in bundle configuration
Attempted to use the Application Binary Scanner Tool: https://www.ibm.com/support/pages/migration-toolkit-application-binaries
I was unable to get the tool to work on IGB as it requires a .war or .ear file.
java -jar binaryAppScanner.jar /Users/lorainelab/Documents/NowlanProjects/Repositories/nowlanfork-igb --all
The igb project pom.xml refers to three repos at maven.bioviz.org
There seems to be something going on with Service-Component annotations after updating the maven-bundle-plugin. These github issues talk about it, and I have seen the name Tim Ward pop up multiple times:
https://github.com/bndtools/bnd/issues/2522
https://github.com/bndtools/bnd/issues/2521
If I change all of the service components in every pom.xml from
<Service-Component>*</Service-Component>
to
<Service-Component>*.xml</Service-Component>
I do not get any errors when running mvn clean install -DskipTests but when I go to run igb from the jar it fails with
16:27:13.876 [main] ERROR com.affymetrix.main.Main - Error starting osgi runtime container
Changing the maven-bundle-plugin to version 3.5.1 (the version prior to 4.0.0) avoids the issues with the service components.
Running
mvn clean install -e -DskipTests
works, but then trying to start IGB from the jar leads to the following error:
ERROR com.affymetrix.main.Main - Error starting osgi runtime container
Running
mvn clean install -e
fails at Core - Quickload (data source) with the error
filesTagAsRoot(org.lorainelab.igb.quickload.utils.AnnotsParserTest) Time elapsed: 0.026 s <<< ERROR! java.lang.NullPointerException: Cannot invoke "jakarta.xml.bind.Unmarshaller.unmarshal(javax.xml.transform.Source)" because "this.primaryUnmarshaller" is null at org.lorainelab.igb.quickload.utils.AnnotsParserTest.filesTagAsRoot(AnnotsParserTest.java:18)
Reading through this blog: https://nipafx.dev/java-11-migration-guide/
Will try to get JDeps to run.
Then, need to investigate how to migrate the service components.
JDeps output attached as jdepOutput.txt
jdeps --class-path 'libs/*' -recursive igb_exe.jar > output.txt
Note: Unclear if I'm setting the --class-path variable correctly, I followed this blog: https://nipafx.dev/jdeps-tutorial-analyze-java-project-dependencies/
Some things that may be important from JDeps:
ch.qos.logback.classic.spi -> sun.reflect JDK removed internal API
com.google.common.primitives -> sun.misc JDK internal API (jdk.unsupported)
com.google.common.cache -> sun.misc JDK internal API (jdk.unsupported)
ch.qos.logback.classic -> javax.servlet.http not found
ch.qos.logback.classic.boolex -> groovy.lang not found
ch.qos.logback.classic.boolex -> org.codehaus.groovy.control not found
ch.qos.logback.classic.boolex -> org.codehaus.groovy.reflection not found
ch.qos.logback.classic.boolex -> org.codehaus.groovy.runtime not found
ch.qos.logback.classic.boolex -> org.codehaus.groovy.runtime.callsite not found
ch.qos.logback.classic.boolex -> org.codehaus.groovy.runtime.typehandling not found
ch.qos.logback.classic.gaffer -> groovy.lang not found
ch.qos.logback.classic.gaffer -> org.codehaus.groovy.control not found
ch.qos.logback.classic.gaffer -> org.codehaus.groovy.control.customizers not found
ch.qos.logback.classic.gaffer -> org.codehaus.groovy.reflection not found
ch.qos.logback.classic.gaffer -> org.codehaus.groovy.runtime not found
ch.qos.logback.classic.gaffer -> org.codehaus.groovy.runtime.callsite not found
ch.qos.logback.classic.gaffer -> org.codehaus.groovy.runtime.typehandling not found
ch.qos.logback.classic.gaffer -> org.codehaus.groovy.runtime.wrappers not found
ch.qos.logback.classic.helpers -> javax.servlet not found
ch.qos.logback.classic.helpers -> javax.servlet.http not found
ch.qos.logback.classic.net -> javax.jms not found
ch.qos.logback.classic.selector.servlet -> javax.servlet not found
ch.qos.logback.core.boolex -> org.codehaus.janino not found
ch.qos.logback.core.joran.conditional -> org.codehaus.commons.compiler not found
ch.qos.logback.core.joran.conditional -> org.codehaus.janino not found
ch.qos.logback.core.net -> javax.mail not found
ch.qos.logback.core.net -> javax.mail.internet not found
ch.qos.logback.core.status -> javax.servlet not found
ch.qos.logback.core.status -> javax.servlet.http not found
com.google.common.base -> javax.annotation not found
com.google.common.cache -> javax.annotation not found
com.google.common.collect -> javax.annotation not found
com.google.common.escape -> javax.annotation not found
com.google.common.eventbus -> javax.annotation not found
com.google.common.hash -> javax.annotation not found
com.google.common.html -> javax.annotation not found
com.google.common.io -> javax.annotation not found
com.google.common.math -> javax.annotation not found
com.google.common.net -> javax.annotation not found
com.google.common.primitives -> javax.annotation not found
com.google.common.reflect -> javax.annotation not found
com.google.common.util.concurrent -> javax.annotation not found
com.google.common.xml -> javax.annotation not found
Ran into issue during mvn clean install
jakarta.xml.bind.JAXBException: Implementation of Jakarta XML Binding-API has not been found on module path or classpath.
Solution was to provide the jaxb-impl within the quickload pom.xml though I am unclear if scope should be provided or runtime (blog).
<dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <scope>provided</scope> </dependency>
ch.qos.logback.classic.spi - found in ConsoleLogPanel.java and ErrorReporterManager.java
com.google.common.primitives - found in BookmarkUnibrowControlServlet.java
Now able to run mvn clean install with no errors.
When I go to run igb (java -jar igb_exe.jar) I get the following error:
ERROR com.affymetrix.main.OSGiHandler - Unable to resolve affymetrix-common [1](R 1.0): missing requirement [affymetrix-common [1](R 1.0)] osgi.ee; (osgi.ee=UNKNOWN) Unresolved requirements: [[affymetrix-common [1](R 1.0)] osgi.ee; (osgi.ee=UNKNOWN)]
This StackOverflow states:
You need a more recent version of maven-bundle-plugin based upon Bnd 4.0 which added support for Java 10 class files.
I'm currently using maven-bundle-plugin 3.5.1 which is the version prior to 4.0. In 4.0 the service-component annotation was deprecated, so it looks like my focus needs to be migrating away so that we can use maven-bundle-plugin > 3.5.1
Seeing
org.osgi.framework.BundleException: Importing java.* packages not allowed: java.awt
These posts may talk about the issue:
https://github.com/bndtools/bnd/issues/2507
https://liferay.dev/blogs/-/blogs/osgi-and-java-package-imports
Karthik found this blog which describes how to migrate from the old service component annotation:
https://medium.com/globant/declarative-services-from-felix-scr-to-osgi-4770509f1965
Additional blog posts discussing migrating to the new annotations:
https://blog.osoco.de/2016/05/migrating-from-the-apache-felix-scr-annotations-to-the-osgi-declarative-services-annotations/
http://www.sgaemsolutions.com/2017/07/migration-of-scr-annotations-to-osgi-r6.html
http://pelagic-open-source.blogspot.com/2015/08/convert-to-osgi-r6.html
Following this blog "Switching To OSGi R6 And Dumping bnd Annotations": http://pelagic-open-source.blogspot.com/2015/08/convert-to-osgi-r6.html
Changes so far to all files in project:
-import aQute.bnd.annotation.component.Component;
+import org.osgi.service.component.annotations.Component;
-provide =
+service =
-import aQute.bnd.annotation.component.Reference;
+import org.osgi.service.component.annotations.Reference;
-import aQute.bnd.annotation.component.Activate;
+import org.osgi.service.component.annotations.Activate;
-import aQute.bnd.annotation.component.Deactivate;
+import org.osgi.service.component.annotations.Deactivate;
The issue I am now facing is migrating the bnd Reference annotations to the equivalent OSGI Reference annotations:
[ERROR] /Users/lorainelab/Documents/NowlanProjects/Repositories/nowlanfork-igb/core/genometry/src/main/java/com/affymetrix/genometry/parsers/FileTypehandlerRegistry.java:[23,16] cannot find symbol
symbol: method optional()
location: @interface org.osgi.service.component.annotations.Reference
Reading the above blog as well as the javadocs to understand how to migrate the References.
Also need to read through this blog (and links) again.
Some examples people have posted of the new @Reference annotations:
@Reference(service = ColorOptionsService.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.STATIC, unbind = "unsetColorOptionsService") protected void setColorOptionsService(ColorOptionsService colorOptionsService)
Unknown macro: { this.colorOptionsService = colorOptionsService; }@Reference(
cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE,
referenceInterface = AppliableEnsureOakIndex.class,
policy = ReferencePolicy.DYNAMIC
)@reference(
name = "namedImageTransformers",
referenceInterface = NamedImageTransformer.class,
policy = ReferencePolicy.DYNAMIC,
cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE@Reference(
name = "assetDetailSelector",
bind = "bindAssetDetailsSelector",
unbind = "unbindAssetDetailsSelector",
service = AssetDetailsSelector.class,
policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY,
cardinality = ReferenceCardinality.MULTIPLE
Here is how I think the old reference annotations map to the new reference annotations:
*The default for optional is false
*The default for multiple is false
optional = false AND multiple = true -> cardinality = ReferenceCardinality.AT_LEAST_ONE
optional = true AND multiple = true -> cardinality = ReferenceCardinality.MULTIPLE
optional = true AND multiple = false -> cardinality = ReferenceCardinality.OPTIONAL
optional = false AND multiple = false -> cardinality = ReferenceCardinality.MANDATORY
unbind = "removeDataProviderFactory" -> stays the same
dynamic = true -> policy = ReferencePolicy.DYNAMIC
Need to make sure to import the following:
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferenceCardinality;
Currently working on changing all of the @Reference annotations.
Some files import java.awt.Component instead of aQute.bnd.annotation.component.Component and I am unsure of why this is the case. Those files then use the annotation @aQute.bnd.annotation.component.Component instead of @Component. I am leaving them as is for now, but these may need to be addressed.
UPDATE:
The @aQute.bnd.annotation.component.Component was needed as java.awt.Component was being used (not sure what it does, but it is not an OSGI component). That is why the full reference to the bnd annotation was required.
-@aQute.bnd.annotation.component.Component -provide = +@org.osgi.service.component.annotations.Component +service =
mvn clean install runs successfully with maven-bundle-plugin version 5.1.8
However, I am now seeing the following bundleException when I try to run the igb jar:
org.osgi.framework.BundleException: Importing java.* packages not allowed: java.awt
This post on GitHub discusses part of the issue: https://github.com/bndtools/bnd/issues/2507
So then you would get automatic imports of java.* package if either of these happens:
the bundle imports org.osgi.framework version 1.9+
the bundle requires osgi.ee Java SE 10+
From: https://docs.osgi.org/specification/osgi.core/7.0.0/framework.module.html
The Java environment provides all packages in the java.* namespace. Prior to Java SE 9, this namespace was not well defined and could be different for different runtime environments. For example, Java SE 5 is not equal to Java SE 7 and an Android environment has substantial differences to a Java SE environment. However, Java SE 6 is backward compatible for Java SE 5, Java SE 1.4, Java SE 1.3 and Java SE 1.2. That is, applications written for Java SE 1.3 must run unchanged on a Java SE 5 environment.
These differences and backward compatibilities can not be captured using versions because they are variations. For example, [22] Google Android is a variation of a Java SE 5 environment, as is [23] Google App Engine and [24] Google Web Toolkit. All these variations have a different set of packages, types, and methods in the java.* namespace.
Starting in Java SE 9, the platform has been modularized and its packages organized into a set of modules. Depending upon how the platform is configured for execution, some modules and their contained packages may not be present at runtime. However, Java SE 9 provides a standard way to interrogate the Java platform for the packages currently available at runtime. Therefore, the Framework must set the org.osgi.framework.system.packages launching property, see Launching Properties, to the list of Java platform packages currently available at runtime.
For Java platform versions prior to Java SE 9, the Framework must also set the org.osgi.framework.system.packages launching property to the list of Java platform packages generally known to be available at runtime. Since there is no standard way to interrogate the Java platform for the packages currently available at runtime, a Framework implementation may use a predefined list of packages for the Java platform version.
In additional to specifying the version of the execution environment via an osgi.ee requirement, see osgi.ee Namespace, a Bundle may also import java.* packages using the Import-Package header. Imports of java.* packages by a bundle will be used during the resolution process, see Resolving Process, to ensure the bundle has visibility to the requested packages by wiring the bundle's import of a java.* package to the export of the java.* package by the Framework's system bundle. However, a bundle always loads classes in java.* packages via parent delegation. See Parent Delegation. Therefore, a bundle is not required to import a java.* package to have visibility to the classes in the package, if the package is present in the current runtime. It only needs to import a java.* package to have the resolution process ensure the package is available from the execution environment. This can avoid a NoClassDefFoundError during execution of the bundle due to a missing java.* package required by the bundle.
...
The set of implicitly visible packages are all java.* packages, since these packages are required by the Java runtime, and using multiple versions at the same time is not easy. For example, all objects must extend the same Object class.
A bundle must not declare exports for java.* packages; doing so is an error and any such bundle must fail to install or update. A bundle may declare imports for java.* packages; but this is for resolution purposes only. All other packages visible through the parent class loader must be hidden from executing bundles.
OSGI Core Release 7 changes: https://docs.osgi.org/specification/osgi.core/7.0.0/framework.module.html
Bundles may now import java.* packages to ensure the Java platform provides the required java.* packages. See Execution Environment. Importing a java.* package only affects bundle resolution and wiring. Classes in java.* packages are always loaded from the parent class loader. See Parent Delegation.
It looks like updating org.apache.felix.main from 5.2.0 to a newer version (trying 7.0.4) resolves the issue regarding importing of java.* packages.
Now seeing additional OSGI wiring errors:
09:13:08.496 [main] ERROR com.affymetrix.main.OSGiHandler - Unable to resolve annotation-tab [2](R 2.0): missing requirement [annotation-tab [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=com.affymetrix.genometry.parsers)(version>=9.1.0)(!(version>=10.0.0))) [caused by: Unable to resolve genometry [30](R 30.0): missing requirement [genometry [30](R 30.0)] osgi.wiring.package; (osgi.wiring.package=com.apple.laf)] Unresolved requirements: [[annotation-tab [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=com.affymetrix.genometry.parsers)(version>=9.1.0)(!(version>=10.0.0)))] org.osgi.framework.BundleException: Unable to resolve annotation-tab [2](R 2.0): missing requirement [annotation-tab [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=com.affymetrix.genometry.parsers)(version>=9.1.0)(!(version>=10.0.0))) [caused by: Unable to resolve genometry [30](R 30.0): missing requirement [genometry [30](R 30.0)] osgi.wiring.package; (osgi.wiring.package=com.apple.laf)] Unresolved requirements: [[annotation-tab [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=com.affymetrix.genometry.parsers)(version>=9.1.0)(!(version>=10.0.0)))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398) ~[igb_exe.jar:na] at org.apache.felix.framework.Felix.startBundle(Felix.java:2308) ~[igb_exe.jar:na] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006) ~[igb_exe.jar:na] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:992) ~[igb_exe.jar:na] at com.affymetrix.main.OSGiHandler.loadBundles(OSGiHandler.java:83) ~[igb_exe.jar:na] at com.affymetrix.main.OSGiHandler.startOSGi(OSGiHandler.java:63) ~[igb_exe.jar:na] at com.affymetrix.main.Main.main(Main.java:30) ~[igb_exe.jar:na] 09:13:08.497 [main] ERROR com.affymetrix.main.OSGiHandler - Error starting bundle annotation-tab:9.1.10
The bndlib artifact has been moved from https://mvnrepository.com/artifact/biz.aQute.bnd/bndlib to https://mvnrepository.com/artifact/biz.aQute.bnd/biz.aQute.bndlib
However, when I update I get an error when running mvn clean install. May be worth looking into but will skip for now.
[ERROR] /Users/lorainelab/Documents/NowlanProjects/Repositories/nowlanfork-igb/core/synonym-lookup/src/main/java/org/lorainelab/igb/synonymlookup/services/impl/GenomeVersionSynonymLookupImpl.java:[8,46] package org.osgi.service.component.annotations does not exist
[ERROR] /Users/lorainelab/Documents/NowlanProjects/Repositories/nowlanfork-igb/core/synonym-lookup/src/main/java/org/lorainelab/igb/synonymlookup/services/impl/GenomeVersionSynonymLookupImpl.java:[19,2] cannot find symbol
symbol: class Component
The <commonsPoolVersion>1.6</commonsPoolVersion> appears twice (identically, unsure why) and is referenced by <artifactId>commons-pool</artifactId> and <artifactId>org.apache.commons.pool</artifactId>
commons-pool has been moved from https://mvnrepository.com/artifact/commons-pool/commons-pool to https://mvnrepository.com/artifact/org.apache.commons/commons-pool2
Getting an error when I try to change out the old artifact for the new one, will need to come back to this along with the bndlib artifact.
Attempting to update the bndlib artifact. There seems to be a core issue with the annotations between bnd and osgi. Working on trying to resolve what is going on: https://bnd.bndtools.org/chapters/230-manifest-annotations.html
UPDATE: I was able to update the biz.aQute.bndlib artifact to 6.4.0. However, I am still seeing an osgi issue. At this point nearly all of the artifacts have been updated, and while this has resolved many issues and IGB is able to be built, IGB cannot be run.
osgi project that appears to be using newer osgi annotations: https://github.com/mliradelc/opencast
I removed the bndlib artifact as the above project and various blogs refer to bnd as being deprecated. Using osgi.cmpn and org.osgi.core in place of bnd (version 6.0.0). Able to build IGB, but still running into the same error when attempting to run IGB through the jar. Since I have been seeing this same error for a while now, my feeling is that there is something with the OSGI wiring that is incorrect currently.
09:44:48.140 [main] ERROR com.affymetrix.main.OSGiHandler - Unable to resolve annotation-tab [2](R 2.0): missing requirement [annotation-tab [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=com.affymetrix.genometry.parsers)(version>=9.1.0)(!(version>=10.0.0))) [caused by: Unable to resolve genometry [30](R 30.0): missing requirement [genometry [30](R 30.0)] osgi.wiring.package; (osgi.wiring.package=com.apple.laf)] Unresolved requirements: [[annotation-tab [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=com.affymetrix.genometry.parsers)(version>=9.1.0)(!(version>=10.0.0)))] org.osgi.framework.BundleException: Unable to resolve annotation-tab [2](R 2.0): missing requirement [annotation-tab [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=com.affymetrix.genometry.parsers)(version>=9.1.0)(!(version>=10.0.0))) [caused by: Unable to resolve genometry [30](R 30.0): missing requirement [genometry [30](R 30.0)] osgi.wiring.package; (osgi.wiring.package=com.apple.laf)] Unresolved requirements: [[annotation-tab [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=com.affymetrix.genometry.parsers)(version>=9.1.0)(!(version>=10.0.0)))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398) at org.apache.felix.framework.Felix.startBundle(Felix.java:2308) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:992) at com.affymetrix.main.OSGiHandler.loadBundles(OSGiHandler.java:83) at com.affymetrix.main.OSGiHandler.startOSGi(OSGiHandler.java:63) at com.affymetrix.main.Main.main(Main.java:30)
Possible examples to look into: https://stackoverflow.com/questions/55829257/where-to-find-and-install-org-osgi-framework-package
I have turned this ticket into an epic and have moved the related tickets to be within this epic.
Trying JDK 18 + FX from Azul (open JDK build)
compiler crashes: