aws-lambda-libreoffice icon indicating copy to clipboard operation
aws-lambda-libreoffice copied to clipboard

javaldx: Could not find a Java Runtime Environment!

Open zoemrob opened this issue 3 years ago • 6 comments

So I believe I followed the instructions, not sure if I missed something though.

FROM public.ecr.aws/shelf/lambda-libreoffice-base:7.4-node16-x86_64

COPY index.js package.json ${LAMBDA_TASK_ROOT}

RUN npm install

CMD [ "index.handler" ]

This is my Dockerfile I have my app code in index.js. I'm running docker build --platform linux/x86_64 -t convert-to-pdf . and then deploying that image to my ECR registry and deploying that on my lambda function. It's all working, except when I call the convertTo method I end up getting this chunk of errors:

javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///tmp/SampleResume.pdf> failed: 0xc10(Error Area:Io Class:Write Code:16) at /home/buildslave/source/libo-core/sfx2/source/doc/sfxbasemodel.cxx:3207 at /home/buildslave/source/libo-core/sfx2/source/doc/sfxbasemodel.cxx:1783)

I haven't seen anyone else having this issue, so I'm unsure what the problem could be.

zoemrob avatar Sep 23 '22 22:09 zoemrob

Only other relevant info: I'm running on an Apple Silicon M1, which is why I'm passing in the --platform argument.

zoemrob avatar Sep 23 '22 22:09 zoemrob

Is this error specific to 1 file or happens with all even the simplest .txt files?

vladholubiev avatar Sep 29 '22 17:09 vladholubiev

I see the same issue. Built on Apple M1 Mac, using the linux_amd64 platform, and the error arises within Lambda.

JagWireZ avatar Oct 05 '22 17:10 JagWireZ

image I deployed to AWS. Please help me @vladgolubev

legome0937 avatar Nov 01 '22 11:11 legome0937

FROM public.ecr.aws/shelf/lambda-libreoffice-base:7.4-node16-x86_64

COPY index.js package.json ${LAMBDA_TASK_ROOT}

# dependency not supplied by lambda-libreoffice-base image
RUN yum install java-1.8.0-openjdk-devel -y
RUN npm install

CMD [ "index.handler" ]

Adding the java-1.8.0-openjdk-devel package did allow me to run this.

zoemrob avatar Nov 01 '22 15:11 zoemrob

FROM public.ecr.aws/shelf/lambda-libreoffice-base:7.4-node16-x86_64

COPY index.js package.json ${LAMBDA_TASK_ROOT}

# dependency not supplied by lambda-libreoffice-base image
RUN yum install java-1.8.0-openjdk-devel -y
RUN npm install

CMD [ "index.handler" ]

Adding the java-1.8.0-openjdk-devel package did allow me to run this.

Thanks! It works well

legome0937 avatar Nov 05 '22 01:11 legome0937