I have an upload feature for users (behind a login) that lets them upload jpg/gif files. After upload the files should be resized in a bunch of formats and saved. That doesn’t always work, for reasons I’m not really sure about but most likely related to threads being blocked by other large uploads. So I have a scheduled task that runs every 15 minutes and checks if there are any outstanding images and then processes those. I’m getting the above error from time to time and it won’t go away unless I download the image, open it in photoshop, then save it for web and re-upload, at which time it processes just fine (same size and all). What could this be?!
This is a feature just for staff in our office to upload images linked to schools they are responsible for, so we’re not talking thousands of images here. 216 have been uploaded so far (in the space of a week) and I’ve had this error occur on about 4 or 5 of the images, but it’s enough that it’s annoying
additional Struct (ordered)
ErrorCode string 0
Message string org.apache.commons.imaging.ImageReadException:4 components are
invalid or unsupported
StackTrace string lucee.runtime.exp.NativeException:
org.apache.commons.imaging.ImageReadException:4 components are invalid or
Thanks for the input. Size was the first thing that came to mind. The files are actually uploaded, so I have checked those as it happened and there is no common denominator. There were a few under 200kb, and a few around the 1.5-2meg mark. There’s also a bunch uploaded that are smaller, in between and way larger and that processed just fine…
Hi Martin, the last one was indeed CMYK. I’m going to screenshot the info part of each image that gives trouble over the next few days/weeks and see if I can find a pattern. How do you work around this issue? Is this is a Lucee problem, or something in the java?
Thanks for the replies guys; glad to at least have tracked down the reason. This way I can put some fallback code in place and just email those images to myself for re-uploading or some such. Like Martin, I hope/assume this isn’t going to happen that often. I can also warn staff about this to minimize the problem. As soon as it happens again I’ll also file a bug report with that image.
My workaround has just been to have the wrong ones emailed to me and fixing them manually. They are thankfully few and far between. You could probably do a check of the message string and then replace the error with something a bit more user friendly if this was public facing code?