Image functions problems


In some cases in the latest Lucee update the image function do not work anymore. They give a
Could not initialize class com.adobe.xmp.impl.XMPMetaParser error, downgrading does not help.


Dick Goosen


lucee.runtime.exp.NativeException: Could not initialize class com.adobe.xmp.impl.XMPMetaParser
at com.adobe.xmp.XMPMetaFactory.parseFromBuffer(
at com.adobe.xmp.XMPMetaFactory.parseFromBuffer(
at com.drew.metadata.xmp.XmpReader.extract(
at com.drew.metadata.xmp.XmpReader.readJpegSegments(
at com.drew.imaging.jpeg.JpegMetadataReader.processJpegSegmentData(
at com.drew.imaging.jpeg.JpegMetadataReader.process(
at com.drew.imaging.jpeg.JpegMetadataReader.readMetadata(
at com.drew.imaging.jpeg.JpegMetadataReader.readMetadata(
at org.lucee.extension.image.ImageMetaDrew.jpg(
at org.lucee.extension.image.ImageMetaDrew.addInfo(
at org.lucee.extension.image.Image._info(
at org.lucee.extension.image.Image.valueIterator(
at lucee.runtime.reflection.Reflector._clean(
at lucee.runtime.reflection.Reflector._clean(
at lucee.runtime.reflection.Reflector.cleanArgs(
at lucee.runtime.reflection.Reflector.getMethodInstanceEL(
at lucee.runtime.reflection.Reflector.getSetter(
at lucee.runtime.tag.TagUtil.setAttribute(
at lucee.runtime.tag.TagUtil.setAttribute(
at app.cfc.add_property_cfc$cf.udfCall1(/app/cfc/add_property.cfc:483)
at app.cfc.add_property_cfc$cf.udfCall(/app/cfc/add_property.cfc)
at lucee.runtime.type.UDFImpl.implementation(
at lucee.runtime.type.UDFImpl._call(
at lucee.runtime.type.UDFImpl.callWithNamedValues(
at lucee.runtime.ComponentImpl._call(
at lucee.runtime.ComponentImpl._call(
at lucee.runtime.ComponentImpl.callWithNamedValues(
at lucee.runtime.tag.Invoke.doComponent(
at lucee.runtime.tag.Invoke.doEndTag(
at test_cfm$
at lucee.runtime.PageContextImpl._doInclude(
at lucee.runtime.PageContextImpl._doInclude(
at lucee.runtime.listener.ModernAppListener._onRequest(
at lucee.runtime.listener.MixedAppListener.onRequest(
at lucee.runtime.PageContextImpl.execute(
at lucee.runtime.PageContextImpl._execute(
at lucee.runtime.PageContextImpl.executeCFML(
at lucee.runtime.engine.Request.exe(
at lucee.runtime.engine.CFMLEngineImpl._service(
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(
at lucee.loader.servlet.CFMLServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.tomcat.websocket.server.WsFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.AbstractHttp11Processor.process(
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
at org.apache.tomcat.util.threads.TaskThread$
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.adobe.xmp.impl.XMPMetaParser
… 64 more

What versions? Did you try 5.2.9? Lucee 5.3 moved image to an extension and might have changed something.

Downgrading does not work. Things started when updating to latest Lucee. Currently I use Lucee


are you able to reproduce it, or does it only happen randomly?

I’ve seen Lucee image functions choke on some JPGs occasionally. I always suspected a problem with some meta data, but never really verified this, since it was used in an internal chunk of code only, and the quickest fix was to re-save the JPG with a non-Adobe tool.
I have definitely seen this behavior since Lucee 5.1, maybe even before.

Are they CMYK images? Plz vote for this issue :slight_smile:

I am able to reproduce it, but it happens only with certain jpg images, this image to be more specific was resized (smaller) with Picasa.

Hi, if I resaved the image wuth the error with Adobe Photoshop and I still I get the error. If I resave the image with Sketch I do not get the error and it uploads fine.

The image is RGB, 8 bits channel.

On my local machine Lucee no problem with the same image which gives the error on the live server.

Can you file a bug in jira with the reproducible test case?

had a similar problem and created a bug here

the reason a downgrade does not work is that the image extension remains, you only downgrade the core, the extension stays.
you need to uninstall the extension.

1 Like

Uninstall which extension? And can I still do image transformations, uploads, etc. afterwards?

Again I narrowed it down to the imageNew function

<cfset cfImage = imageNew(“someFile”)>

gives the

Could not initialize class com.adobe.xmp.impl.XMPMetaParser


Again the workaround is to use the cffile readbinary tag. Think this is up to now the most reliable tag when working with images.

You need to download and re-install the older version of the image-extension afterwards.

I had the very same issue. That was a mess.


given all these problems users have been experiencing, there needs to be a better solution

there is a minversion in the file

It doesn’t seem this ever gets checked / enforced / warned?

i.e under the server admin

  • on the update page, when an older version is selected to downgrade to, check the installed extensions and warn about any potential incompatibilities
  • on the applications page (i.e. extensions) show a INCOMPATIBLE banner, like the UPDATE ME (obviously that is only going to be useful once it’s implemented, i.e. older Lucee versions will still have the problem)

bug filed, please vote for it