Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running liferay portal 6.2.5-ga6 #74

Open
dmckami opened this issue Jul 1, 2021 · 5 comments
Open

Error when running liferay portal 6.2.5-ga6 #74

dmckami opened this issue Jul 1, 2021 · 5 comments

Comments

@dmckami
Copy link

dmckami commented Jul 1, 2021

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:

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

Any help or hints would be much appreciated.

@arbetts
Copy link
Contributor

arbetts commented Aug 27, 2021

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.

@dmckami
Copy link
Author

dmckami commented Jan 11, 2022

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!

@jjasoncool
Copy link

Any update?

@frickeo
Copy link

frickeo commented Jan 22, 2023

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

@jjasoncool
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants