Ebook publishing requires epubsearch, which doesn't work

Ebook publishing requires epubsearch, which doesn't work from Win11 command line or powershell.

C:\WINDOWS\system32> java -jar <path>epubcheck-5.3.0\epubcheck-5.3.0\epubcheck.jar C:\Users\<file.epub> -q

java.lang.StackOverflowError

at com.thaiopensource.relaxng.pattern.InterleavePattern.checkRestrictions(InterleavePattern.java:35)

etc....


The maze of requirements to use a GUI with this application is unreasonable. What's going on with epubcheck, and is there an alternative in order to publish through Apple?

Posted on May 27, 2026 8:08 AM

Reply
Question marked as Top-ranking reply

Posted on May 27, 2026 8:42 AM

EPUBcheck is a standard W3C app: https://www.w3.org/publishing/epubcheck/


Info:


If the app and/or Windows and/or Oracle Java are malfunctioning here, see if this W3C Java app works better in WSL2 or in a Linux guest. Or access the EPUBcheck mailing list (info at Github), or open a Github issue, and report the failure there. You’ll want to include the Windows and Java versions in the report.


The error you’re meeting appears to be discussed in the EPUBcheck troubleshooting information posted here:


With the fix involving using this syntax:

java -Xss1024k -jar epubcheck.jar moby-dick.epub



3 replies
Question marked as Top-ranking reply

May 27, 2026 8:42 AM in response to JJR22

EPUBcheck is a standard W3C app: https://www.w3.org/publishing/epubcheck/


Info:


If the app and/or Windows and/or Oracle Java are malfunctioning here, see if this W3C Java app works better in WSL2 or in a Linux guest. Or access the EPUBcheck mailing list (info at Github), or open a Github issue, and report the failure there. You’ll want to include the Windows and Java versions in the report.


The error you’re meeting appears to be discussed in the EPUBcheck troubleshooting information posted here:


With the fix involving using this syntax:

java -Xss1024k -jar epubcheck.jar moby-dick.epub



May 27, 2026 9:15 AM in response to JJR22

JJR22 wrote:
Ok, thanks!
A more important question, though, is why is Apple putting ebook authors through this torment in order to publish books?


Because various tools that generate EPUB documents can be buggy, because verifying EPUB files using reader apps is tedious and with incomplete coverage at best, and the easiest way to reduce the numbers of issues arising from those buggy tools and to reduce the support costs of purchasers encountering errors in an EPUB reader is to validate the EPUB files.


File format validation is longstanding practice in publishing (and programming, for that matter) with validation / lint / preflight tools widely used for various formats including PDF and EPUB files, as well as for source code files (compilers), and with many other sorts of data and metadata files.


It’s also a way to be able to point st a specific reader being buggy, too.


If validation isn’t available or doesn’t happen, we get messes. Like, for instance, the compatibility issues that arise with the differing interpretations of FAT, as found across the many different FAT storage implementations.


TL;DR: Apple doesn’t want to get overrun with support reports and refund requests for whatever (possibly-buggy) EPUB tool some author used.


Why this case? Presumably, this EPUB is big, or comparatively complex, or both. Or maybe Java or the EPUBcheck tool itself got bigger..

Ebook publishing requires epubsearch, which doesn't work

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.