Skip to content
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

Package org.zalando.problem.gson not found in module #809

Open
HJK181 opened this issue Sep 27, 2022 · 0 comments
Open

Package org.zalando.problem.gson not found in module #809

HJK181 opened this issue Sep 27, 2022 · 0 comments
Labels

Comments

@HJK181
Copy link

HJK181 commented Sep 27, 2022

Caused by: java.lang.module.InvalidModuleDescriptorException: Package org.zalando.problem.gson not found in module

Description

During the build process of a custom JDK the following error occurs

[INFO] java.lang.module.FindException: Error reading module: dependencies/BOOT-INF/lib/problem-0.26.0.jar
[INFO] 
[INFO]  at java.base/jdk.internal.module.ModulePath.readModule(ModulePath.java:350)
[INFO]  at java.base/jdk.internal.module.ModulePath.scan(ModulePath.java:237)
[INFO] 
[INFO]  at java.base/jdk.internal.module.ModulePath.scanNextEntry(ModulePath.java:190)
[INFO] 
[INFO]  at java.base/jdk.internal.module.ModulePath.findAll(ModulePath.java:166)
[INFO]  at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration$Builder.build(JdepsConfiguration.java:521)
[INFO] 
[INFO]  at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.buildConfig(JdepsTask.java:603)
[INFO] 
[INFO]  at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:557)
[INFO] 
[INFO]  at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:533)
[INFO] 
[INFO]  at jdk.jdeps/com.sun.tools.jdeps.Main.main(Main.java:49)
[INFO] 
[INFO] Caused by: java.lang.module.InvalidModuleDescriptorException: Package org.zalando.problem.gson not found in module
[INFO]  at java.base/jdk.internal.module.ModuleInfo.invalidModuleDescriptor(ModuleInfo.java:1091)
[INFO] 
[INFO]  at java.base/jdk.internal.module.ModuleInfo.doRead(ModuleInfo.java:324)
[INFO] 
[INFO]  at java.base/jdk.internal.module.ModuleInfo.read(ModuleInfo.java:131)
[INFO] 
[INFO]  at java.base/jdk.internal.module.ModulePath.readJar(ModulePath.java:652)
[INFO] 
[INFO]  at java.base/jdk.internal.module.ModulePath.readModule(ModulePath.java:331)

Expected Behavior

org.zalando.problem.gson should be present or removed from module-info.

Actual Behavior

org.zalando.problem.gson should is referenced in module-info but no dependency exists.

Possible Fix

Remove org.zalando.problem.gson from module-info.

Context

Building a custom JDK for my Docker image with reduced space consumption.

Your Environment

  • Version used: problem-spring-web:0.27.0
  • Link to your project: closed source
@HJK181 HJK181 added the Bug label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant