jdbcfirebirdjaybird

No suitable driver found for jdbc:firebirdsql://localhost:3050


I build a javafx maven app , using jaybird dependency . Every thing work fine from intelliJ. when i export the jar file ,I receive this message :

No suitable driver found for jdbc:firebirdsql://localhost:3050...

enter image description here project structure

this is dependencies part of pom.xml:

    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>16</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>16</version>
        </dependency>
        <dependency>
            <groupId>org.firebirdsql.jdbc</groupId>
            <artifactId>jaybird-jdk16</artifactId>
            <version>2.2.14</version>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>5.5.0</version>
        </dependency>
    </dependencies> 

Solution

  • The solution is : right click on jaybird dependency(follow the image), then click Extract into output root then rebuild the artifact jar.