cancel
Showing results for 
Search instead for 
Did you mean: 

Libreoffice type detection failed

marcio
Champ in-the-making
Champ in-the-making
Hello.

I have an issue with some documents. I have the version CE 5.0.c in production and I can see the documents correctly.  If I upload the same document into CE 5.1, I cant see the preview.  In catalina.out output:

Caused by: net.sf.jooreports.openoffice.connection.OpenOfficeException: conversion failed; com.sun.star.lang.IllegalArgumentException: Unsupported URL <file:///opt/alfresco-community/tomcat/temp/Alfresco/INFORMAÇÃO.docx-OpenOfficeContentTransformer-OpenOfficeContentTransformer-1457457686397/INFORMAÇÃO.docx>: "type detection failed". 

For tests, my enviroment have the LO 4.3 and the LO 5.1, both with the same issue.

After some tasks, I renamed the file from "INFORMAÇÃO" to "INFORMACAO" (brazilian portuguese), without the chars "Ç" and "Ã"; then the preview worked.

Do I can believe I have some wrong charset config in any config file or in the server ?
Do I need  change the charset in some place to avoid the error ? 

Some idea about it ?

Thank you.
7 REPLIES 7

marcùss
Champ in-the-making
Champ in-the-making

Hi Marcio,

I've got the same issue with two servers. One in 5.1 and the other in 4.2.
I'm currently trying to find the solution on that issue. I will update if i find something.

i have already test with Libreoffice 5.2 with and without jodconverter but no result.

Can you tell me if it was a windows server or linux server do you use ?

Regards

Marcus.

marcio
Champ in-the-making
Champ in-the-making

Hello !!

I use CentOS 7.2.

Regards!

Em 26 de set de 2016, à(s) 10:22, marcùss <alfresco-ext@jiveon.com> escreveu:

Alfresco Community <https://community.alfresco.com/?et=watches.email.thread>

Re: Libreoffice type detection failed

reply from Marcùss _ <https://community.alfresco.com/people/marc%C3%B9ss?et=watches.email.thread> in Alfresco ECM - View the full discussion <https://community.alfresco.com/message/752031-re-libreoffice-type-detection-failed?commentID=752031&et=watches.email.thread#comment-752031>

Hi Marcio,

I've got the same issue with two servers. One in 5.1 and the other in 4.2.

I'm currently trying to find the solution on that issue. I will update if i find something.

i have already test with Libreoffice 5.2 with and without jodconverter but no result.

Can you tell me if it was a windows server or linux server do you use ?

Regards

Marcus.

Reply to this message by replying to this email, or go to the message on Alfresco Community <https://community.alfresco.com/message/752031-re-libreoffice-type-detection-failed?commentID=752031&et=watches.email.thread#comment-752031>

Start a new discussion in Alfresco ECM by email <mailto:discussions-community-ecm@mail.alfresco-ext.jiveon.com> or at Alfresco Community <https://community.alfresco.com/choose-container.jspa?contentType=1&containerType=14&container=2004&et=watches.email.thread>

Following Re: Libreoffice type detection failed <https://community.alfresco.com/message/752031-re-libreoffice-type-detection-failed?commentID=752031&et=watches.email.thread#comment-752031> in these streams: Inbox

This email was sent by Alfresco Community because you are a registered user.

You may unsubscribe <https://community.alfresco.com/unsubscribe.jspa?email=marciofoz%40gmail.com&token=442eb03db9f392f04b89d485b5c6fdc28be46eabdefc117f6f3842838ef76235> instantly from Alfresco Community, or adjust email frequency in your email preferences <https://community.alfresco.com/user-preferences!input.jspa>

marcùss
Champ in-the-making
Champ in-the-making

Hi Marcio, 


So we found the good set up to resolve this issue. You have to add this line on Java_opts in tomcat/bin/setenv.sh 

exemple in your case : JAVA_OPTS="$JAVA_OPTS -Duser.language=es -Duser.region=ES  -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8" 

I

hope i helped you.


Regards,
Marcus

marcio
Champ in-the-making
Champ in-the-making

Hi Marcus.

I tried in my test environment your suggestion, but no success, and too with options pt, pt_BR and ISO8559-1.

I will install a new environment with the version 201701GA and test again.

Regards.

eric_k
Champ in-the-making
Champ in-the-making

I've got the same issue on my configuration (Alfresco 5.0.d on Linux CentOS 6 / LibreOffice 4.2).

When a document has non-ASCII characters in its file name, the preview is not available.

In alfresco.log, I can read (file name is ‘Modèle A.xltx’):

Caused by: net.sf.jooreports.openoffice.connection.OpenOfficeException:

conversion failed; com.sun.star.lang.IllegalArgumentException:

Unsupported URL <file:///opt/alfresco-5.0.d/tomcat/temp/Alfresco/Mod%C3%A8le%20A.xltx-OpenOfficeContentTransformer-OpenOfficeContentTransformer-1486741335925/Mod%C3%A8le%20A.xltx>: "type detection failed"

 

 

I tried, without success, to change the setenv.sh and add file.encoding properties:

JAVA_OPTS="$JAVA_OPTS -Duser.language=fr -Duser.country=FR -Duser.region=FR -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"

I tried, without success, to change the ctl.sh and add file.encoding properties:

JAVA_OPTS="$JAVA_OPTS -Duser.language=fr -Duser.country=FR -Duser.region=FR -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"

export JAVA_OPTS

I tried, without success, to change the alfresco-global.properties:

jodconverter.enabled=true

Nevertheless, the same file is previewed on Alfresco 5.0.d on windows 7 / LibreOffice 4.2.5.2.

My Issue on Alfresco 5.2/Amazon Linux/ LibreOffice 5.2.1.2) shows contents reader's locale set as ja, and writer ja_JP. Does the different locale lead this issue?

Caused by: org.alfresco.service.cmr.repository.ContentIOException: 04158295 OpenOffice server conversion failed:
reader: ContentAccessor[ contentUrl=store://2017/5/12/20/42/c3cb3e3a-8905-472c-b870-51f23be1d906.bin, mimetype=application/vnd.openxmlformats-officedocument.presentationml.presentation, size=1201967, encoding=UTF-8, locale=ja]
writer: ContentAccessor[ contentUrl=store://2017/5/15/13/10/7c3ee071-b81f-4ab1-a3e9-ce857178e6cc.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=ja_JP]

Adding follow config resolved my issue.

  • tomcat/bin/setenv.sh
    JAVA_OPTS="$JAVA_OPTS -Duser.language=ja -Duser.country=JP -Duser.region=JP -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
  • libreoffice/program/soffice
    export LANG=ja_JP.UTF-8