Adaptive Media Warnings from AMRuntimeException and Errors from GhostscriptImpl in the Logs
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
Issue
- There are warnings related to Adaptive Media and Errors related to Ghostscript in the logs when trying to configure ImageMagick and generating media previews.
- First warning:
2025-04-24 00:02:15.885 WARN [liferay/adaptive_media_processor-685][AMMessageListener:79] null
com.liferay.adaptive.media.exception.AMRuntimeException$IOException: Unable to scale file entry 5166439 to match adaptive media configuration Preview-1000x0
at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler.scaleImage(AMDefaultImageScaler.java:61) ~[?:?]
at com.liferay.adaptive.media.image.internal.processor.AMImageAMProcessor.process(AMImageAMProcessor.java:105) ~[?:?]
at com.liferay.adaptive.media.image.internal.processor.AMImageAMProcessor.process(AMImageAMProcessor.java:63) ~[?:?]
at com.liferay.adaptive.media.image.internal.processor.AMImageAMProcessor.process(AMImageAMProcessor.java:35) ~[?:?]
at com.liferay.adaptive.media.web.internal.messaging.AMProcessorCommand$2.execute(AMProcessorCommand.java:34) ~[bundleFile:?]
at com.liferay.adaptive.media.web.internal.messaging.AMMessageListener.doReceive(AMMessageListener.java:70) [bundleFile:?]
at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:39) [portal-kernel.jar:?]
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25) [portal-kernel.jar:?]
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65) [portal-kernel.jar:?]
at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:47) [bundleFile:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: com.liferay.adaptive.media.exception.AMRuntimeException$IOException: java.io.IOException: Unsupported image type
at com.liferay.adaptive.media.image.internal.processor.util.TiffOrientationTransformer.transform(TiffOrientationTransformer.java:46) ~[?:?]
at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler.scaleImage(AMDefaultImageScaler.java:41) ~[?:?]
... 12 more
Caused by: java.io.IOException: Unsupported image type
at com.liferay.adaptive.media.image.internal.util.RenderedImageUtil.readImage(RenderedImageUtil.java:105) ~[?:?]
at com.liferay.adaptive.media.image.internal.processor.util.TiffOrientationTransformer.transform(TiffOrientationTransformer.java:43) ~[?:?]
at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler.scaleImage(AMDefaultImageScaler.java:41) ~[?:?]
... 12 more
- Error:
2025-04-24 08:11:33.494 ERROR [ajp-nio-0.0.0.0-8009-exec-19][GhostscriptImpl:95] null
java.io.FileNotFoundException: Unable to find the Ghostscript command. Please verify the path specified in the Server Administration control panel at: http://<server>/group/control_panel/manage/-/server/external-services.
at com.liferay.image.internal.GhostscriptImpl._getCommandPath(GhostscriptImpl.java:112) ~[?:?]
at com.liferay.image.internal.GhostscriptImpl.reset(GhostscriptImpl.java:92) ~[?:?]
at com.liferay.server.admin.web.internal.portlet.action.EditServerMVCActionCommand._updateExternalServices(EditServerMVCActionCommand.java:671) ~[bundleFile:?]
at com.liferay.server.admin.web.internal.portlet.action.EditServerMVCActionCommand.doProcessAction(EditServerMVCActionCommand.java:236) ~[bundleFile:?]
[...]
- Second warning:
2025-04-24 08:11:51.245 WARN [liferay/adaptive_media_processor-847][AMMessageListener:79] null
com.liferay.adaptive.media.exception.AMRuntimeException$IOException: Unable to scale file entry 5166439 to match adaptive media configuration Preview-1000x0
at com.liferay.adaptive.media.image.internal.scaler.AMImageMagickImageScaler.scaleImage(AMImageMagickImageScaler.java:82) ~[?:?]
at com.liferay.adaptive.media.image.internal.processor.AMImageAMProcessor.process(AMImageAMProcessor.java:105) ~[?:?]
at com.liferay.adaptive.media.image.internal.processor.AMImageAMProcessor.process(AMImageAMProcessor.java:63) ~[?:?]
at com.liferay.adaptive.media.image.internal.processor.AMImageAMProcessor.process(AMImageAMProcessor.java:35) ~[?:?]
at com.liferay.adaptive.media.web.internal.messaging.AMProcessorCommand$2.execute(AMProcessorCommand.java:34) ~[bundleFile:?]
at com.liferay.adaptive.media.web.internal.messaging.AMMessageListener.doReceive(AMMessageListener.java:70) [bundleFile:?]
at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:39) [portal-kernel.jar:?]
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25) [portal-kernel.jar:?]
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65) [portal-kernel.jar:?]
at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:47) [bundleFile:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
at com.liferay.portal.util.FileImpl.write(FileImpl.java:803) ~[portal-impl.jar:?]
at com.liferay.portal.util.FileImpl.createTempFile(FileImpl.java:176) ~[portal-impl.jar:?]
at com.liferay.adaptive.media.image.internal.scaler.AMImageMagickImageScaler._scaleAndConvertToPNG(AMImageMagickImageScaler.java:114) ~[?:?]
at com.liferay.adaptive.media.image.internal.scaler.AMImageMagickImageScaler.scaleImage(AMImageMagickImageScaler.java:63) ~[?:?]
... 12 more
Resolution
- These warnings and error can appear in the logs when ImageMagick is correctly configured in Control Panel > Server Administration > External Services.
- The first warning will occur when ImageMagick is not enabled at all and some images are attempted to be adapted.
- The error will occur when ImageMagick is enabled while the Path configuration field doesn't include the correct path to the executable in the operating system.
- The second warning will occur when the Path configuration is still misconfigured and some images are attempted to be adapted.
- To avoid these warnings and error:
- Make sure that the Path configuration field for ImageMagick includes the correct path to the executable in your system.
- Make sure that ImageMagick is enabled.
- Review the configuration System Settings > Adaptive Media > Images and > ImageMagick to make sure all necessary MIME types are included.
- Go to Control Panel > Adaptive Media and click on Adapt Remaining for the existing Adaptive Media configurations (in the associated 3-dot menu)
did-this-article-resolve-your-issue