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

Hello!

I started to have a working version of Lucee, except from being affected to LDEV-1879 and LDEV-2150.

For some reason I made an insane decision and upgraded to the latest SNAPSHOT Release.
Unfortunately Lucee/Resin stopped working after that.

From what I can see in the logfiles, jets3t causes the issue:


org.jets3t.service.S3ServiceException: Request Error: Invalid class name: org.jets3t.service.utils.RestUtils$ConnManagerFactory
	at org.jets3t.service.S3Service.listAllBuckets(S3Service.java:1461)
	at org.lucee.extension.resource.s3.S3.getS3Service(S3.java:1146)
	at org.lucee.extension.resource.s3.S3.list(S3.java:260)
	at org.lucee.extension.resource.s3.S3.get(S3.java:600)
	at org.lucee.extension.resource.s3.S3.exists(S3.java:453)
	at org.lucee.extension.resource.s3.S3Resource.exists(S3Resource.java:320)
	at lucee.runtime.config.ConfigWebUtil._getExistingFile(ConfigWebUtil.java:381)
	at lucee.runtime.config.ConfigWebUtil.getExistingResource(ConfigWebUtil.java:369)

During the upgrade, Lucee logged and InstaceAlreadyExistsException:

javax.management.InstanceAlreadyExistsException: 'jets3t:Type=S3Service' in MBeanContext[EnvironmentClassLoader[web-app:production/webapp/default/ROOT]]
	at com.caucho.jmx.AbstractMBeanServer.registerMBean(AbstractMBeanServer.java:409)
	at contribs.mx.S3ServiceMx.registerMBean(S3ServiceMx.java:67)
	at contribs.mx.S3ServiceMx.getInstance(S3ServiceMx.java:81)
	at contribs.mx.S3ServiceMx.registerMBean(S3ServiceMx.java:71)
	at contribs.mx.MxImpl.registerS3ServiceMBean(MxImpl.java:40)

As the server did not respond, I removed the lucee-server/patches/ SNAPSHOT.lco file.

Now I get the error as described in the topic-title, when doing “ImageInfo” on some images.

lucee.runtime.exp.NativeException: Could not initialize class com.adobe.xmp.impl.XMPMetaParser
 	at com.adobe.xmp.XMPMetaFactory.parseFromBuffer(XMPMetaFactory.java:160)
 	at com.adobe.xmp.XMPMetaFactory.parseFromBuffer(XMPMetaFactory.java:144)
 	at com.drew.metadata.xmp.XmpReader.extract(XmpReader.java:116)
 	at com.drew.metadata.xmp.XmpReader.readJpegSegments(XmpReader.java:102)
 	at com.drew.imaging.jpeg.JpegMetadataReader.processJpegSegmentData(JpegMetadataReader.java:126)
 	at com.drew.imaging.jpeg.JpegMetadataReader.process(JpegMetadataReader.java:118)
 	at com.drew.imaging.jpeg.JpegMetadataReader.readMetadata(JpegMetadataReader.java:69)
 	at com.drew.imaging.jpeg.JpegMetadataReader.readMetadata(JpegMetadataReader.java:76)
 	at org.lucee.extension.image.ImageMetaDrew.jpg(ImageMetaDrew.java:60)

What is the best way to get a clean & running version of Lucee in such a case?

Regards
Michael

on more thing I found in the logfiles:

lucee.runtime.exp.ApplicationException: The Extension [Image extension : 1.0.0.22-SNAPSHOT] cannot be loaded, Lucee Version must be at least [5.3.0.35-ALPHA], version is [5.2.6.60].
	at lucee.runtime.extension.RHExtension.readCoreVersion(RHExtension.java:580)
	at lucee.runtime.extension.RHExtension.readManifestConfig(RHExtension.java:473)
	at lucee.runtime.extension.RHExtension.<init>(RHExtension.java:196)
	at lucee.runtime.config.XMLConfigWebFactory.loadExtensionBundles(XMLConfigWebFactory.java:4300)
	at lucee.runtime.config.XMLConfigWebFactory.load(XMLConfigWebFactory.java:448)
	at lucee.runtime.config.XMLConfigServerFactory.load(XMLConfigServerFactory.java:173)
	at lucee.runtime.config.XMLConfigServerFactory.newInstance(XMLConfigServerFactory.java:125)
	at lucee.runtime.engine.CFMLEngineImpl.getConfigServerImpl(CFMLEngineImpl.java:789)
	at lucee.runtime.engine.CFMLEngineImpl.<init>(CFMLEngineImpl.java:270)
	at lucee.runtime.engine.CFMLEngineImpl.getInstance(CFMLEngineImpl.java:623)

I there any way, to do a downgrade of that extension, so it is compatible with 5.2.9.31 again? The image-extension is not listed in the extensions-list in the server-admin.

Clean downgrade
As far as i remember this Lucee version (5.2.9.31) cannot handle if an installed extension no longer can be loaded (because it is build for a newer Lucee version).
The latest 5.2.9.35 Snapshot should be able to handle this so upgrade to this version.
Or if you prefer to stay on 5.2.9.31 open the file /lucee-server/context/lucee-server.xml search for the following tag and delete it, the restart Lucee

<rhextension file-name="y1xbkpufk7o.lex" id="B737ABC4-D43F-4D91-8E8E973E37C40D1B" 
	lucee-core-version="5.3.0.35-ALPHA" name="Image extension" release-type="all" start-bundles="false" trial="false" version="1.0.0.24-SNAPSHOT"/>

S3 problem in 5.3
When you downgrade Lucee from 5.3 to 5.2, that has zero influence on your initial issue you had, S3 is not part of Lucee core, it is an extension, sure when you upgrade from 5.2 to 5.3, the S3 extension may also get upgraded in case it not already is, BUT downgrade Lucee again to 5.2 will not touch the S3 extension itself. it will keep S3 on the version it is, Lucee NEVER downgrade extensions.
If you have a problem with the S3 extension, downgrade/upgrade this extension not Lucee.

The issue you saw most likely would be get solved by restarting the servlet engine.

My sugestion, go back to 5.3 and if you have problems with S3, downgrade S3.

I just checked what version are defined as minimal requirement with 5.2 and 5.3, they are the same, so in other words upgrading Lucee from 5.2 to 5.3 did NOT touch S3 at all, a simple restart would solve the issue.

Hello Micha,

thank you for your reply. Unfortunately it did not work for me.
The only thing that seems to work, is removing the lucee-server directory, so lucee does a clean re-initialisation (or whatever you call the decompression of the lucee.jar).

I tried to do an upgrade to the latest stable 5.3.1.95 after a clean re-initialisation and Lucee stops with the very same empty page.
In the logfiles just 2 seconds after upgrading the extension [17AB52DE-B300-A94B-E058BD978511E39E;name=S3;label=S3;version=0.9.4.119] the following error can be found

javax.management.InstanceAlreadyExistsException: 'jets3t:Type=S3Service' in MBeanContext[EnvironmentClassLoader[web-app:production/webapp/default/ROOT]]
	at com.caucho.jmx.AbstractMBeanServer.registerMBean(AbstractMBeanServer.java:409)
	at contribs.mx.S3ServiceMx.registerMBean(S3ServiceMx.java:67)
	at contribs.mx.S3ServiceMx.getInstance(S3ServiceMx.java:81)
	at contribs.mx.S3ServiceMx.registerMBean(S3ServiceMx.java:71)
	at contribs.mx.MxImpl.registerS3ServiceMBean(MxImpl.java:40)
	at org.jets3t.service.mx.MxDelegate.registerS3ServiceMBean(MxDelegate.java:100)
	at org.jets3t.service.StorageService.initializeDefaults(StorageService.java:157)
	at org.jets3t.service.impl.rest.httpclient.RestStorageService.initializeDefaults(RestStorageService.java:165)
	at org.jets3t.service.StorageService.<init>(StorageService.java:126)
	at org.jets3t.service.impl.rest.httpclient.RestStorageService.<init>(RestStorageService.java:153)
	at org.jets3t.service.S3Service.<init>(S3Service.java:96)
	at org.jets3t.service.impl.rest.httpclient.RestS3Service.<init>(RestS3Service.java:150)
	at org.jets3t.service.impl.rest.httpclient.RestS3Service.<init>(RestS3Service.java:127)
	at org.jets3t.service.impl.rest.httpclient.RestS3Service.<init>(RestS3Service.java:107)
	at org.lucee.extension.resource.s3.S3.getS3Service(S3.java:1143)
	at org.lucee.extension.resource.s3.S3.list(S3.java:260)
	at org.lucee.extension.resource.s3.S3.get(S3.java:600)
	at org.lucee.extension.resource.s3.S3.exists(S3.java:453)
	at org.lucee.extension.resource.s3.S3Resource.exists(S3Resource.java:320)
	at lucee.runtime.config.ConfigWebUtil._getExistingFile(ConfigWebUtil.java:381)
	at lucee.runtime.config.ConfigWebUtil.getExistingResource(ConfigWebUtil.java:369)
	at lucee.runtime.MappingImpl.<init>(MappingImpl.java:138)

There is another strange thing: It is possible to uninstall the S3 Extension from the server-admin but after that, Lucee fails to work with an exception stating a missing S3 Extension. For me that makes no sense.

Regards
Michael

Hi,

I believe same issue, I upload lots of images to Amazon S3 and suddenly got this error. Tested it and I believe it is the imageNew and read functions:

gives this error on my server, but locally it doesn’t.

Regards,

Hi,

It is the imageRead function which gives the error. I changed it for:

<cffile action="readbinary" file = "#variables.fileUrl#" variable="cfImage">

which does the trick.

Hi,

Is this fixed yet, I updated as well and downgraded again because of various errors in Lucee, one of them is that imageNew and imageInfo do not work anymore and give the:

could not initialize class com.adobe.xmp.impl.XMPMetaParser error.

Regards,

Dick Goosen