E_PACK_ERROR "MALFORMED" or "NullPointerException"
Estimated Reading Time: 4 MinutesDepending on your operating system or ACS version, you may get different errors for this issue.
Invalid character or characters in a file name in the ePub file
You might see something like this:
ERROR Package: Error in packaging java.lang.NullPointerException at com.adobe.adept.packaging.epub.EPubPackager.copyAndEncryptEntries(EPubPackager.java:728) at com.adobe.adept.packaging.epub.EPubPackager.writeEncrypted(EPubPackager.java:850) at com.adobe.adept.packaging.servlet.Package.doPost(Package.java:582)
Or this:
ERROR Package: Error in packaging java.lang.IllegalArgumentException: MALFORMED at java.util.zip.ZipCoder.toString(Unknown Source) at java.util.zip.ZipInputStream.readLOC(Unknown Source) at java.util.zip.ZipInputStream.getNextEntry(Unknown Source)
These errors indicate that there is some string of text in the EPUB file that the packaging service can't handle. Specifically, it refers to the name of one of the files in the EPUB package.
An EPUB file is really a zipped collection of files. Copy the EPUB file and change the extension to ".zip" in WIndows, and then unzip it.
Look through the HTML, XHTML and image files that result. You might find one or more files with names that feature non-English characters. Many characters, such as Spanish characters, won't cause problems. But certain German characters can. Rename any files you find with characters like "ß" and replace them with English "placeholder" characters. After that, zip the files back together again, and change the file extension to turn the file back into an EPUB package, ".epub."
Note that these file names will not be visible to the end user and that changing their names will not change the user's reading experience.
Encrypted fonts in the ePub file
If you get a Null Pointer Exception error from ACS packaging books that looks like this:
There was an error with the Package Request
Check the packaging log file, see if you get errors similar to this below:
ERROR Package: Error in packaging java.lang.NullPointerException at com.adobe.adept.util.UUIDUtil.encodeUUID(UUIDUtil.java:31) at com.adobe.adept.util.UUIDUtil.encodeUUID(UUIDUtil.java:26) at com.adobe.adept.packaging.epub.EPubPackager$DemanglingInputStream.(EPubPackager.java:122) at com.adobe.adept.packaging.epub.EPubPackager.copyAndEncryptEntries(EPubPackager.java:675) at com.adobe.adept.packaging.epub.EPubPackager.writeEncrypted(EPubPackager.java:850) at com.adobe.adept.packaging.servlet.Package.doPost(Package.java:582) at com.adobe.adept.packaging.servlet.Package.doPost(Package.java:61) at com.adobe.adept.servlet.AdeptServlet.doPost(AdeptServlet.java:158) at com.adobe.adept.servlet.AdeptServlet.doPost(AdeptServlet.java:231) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:284) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:322) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1684) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
This error can occur if your EPUB file includes fonts that are encrypted for protection. To check this, change the .epub file extension to .zip, and unzip the file. Look for a folder called "fonts" under the OEBPS folder. You should see a file, encryption.xml, in the META-INF folder that lists the encrypted fonts.
In order to work with these fonts, ACS needs an identifier in the format of a UUID. This should usually be defined in the metadata section in an .opf file. An example might be:
1234567890 urn:uuid:5782abb4-9f0e-4d20-9de1-d9bb0faacbd3
Many EPUBs also defines a bookid field as shown above, that can hold an ISBN number. However, the identifier with the urn:uuid value is what could be missing in this case.
For testing purpose, you can manually add this field and zip the file back to an .epub file, try the packaging again. You may have to work with the book provider to figure out ways to have this field added in the future.