question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JPMS: Wrong export in module-info

See original GitHub issue

I am using JPMS and unable to import faker classes and they are not exported. Instead I see wrong exports in the decompiled class. PFA the screenshot

module com.fasterxml.jackson.annotation {
    exports com.fasterxml.jackson.annotation;

    opens com.fasterxml.jackson.annotation;
}
Screenshot 2022-08-01 at 10 48 23

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
serpro69commented, Aug 1, 2022

I suspect that the module-info.class comes from a shadowed jackson dependency and is added automatically by shadow plugin. The way I see going about this issue is we need to add a module-info.class manually for JPMS support in kotlin-faker, and also probably add explicit support for java9 (via own jar that would include this module-info.class?) As I mentioned, there’s no support for java modules now in kotlin-faker, so this needs to be added. I’ll need to experiment a bit with this.

1reaction
serpro69commented, Aug 1, 2022

Hi @overfullstack , thanks for reporting this.

I don’t think I’ve ever explicitly added modules support to faker - a lot of the code I work with is still stuck on java 8… 😄 But this looks very weird nevertheless, not sure why the module would be registered with this name… I’ll take a closer look at it as soon as I have some time, but also feel free to submit a PR with a fix if you want to.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JPMS Module System Issue - java - Stack Overflow
I created 2 random modules I exported "com.alice" package from folder A and require the module in folder B. Then compiled A: javac ......
Read more >
requires transitive and qualified exports in JPMS - CodeRanch
Options A, B, C, and D are incorrect because the keyword is exports, not export. Options E and F are incorrect because you...
Read more >
Incorrect export of `com.fasterxml.jackson.jaxrs.json ... - GitHub
When running an app with 2.10.1 using JPMS, I get the following error: Error occurred during initialization of boot layer java.lang.module.
Read more >
Java 9 modules - JPMS basics - Stephen Colebourne's blog
Unfortunately, quite a few things can go wrong. 1) All use of module-info files only applies if using modular jars on the modulepath....
Read more >
JPMS Libraries - bnd
This annotation specifies the module name(s) to which a exported is targeted. @org.osgi.annotation.bundle.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found