Jfoenix: Problem with dependencies in OSGI environment

Created on 30 Aug 2019  路  3Comments  路  Source: sshahine/JFoenix

I ran into a problem: JFoenix cannot resolve its dependencies in JavaFX. jfoenix-8.0.9.jar
contains the META-INF/MANIFEST.MF file, which contains links to JavaFX packages. If you delete them, then everything works.
Or should I make some specific library configuration?

Incorrect imports in META-INF/MANIFEST.MF
Import-Package: com.jfoenix.animation.alert;version="[8.0,9)",com.jfoe nix.assets;version="[8.0,9)",com.jfoenix.cache;version="[8.0,9)",com. jfoenix.controls;version="[8.0,9)",com.jfoenix.controls.base;version= "[8.0,9)",com.jfoenix.controls.behavior;version="[8.0,9)",com.jfoenix .controls.cells.editors;version="[8.0,9)",com.jfoenix.controls.cells. editors.base;version="[8.0,9)",com.jfoenix.controls.datamodels.treeta ble;version="[8.0,9)",com.jfoenix.controls.events;version="[8.0,9)",c om.jfoenix.converters;version="[8.0,9)",com.jfoenix.converters.base;v ersion="[8.0,9)",com.jfoenix.effects;version="[8.0,9)",com.jfoenix.sk ins;version="[8.0,9)",com.jfoenix.svg;version="[8.0,9)",com.jfoenix.t ransitions;version="[8.0,9)",com.jfoenix.transitions.hamburger;versio n="[8.0,9)",com.jfoenix.utils;version="[8.0,9)",com.jfoenix.validatio n;version="[8.0,9)",com.jfoenix.validation.base;version="[8.0,9)",com .sun.javafx.binding,com.sun.javafx.css,com.sun.javafx.css.converters, com.sun.javafx.event,com.sun.javafx.geom,com.sun.javafx.scene.control ,com.sun.javafx.scene.control.behavior,com.sun.javafx.scene.control.s kin,com.sun.javafx.scene.text,com.sun.javafx.scene.traversal,com.sun. javafx.util,javafx.animation,javafx.application,javafx.beans,javafx.b eans.binding,javafx.beans.property,javafx.beans.value,javafx.collecti ons,javafx.collections.transformation,javafx.css,javafx.event,javafx. geometry,javafx.scene,javafx.scene.control,javafx.scene.effect,javafx .scene.image,javafx.scene.input,javafx.scene.layout,javafx.scene.pain t,javafx.scene.shape,javafx.scene.text,javafx.scene.transform,javafx. stage,javafx.util,javafx.util.converter,javax.xml.parsers,org.w3c.dom ,org.xml.sa0

Correct imports in META-INF/MANIFEST.MF
Import-Package: com.jfoenix.animation.alert;version="[0.0,1)",com.jfoe nix.assets;version="[0.0,1)",com.jfoenix.cache;version="[0.0,1)",com. jfoenix.controls;version="[0.0,1)",com.jfoenix.controls.base;version= "[0.0,1)",com.jfoenix.controls.behavior;version="[0.0,1)",com.jfoenix .controls.cells.editors;version="[0.0,1)",com.jfoenix.controls.cells. editors.base;version="[0.0,1)",com.jfoenix.controls.datamodels.treeta ble;version="[0.0,1)",com.jfoenix.controls.events;version="[0.0,1)",c om.jfoenix.converters;version="[0.0,1)",com.jfoenix.converters.base;v ersion="[0.0,1)",com.jfoenix.effects;version="[0.0,1)",com.jfoenix.sk ins;version="[0.0,1)",com.jfoenix.svg;version="[0.0,1)",com.jfoenix.t ransitions;version="[0.0,1)",com.jfoenix.transitions.hamburger;versio n="[0.0,1)",com.jfoenix.utils;version="[0.0,1)",com.jfoenix.validatio n;version="[0.0,1)",com.jfoenix.validation.base;version="[0.0,1)",jav ax.xml.parsers,org.w3c.dom,org.xml.sax

Environment

  • JFoenix 8.0.8/8.0.9
  • Ubuntu 18.04
  • LibericaJDK Runtime Environment (build 1.8.0_212-BellSoft-b12)

Most helpful comment

I updated build.gradle to exclude those packages from the manifest 7b0d46f9f15281be7441f2099f77d0020f3c8c97

All 3 comments

I believe this is happening cause you are using LibericaJDK Runtime Environment, maybe we should remove com.sun.* packages from the manifest but keep the javafx.*
@DmitryZagr can you validate that removing only com.sun.* packages solves the issue?

I updated build.gradle to exclude those packages from the manifest 7b0d46f9f15281be7441f2099f77d0020f3c8c97

I believe this is happening cause you are using LibericaJDK Runtime Environment, maybe we should remove com.sun.* packages from the manifest but keep the javafx.*
@DmitryZagr can you validate that removing only com.sun.* packages solves the issue?

No, problem was in javafx.* too.

Only works with imports below:

Import-Package: com.jfoenix.animation.alert;version="[0.0,1)",com.jfoe nix.assets;version="[0.0,1)",com.jfoenix.cache;version="[0.0,1)",com. jfoenix.controls;version="[0.0,1)",com.jfoenix.controls.base;version= "[0.0,1)",com.jfoenix.controls.behavior;version="[0.0,1)",com.jfoenix .controls.cells.editors;version="[0.0,1)",com.jfoenix.controls.cells. editors.base;version="[0.0,1)",com.jfoenix.controls.datamodels.treeta ble;version="[0.0,1)",com.jfoenix.controls.events;version="[0.0,1)",c om.jfoenix.converters;version="[0.0,1)",com.jfoenix.converters.base;v ersion="[0.0,1)",com.jfoenix.effects;version="[0.0,1)",com.jfoenix.sk ins;version="[0.0,1)",com.jfoenix.svg;version="[0.0,1)",com.jfoenix.t ransitions;version="[0.0,1)",com.jfoenix.transitions.hamburger;versio n="[0.0,1)",com.jfoenix.utils;version="[0.0,1)",com.jfoenix.validatio n;version="[0.0,1)",com.jfoenix.validation.base;version="[0.0,1)",jav ax.xml.parsers,org.w3c.dom,org.xml.sax

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ivanskodje picture ivanskodje  路  4Comments

rickyzhangca picture rickyzhangca  路  4Comments

orochies picture orochies  路  5Comments

ayushchadha23 picture ayushchadha23  路  5Comments

caoyanfeng picture caoyanfeng  路  3Comments