[
https://issues.apache.org/jira/browse/PDFBOX-5958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Harrop updated PDFBOX-5958:
---------------------------------
Description:
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, 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.
was:
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, or via
This is probably an Eclipse issue more than a PDF Box issue, but I think it is
triggered by PDF Box not being properly set up for JPMS (eg no module-info
files).
In Eclipse at run time (ie running code via a run configuration),
> pdfbox.io NoSuchMethodError at runtime
> --------------------------------------
>
> 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
> 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, 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]