isImageFile broken in 5.3.4.77

when calling isImageFile I get an exection

Lucee 5.3.4.77 Error (java.lang.NoClassDefFoundError)
Message Could not initialize class org.lucee.extension.image.Image

I checked using the ExtensionList() and it shows the extension is installed:

B737ABC4-D43F-4D91-8E8E973E37C40D1B
1.0.0.27-SNAPSHOT Image extension
1 lucee.image.extension 1.0.0.27-SNAPSHOT
2 metadata.extractor 2.8.1.0002L
3 org.apache.commons.image 1.0.0.R1534292
4 org.lucee.commons.sanselan 0.97.0.incubator
5 org.lucee.imgscalr 4.2.0
6 sun.jai.codec 1.1.2.0003L
7 sun.jai.core 1.2.1.0003L|Array

how can this be resolved?

EDIT -
This does not happen on 5.3.5.80-SNAPSHOT bit is still present in RC 5.3.5.78

All about our stack!

OS: arch linux 5.5.4-arch1-1
Java Version: openJDK 1.8.0_242
Tomcat Version: 8.5.51
Lucee Version: 5.3.4.77

Did you try updating the image extension?

Zac,

Thanks for your suggestion, I tried both downgrading to the previous release and upgrading to the latest snapshot bout had no success.

Since I could not find any documentation on how to do this I list the steps I took belop

to change (downgrade) the version I did the following

  1. stop tomcat8
  2. in ROOT find where the existing image extension is:
    grep -rl lucee.image
  3. delete existing image
    rm WEB-INF/lucee-server/context/extensions/available/B737ABC4-D43F-4D91-8E8E973E37C40D1B-1.0.0.27-SNAPSHOT.lex WEB-INF/lucee-server/context/extensions/installed/1drjlh60smum9.lex
  4. download version 1.0.0.21
    curl "https://extension.lucee.org/rest/extension/provider/full/B737ABC4-D43F-4D91-8E8E973E37C40D1B?version=1.0.0.21" -o WEB-INF/lucee-server/context/extensions/available/B737ABC4-D43F-4D91-8E8E973E37C40D1B-1.0.0.21.lex
    cp WEB-INF/lucee-server/context/extensions/available/B737ABC4-D43F-4D91-8E8E973E37C40D1B-1.0.0.21.lex WEB-INF/lucee-server/deploy/
  5. start tomcat8
  6. use ExtensionList() shows version
    lucee.image.extension = 1.0.0.21
  7. try isImageFile result:
    Lucee 5.3.4.77 Error (java.lang.NoClassDefFoundError)
    Message Could not initialize class org.lucee.extension.image.Image

to change (upgrade) the version I did the following

  1. stop tomcat8
  2. in ROOT find where the existing image extension is:
    grep -rl lucee.image
  3. delete existing image
    1rm WEB-INF/lucee-server/context/extensions/available/B737ABC4-D43F-4D91-8E8E973E37C40D1B-1.0.0.27-SNAPSHOT.lex WEB-INF/lucee-server/context/extensions/installed/1pjw2bjq3qkw6.lex`
  4. download version 1.0.0.35
    curl "[https://extension.lucee.org/rest/extension/provider/full/B737ABC4-D43F-4D91-8E8E973E37C40D1B?version=1.0.0.35-SNAPSHOT"](https://extension.lucee.org/rest/extension/provider/full/B737ABC4-D43F-4D91-8E8E973E37C40D1B?version=1.0.0.35-SNAPSHOT) -o WEB-INF/lucee-server/context/extensions/available/B737ABC4-D43F-4D91-8E8E973E37C40D1B-1.0.0.35.lex
    cp WEB-INF/lucee-server/context/extensions/available/B737ABC4-D43F-4D91-8E8E973E37C40D1B-1.0.0.35.lex WEB-INF/lucee-server/deploy/
  5. start tomcat8
  6. use ExtensionList() shows
    lucee.image.extension 1.0.0.35
  7. try isImageFile result:
    Lucee 5.3.4.77 Error (java.lang.NoClassDefFoundError)
    Message Could not initialize class org.lucee.extension.image.Image

is there a particular version you have in mind I should try or a better method of doing this?

There’s a UI in the server admin, under applications

the UI is not accessible as never use it i.e. there is no mapping for /lucee provided. does using the UI fix this problem can it not be done via the console?

the way we deploy lucee is as follows (in order to have a cutom path and ensure the webinf is not under the www path):

  1. install tomcat
  2. change default web-inf (this is done by adding a pre execute script to systemd tomcat8 service)
    sed -i 's|appBase="webapps"|appBase="/mnt/data/qebapps"|' /etc/tomcat8/server.xml
    if [ -f /mnt/data/webapps/ROOT/WEB-INF/lucee/lucee-web.xml.cfm ]; then
    sed -i 's,<mapping archive="{lucee-web}/context/lucee-context.lar" physical="{lucee-web}/context/" primary="physical" readonly="yes" toplevel="yes" trusted="true" virtual="/lucee/"/>,<mapping physical="{web-root-directory}/../../www/" primary="physical" readonly="yes" toplevel="yes" trusted="true" virtual="/"/>,' /mnt/data/webapps/ROOT/WEB-INF/lucee/lucee-web.xml.cfm;
    fi

since the webinf is lower then the www and the mapping is modified lucee admin pages are not present but this is how we prefer it.

To test different versions we delete the ROOT directory and ROOT.war and replace it with the version we want. this way the Lucee version and extensions should be compatible since they are shipped together

My argument is that the image functions are fundamental to most websites,

how can a final release have such a major issue?
why is the same issue not present in the snapshots that follow the final release?
has no one else experienced this bug?

This bug was reported in https://luceeserver.atlassian.net/browse/LDEV-2703 only last week

Reading the linked issue above, it seems that the latest java 1.8 u242 has caused some problems.

Did you test the 5.3.4.73 RC? This is a community project which relies on the community testing and reporting bugs. I regularly test the latest snapshots in my dev environment and report any bugs I find.

The good news is that this has already been fixed in a subsequent snapshot, that’s just how the development process works.

Hi Zac

I can confirm 5.3.4.73 RC works fine

Thanks.

as a work around I use external tools for determining file type

openJDK 8.u232-1