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

File cannot be previewed in alfresco sdk 4.0 #566

Closed
harry-xqb opened this issue Apr 17, 2019 · 2 comments · May be fixed by #567
Closed

File cannot be previewed in alfresco sdk 4.0 #566

harry-xqb opened this issue Apr 17, 2019 · 2 comments · May be fixed by #567

Comments

@harry-xqb
Copy link

harry-xqb commented Apr 17, 2019

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request

Expected Behavior

Ability to preview files in all formats in share

Current Behavior

When I used alfresco sdk 4.0.0 and deployed the project in docker, the project started successfully, but files such as doc, docx, xls, etc. could not be previewed.

Possible Solution

I used "run.sh build_start" to start my project. The following error was thrown during the startup of the project. It should be that my docker does not specify officeHome, but I don't know how to configure libreoffice in docker.
I will be very grateful for any reply.
2019-04-17 09:04:14,707 ERROR [transform.magick.AbstractImageMagickContentTransformerWorker] [localhost-startStop-1] ImageMagickContentTransformerWorker not available: 03170018 Failed to perform ImageMagick transformation: esign-acs_1 | Execution result: esign-acs_1 | os: Linux esign-acs_1 | command: ./ImageMagick/bin/convert /usr/local/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_init_source_12970711759246868090.gif -strip -quiet /usr/local/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_init_target_11096608728223487641.png esign-acs_1 | succeeded: false esign-acs_1 | exit code: 1 esign-acs_1 | out: esign-acs_1 | err: Cannot run program "./ImageMagick/bin/convert": error=2, No such file or directory esign-acs_1 | 2019-04-17 09:04:14,722 ERROR [transform.pdfrenderer.AlfrescoPdfRendererContentTransformerWorker] [localhost-startStop-1] Remote Alfresco PDF Renderer is not available for transformations. Execution result: esign-acs_1 | os: Linux esign-acs_1 | command: ./alfresco-pdf-renderer --version esign-acs_1 | succeeded: false esign-acs_1 | exit code: 1 esign-acs_1 | out: esign-acs_1 | err: Cannot run program "./alfresco-pdf-renderer": error=2, No such file or directory esign-acs_1 | 2019-04-17 09:04:14,725 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete esign-acs_1 | 2019-04-17 09:04:14,725 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'OOoJodconverter' subsystem, ID: [OOoJodconverter, default] esign-acs_1 | 2019-04-17 09:04:14,797 ERROR [repo.content.JodConverterSharedInstance] [localhost-startStop-1] Unexpected error in configuring or starting the JodConverter library.The following error is shown for informational purposes only. esign-acs_1 | java.lang.IllegalArgumentException: officeHome must exist and be a directory

Steps to Reproduce (for bugs)

  1. generate a new project use bellow command :
    first: mvn archetype:generate -Dfilter=org.alfresco:
    second: choose 2 (all in one)
    third: choose 4.0.0
  2. run the project use commond: run.sh build_start
    3.after project started, access http://localhost:8180/share then login with admin admin
  3. open any doc or docx file, it would can not be previewed

Context

Your Environment

Additional information

@douglascrp
Copy link
Contributor

douglascrp commented May 1, 2019

Hello.

This issue is caused by the following COPY instruction
https://github.com/Alfresco/alfresco-sdk/blob/master/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/docker/Dockerfile#L13
It is fully replacing the OOTB file which has all the required properties correctly set.

An easy way to avoid this would be by changing the alfresco-global.properties set by using the approach described at https://github.com/keensoft/alfresco-docker-template/tree/master/templates/201806-GA#adding-configuration-to-repository

I am working right now on a PR for the SDK project addressing this issue.

@jlosornogil
Copy link
Contributor

Hello,

IMHO you're facing this issue because Alfresco Transformation Service is not enabled by default in the projects created with the SDK 4.

In SDK 4.1 we've added a new section in the troubleshooting page and we've created a new article in the documentation to explain how to setup ATS.

I've followed the guide in SDK 4.1 and the preview is being showed properly for the corresponding files.

I hope this can help

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

Successfully merging a pull request may close this issue.

4 participants