Creating Instance of SciJava causes problem with JavaFX

This question is focusing on the main problem that was already asked in a previous question. Instead I am here focusing on one single problem.

I have a code where I open images through imageJ and show it using JavaFX code. The code runs fine (both in IDE and executable) opening the images with

import ij.IJ;
import ij.ImagePlus;

imp = IJ.openImage(selectedFile.getPath());

But if I tried to open using the following which I need to open bioformats,

import net.imagej.Dataset;
import io.scif.SCIFIO;
import ij.ImagePlus;
import net.imglib2.img.Img;
import net.imglib2.img.display.imagej.ImageJFunctions;

ImagePlus imp = null;
Dataset dataset = null;
SCIFIO scifio = new SCIFIO(); // file1

try {
	dataset = scifio.datasetIO().open(selectedFile.getPath()); // file2
} 
catch (IOException e) {
     e.printStackTrace();
}
Img image = dataset.getImgPlus().getImg();
imp = ImageJFunctions.wrap(image, imageName);

in which I get some alarms in the IDE logs but at the end it works and show the image as expected.
alarms file 1.txt (55.1 KB)
alarms file 2.txt (24.7 KB)

replacing accessing SCIFIO direct but instead through ImageJ instance,

 ImageJ imageJ = new ImageJ(); // file1
 dataset = imageJ.scifio().datasetIO().open(selectedFile.getPath()); // file2

imagej file1.txt (108.2 KB) imagej file2.txt (24.7 KB)

While trying to run the executable I got the error at the first line creating an instance of SCIFIO or ImageJ executable error.txt (5.8 KB) ,

[WARNING] Class pool is empty: forgot to call Thread#setClassLoader?
Caused by: java.lang.IllegalArgumentException: No compatible service: org.scijava.service.SciJavaService

My pom File,

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.myGroupID</groupId>
    <artifactId>rebuildingStructure</artifactId>
    <version>0.0.1</version>
    <packaging>jar</packaging>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>
                                        com.myGroupID.MainClass
                                    </mainClass>
                                </manifest>
                            </archive>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <release>11</release>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>8.0.1</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>com.myGroupID.MainClass</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <!-- JavaFX -->
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>0.0.4</version>
                <configuration>
                    <mainClass>com.myGroupID.MainClass</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- Set Maven encoding -->
    <properties>
        <!-- NB: Avoid platform encoding warning when copying resources. -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>11</java.version>

        <maven.compiler.release>11</maven.compiler.release>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <!-- NB: Specify formatting of the maven.build.timestamp property. -->
        <maven.build.timestamp.format>d MMMMM yyyy</maven.build.timestamp.format>

        <formats-gpl.version>6.5.1</formats-gpl.version>
        <logback.version>1.1.1</logback.version>

    </properties>

    <repositories>
        <!-- ImageJ -->
        <repository>
            <id>imagej.public</id>
            <url>http://maven.imagej.net/content/groups/public</url>
        </repository>
		<repository>
			<id>central</id>
			<name>Central Repository</name>
			<url>https://repo.maven.apache.org/maven2</url>
		</repository>
		<repository>
			<id>ome</id>
			<name>OME Artifactory</name>
			<url>https://artifacts.openmicroscopy.org/artifactory/maven/</url>
		</repository>
    </repositories>

    <dependencies>
        <!-- JavaFX Dependencies -->
        <!-- JavaFX 11 is not part of the JDK anymore -->
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx</artifactId>
            <version>15</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-swing</artifactId>
            <version>11-ea+24</version>
        </dependency>
       
        <!-- To View Tiff Images -->
        <dependency>
            <groupId>com.github.jai-imageio</groupId>
            <artifactId>jai-imageio-core</artifactId>
            <version>1.4.0</version>
        </dependency>

        <!-- ImageJ -->
        <dependency>
            <groupId>net.imagej</groupId>
            <artifactId>imagej</artifactId>
            <version>2.0.0-rc-71</version>
        </dependency>

        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2-ij</artifactId>
            <version>2.0.0-beta-45</version>
        </dependency>

        <dependency>
            <groupId>io.scif</groupId>
            <artifactId>scifio-bf-compat</artifactId>
            <version>4.1.0</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>ome</groupId>
            <artifactId>formats-gpl</artifactId>
            <version>6.2.1</version>
        </dependency>

        <dependency>
            <groupId>io.scif</groupId>
            <artifactId>scifio</artifactId>
            <version>0.41.0</version>
        </dependency>

        <dependency>
            <groupId>loci</groupId>
            <artifactId>loci_plugins</artifactId>
            <version>5.0.0-beta1</version>
        </dependency>

    </dependencies>
</project>

added the project in github in case that will help. You would find the program running normally on IDE with some alarms while with error as stated with the jar file.

solved using only one dependency for the bio-format bio-formats_plugins with net.imglib2 only to provide ImagePlus class and that is using BF Method instead in both IDE and the jar file.

        ImagePlus imp = null;
        try {
            ImagePlus[] imps = BF.openImagePlus(selectedFile.getPath());
        } catch (FormatException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }