liferay-docker icon indicating copy to clipboard operation
liferay-docker copied to clipboard

Error when running liferay portal 6.2.5-ga6

Open dmckami opened this issue 3 years ago • 5 comments

When pulling and running the latest image liferay/portal:6.2.5-ga6 the portal will not work and print an error in the logs (note: the container is not stopping or crashing either):

Jul 01, 2021 12:44:22 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet Friendly URL Servlet - Public threw exception
java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255
[...]

After searching the web it seems that this is a known issue:

  • https://issues.liferay.com/browse/LPS-117529
  • https://help.liferay.com/hc/en-us/articles/360051633372-Known-issue-Error-Invalid-version-number-Version-number-may-be-negative-or-greater-than-255-when-starting-up-Liferay-6-2-using-jdk-8u261-or-later

and related to the ICU4j library and/or the JVM minor version being greater than 255.

Any help or hints would be much appreciated.

dmckami avatar Jul 01 '21 13:07 dmckami

according to the LSP, there is a later version of 6.2.x that addresses this issue

if you are tied to the ga6 docker image then perhaps you can use that as a base image and install a lower dist of jdk8?

or you can try and patch the portal to the version on the LPS Portal ee-6.2.x GIT ID: 53ae89c814060cdeaee44210ec6a803efc362d5c.

arbetts avatar Aug 27 '21 21:08 arbetts

Thank you very much for your reply! That is much appreciated. And apologies for only getting back to you now.

I have tried using the latest Docker images for both Liferay 6.2.5 (liferay/portal:6.2.5-ga6) and 6.2.10 (liferay/portal:6.2.10.21-sp20) versions. Both versions won't come up but rather throw the above mentioned exception. On that end I am a bit confused. How would I be able to use a later version of 6.2.x if both Docker 6.2.x images are not working? Also, is there a rational for releasing images that cannot be run out of the box?

My workaround so far was to stick to an older explicit ga6 Docker image tag (liferay/portal:6.2.5-ga6-d1.3.0-20201215232311 to be precise). This workaround is basically using "a lower dist of jdk8" as this includes jdk1.8.0_232. Could you maybe please point me to where I could find the mentioned Git commit? I cannot find that ID anywhere within Github. I assume it must be in another repo somewhere. The LSP unfortunately doesn't link to it either.

My fear currently is that this was fixed in the EE version only and not ported to the CE version.

Many thanks for your support!

dmckami avatar Jan 11 '22 15:01 dmckami

Any update?

jjasoncool avatar Jan 19 '23 01:01 jjasoncool

Hello everybody, I just stumbled over this issue myself and found a very hackish solution, that was inspired by a comment on https://stackoverflow.com/questions/64040255/invalid-version-number-version-number-may-be-negative-or-greater-than-255

I created a file $(pwd)/mnt/files/tomcat/lib/ext/system-ext.properties with the following content:

java.version=1.8.0_255-b10

Then I started the liferay server with

docker run --rm -ti -v /$(pwd)/mnt:/mnt/liferay liferay/portal:6.2.10.21

The mounted file will modify the java.version system property after startup to a patch version 255 that will be parsable by ICU4J. This solution works for 6.2.5-ga6 as well.

Regards, Olaf

frickeo avatar Jan 22 '23 17:01 frickeo

Hello everybody, I just stumbled over this issue myself and found a very hackish solution, that was inspired by a comment on https://stackoverflow.com/questions/64040255/invalid-version-number-version-number-may-be-negative-or-greater-than-255

I created a file $(pwd)/mnt/files/tomcat/lib/ext/system-ext.properties with the following content:

java.version=1.8.0_255-b10

Then I started the liferay server with

docker run --rm -ti -v /$(pwd)/mnt:/mnt/liferay liferay/portal:6.2.10.21

The mounted file will modify the java.version system property after startup to a patch version 255 that will be parsable by ICU4J. This solution works for 6.2.5-ga6 as well.

Regards, Olaf

Yes, I found same stackoverflow issue, too.

But I use another way is download older java package from

https://www.azul.com/downloads/?version=java-8-lts&os=ubuntu&architecture=x86-64-bit&package=jdk&show-old-builds=true

and use dockerfile copy into container, below is my dockerfile

ARG LR_VERSION
FROM liferay/portal:${LR_VERSION}

COPY zulu8.46.0.19-ca-jdk8.0.252-linux_amd64.deb /zulu8.46.0.19-ca-jdk8.0.252-linux_amd64.deb

USER root
# RUN apt-get update && apt-get -y dist-upgrade
RUN apt -y --allow-downgrades install /zulu8.46.0.19-ca-jdk8.0.252-linux_amd64.deb

jjasoncool avatar Jan 30 '23 01:01 jjasoncool