[
https://issues.apache.org/jira/browse/PDFBOX-5958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Harrop updated PDFBOX-5958:
---------------------------------
Environment: Eclipse 2024-06, Maven 3.9.9, java-17-openjdk (17.0.12) (was:
Eclipse 2024-06)
> pdfbox.io NoSuchMethodError at runtime - JPMS?
> ----------------------------------------------
>
> Key: PDFBOX-5958
> URL: https://issues.apache.org/jira/browse/PDFBOX-5958
> Project: PDFBox
> Issue Type: Bug
> Components: IO
> Affects Versions: 3.0.3 PDFBox
> Environment: Eclipse 2024-06, Maven 3.9.9, java-17-openjdk (17.0.12)
> Reporter: Jason Harrop
> Priority: Minor
>
> I get:
>
> {noformat}
> Exception in thread "main" java.lang.NoSuchMethodError:
> 'org.apache.fontbox.ttf.TrueTypeFont
> org.apache.fontbox.ttf.TTFParser.parse(org.apache.pdfbox.io.RandomAccessRead)'
> at
> [email protected]/org.apache.pdfbox.pdmodel.font.FontMapperImpl.<init>(FontMapperImpl.java:128)
> at
> [email protected]/org.apache.pdfbox.pdmodel.font.FontMappers$DefaultFontMapper.<clinit>(FontMappers.java:36)
> at
> [email protected]/org.apache.pdfbox.pdmodel.font.FontMappers.instance(FontMappers.java:48)
> at
> [email protected]/org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:126)
> at
> [email protected]/com.openhtmltopdf.pdfboxout.fontstore.AbstractFontStore$BuiltinFontStore.addCourier(AbstractFontStore.java:55){noformat}
>
> This error occurs in Eclipse at run time, possibly because "maven
> dependencies" are on the classpath, not the modulepath (and there is no
> obvious way to reconfigure that).
> The same code did run fine outside Eclipse (with mvn exec:java), I thought
> since org.apache.pdfbox.io has an Automatic-Module-Name in MANIFEST.MF in the
> jar, and from that Maven puts it on the modulepath.
> But now it is not working that way either, or via Maven surefire tests (which
> are using modulepath, with pdfbox-io-3.0.3.jar on it).
> So I currently have no idea why this is broken (aside from suspecting a JPMS
> issue) or how to fix it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]