-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With "org.apache.poi" in my project, there is always "module not found" error occured #399
Comments
I also encountered the same problem. |
Hi @chenyany and @payfish! |
I researched again about this issue and found this answer in StackOverflow, then I tried to add I've only tried adding the Changes were pushed into Please, give me some feedback. Thanks!! |
Doing some tests I just realized that When using a normal jar with dependencies in C:\Users\fvarrui\GitHub\HelloWorldMaven\target\HelloWorldMaven>jre\bin\java -jar HelloWorldMaven-1.0.0-runnable.jar
Starting app ...
PATH=C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot\bin;C:\tools\ruby33\bin;C:\Python312\Scripts\;C:\Python312\;C:\Program Files\GraalVM\graalvm-community-openjdk-21.0.2+13.1\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.6\bin;C:\Program Files\Eclipse Adoptium\jdk-19.0.2.7-hotspot\bin;C:\Program Files\Eclipse Adoptium\jdk-20.0.2.9-hotspot\bin;C:\tools\ruby31\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Microchip\xc8\v2.36\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.6\bin;C:\Program Files\Vagrant\bin;C:\ProgramData\nvm;C:\Program Files\nodejs;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Git\cmd;C:\Program Files\Go\bin;C:\Users\fvarrui\AppData\Local\Microsoft\WindowsApps;C:\Users\fvarrui\AppData\Local\GitHubDesktop\bin;C:\Program Files\OpenSSL-Win64\bin;C:\Program Files (x86)\Nmap;C:\Program Files\Oracle\VirtualBox;C:\Program Files (x86)\WiX Toolset v3.11\bin;C:\Program Files\Imaginando\DRC;C:\ProgramData\chocolatey\lib\wmiexplorer\tools;C:\ProgramData\nvm;C:\Program Files\nodejs;C:\Users\fvarrui\go\bin
C:\Users\fvarrui\GitHub\HelloWorldMaven\target\HelloWorldMaven>jre\bin\java --list-modules
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected] When using fat jar, app fails due to missing modules in JRE: C:\Users\fvarrui\GitHub\HelloWorldMaven\target\HelloWorldMaven>jre\bin\java -jar HelloWorldMaven-1.0.0-jar-with-dependencies.jar
Exception in thread "main" java.lang.NoClassDefFoundError: java/util/logging/Logger
at com.sun.jna.Native.<clinit>(Native.java:114)
at io.github.fvarrui.helloworld.Main.<clinit>(Main.java:21)
Caused by: java.lang.ClassNotFoundException: java.util.logging.Logger
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
C:\Users\fvarrui\GitHub\HelloWorldMaven\target\HelloWorldMaven>jre\bin\java --list-modules
[email protected]
[email protected] |
Thank you!! Things works well with the SNAPSHOT version! But here is some little question: when I import the SNAPSHOT plugin I encountered an "Unresolved plugin" error, but I can still package my proj with it, despite the maven sync error. |
I'm not familiar with jdeps so I'm sorry that I can't help, But I believe you have found out the correct anwser to solve this problem. Your work helps me a lot! I appreciate for your time and thank you truely! |
Please, could you post here the error message? |
Thanks to you for helping to improve JP |
Ofcourse! Maven has downloaded the SNAPSHOT version correctly(I can find it in my local repo). But it still get this error when synchronizing, I tried so many ways but still can't fix it, probably an issue with my configuration. Whatever, it works, I just ignore the error and do the package it works good. thanks!
|
I think it's due to the snapshot version, Maven can't find the plugin in the main repository (unresooved plugin), but in the snapshots one. When the stable version is released to Maven Central, we can check it and confirm this. |
Branch |
How can I test out your pre-release for 1.7.6? |
https://github.com/fvarrui/JavaPackager?tab=readme-ov-file#how-to-use-snapshot-versions |
Nice! The version you mentioned fixed this for me on Windows. 50 megs saved! On Mac I get:
It looks like you have an extra " at the end of the command. I tried with the latest 1.7.6-20240430.234925-8 and that issue is still there. Thanks |
I get a error with this snapshot,it happens when I used the jre to run the exe file. I also tried double-clicking it, but nothing happened: Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:893)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: javax/sql/DataSource
at org.flywaydb.core.api.configuration.FluentConfiguration.<init>(FluentConfiguration.java:51)
at org.flywaydb.core.Flyway.configure(Flyway.java:88)
at indi.nonoas.worktools.config.FlyWayMigration.migrate(FlyWayMigration.kt:11)
at indi.nonoas.worktools.App.dbMigrate(App.kt:108)
at indi.nonoas.worktools.App.start(App.kt:89)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:839)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:483)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
... 1 more
Caused by: java.lang.ClassNotFoundException: javax.sql.DataSource
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 14 more |
v1.7.6 released to Maven Central |
I'm submitting a…
Well i import this org.apache.poi dependency to my project to export a word file.
But it comes to an error when i was packaging the proj, i try to import the module which was not founded, but it always comes out another "module not found" error.
I guess there is a conflict between "org.apache.poi" and JavaPackager because when i deleted the dependency, the Packager works correctly.
Please tell us about your environment:
Other information (e.g. related issues, suggestions how to fix, links for us to have context)
The text was updated successfully, but these errors were encountered: