cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco 4.2f - This Document Can't Be Previewed.

sicknick
Champ on-the-rise
Champ on-the-rise
I am having an issue with my new Alfresco install and I am trying to figure out what is causing it exactly.
I am running Alfresco 4.2f on CentOS 6.5 64 bit (Minimal). I have a PostgreSQL database on a seperate CentOS3 6.5 64bit (Minimal) server.

I am able to preview PDF, PNG, JPG with no issues.

Whenever I try to preview a .xls or a .doc file (I am using the files in the Sample Site as a test, even though I have tested with my own files).

When I start my Alfresco server, everything is good except 1 Warning when the service starts. Followed by a few errors when I try to preview the documents.

My log looks like this:

<blockcode>
[root@web /]# cat alfresco.log
13:40:46,235 INFO  [org.alfresco.repo.admin] Using database URL 'jdbcSmiley Tongueostgresql://192.168.10.25:5432/alfresco' with user 'alfresco'.
13:40:46,447 INFO  [org.alfresco.repo.admin] Connected to database PostgreSQL version 9.3.4
13:40:56,346 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
13:40:56,469 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
13:41:08,038 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor Repository Template Processor for extension ftl
13:41:08,042 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor Repository Script Processor for extension js
13:41:17,386 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Connecting to database: jdbcSmiley Tongueostgresql://192.168.10.25:5432/alfresco, UserName=alfresco, PostgreSQL Native Driver
13:41:17,386 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
13:41:18,821 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] No changes were made to the schema.
13:41:19,333 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
13:41:19,522 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
13:41:19,839 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Search' subsystem, ID: [Search, managed, solr]
13:41:20,272 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Search' subsystem, ID: [Search, managed, solr] complete
13:41:20,475 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'thirdparty' subsystem, ID: [thirdparty, default]
13:41:20,956 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete
13:41:20,956 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'OOoDirect' subsystem, ID: [OOoDirect, default]
13:41:21,304 WARN  [org.alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.
13:41:21,309 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'OOoDirect' subsystem, ID: [OOoDirect, default] complete
13:41:21,311 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /opt/alfresco/alf_data
13:41:21,360 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
13:41:22,741 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] No patches were required.
13:41:22,791 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 2 module(s).
13:41:22,838 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org_alfresco_module_wcmquickstart' version 1.0.
13:41:22,890 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org.alfresco.integrations.google.docs' version 2.0.4.
13:41:22,909 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'fileServers' subsystem, ID: [fileServers, default]
13:41:23,507 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'fileServers' subsystem, ID: [fileServers, default] complete
13:41:23,508 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'imap' subsystem, ID: [imap, default]
13:41:23,621 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'imap' subsystem, ID: [imap, default] complete
13:41:23,621 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'email' subsystem, ID: [email, outbound]
13:41:23,728 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'email' subsystem, ID: [email, outbound] complete
13:41:23,728 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'email' subsystem, ID: [email, inbound]
13:41:23,815 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'email' subsystem, ID: [email, inbound] complete
13:41:23,815 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Subscriptions' subsystem, ID: [Subscriptions, default]
13:41:23,828 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Subscriptions' subsystem, ID: [Subscriptions, default] complete
13:41:23,906 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Synchronization' subsystem, ID: [Synchronization, default]
13:41:24,131 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Synchronization' subsystem, ID: [Synchronization, default] complete
13:41:24,208 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.7.0_25-b15; maximum heap size 910.250MB
13:41:24,209 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community). Current version: 4.2.0 (r63893-b12) schema 6,033. Originally installed version: 4.2.0 (r63893-b12) schema 6,033.
13:41:24,254 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'ActivitiesFeed' subsystem, ID: [ActivitiesFeed, default]
13:41:24,390 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'ActivitiesFeed' subsystem, ID: [ActivitiesFeed, default] complete
13:41:24,390 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Replication' subsystem, ID: [Replication, default]
13:41:24,400 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Replication' subsystem, ID: [Replication, default] complete
13:42:07,209 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'googledocs' subsystem, ID: [googledocs, v2]
13:42:07,294 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'googledocs' subsystem, ID: [googledocs, v2] complete
13:42:17,755 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 513 Web Scripts (+0 failed), 796 URLs
13:42:17,758 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 2 Package Description Documents (+0 failed)
13:42:17,758 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 1 Schema Description Documents (+0 failed)
13:42:21,252 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 513 Web Scripts (+0 failed), 796 URLs
13:42:21,253 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 2 Package Description Documents (+0 failed)
13:42:21,253 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 1 Schema Description Documents (+0 failed)
13:42:21,257 INFO  [org.springframework.extensions.webscripts.AbstractRuntimeContainer] Initialised Repository Web Script Container (in 9815.537ms)
13:42:21,303 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
13:42:21,306 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
13:42:24,488 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 513 Web Scripts (+0 failed), 796 URLs
13:42:24,488 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 2 Package Description Documents (+0 failed)
13:42:24,488 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 1 Schema Description Documents (+0 failed)
13:42:24,786 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 11 Web Scripts (+0 failed), 82 URLs
13:42:24,786 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Package Description Documents (+0 failed)
13:42:24,786 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)
13:42:24,911 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 11 Web Scripts (+0 failed), 82 URLs
13:42:24,911 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Package Description Documents (+0 failed)
13:42:24,911 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)
13:42:24,913 INFO  [org.springframework.extensions.webscripts.AbstractRuntimeContainer] Initialised Public Api Web Script Container (in 226.91821ms)
13:42:24,969 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 11 Web Scripts (+0 failed), 82 URLs
13:42:24,969 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Package Description Documents (+0 failed)
13:42:24,969 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)
13:45:22,228 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Transformers' subsystem, ID: [Transformers, default]
13:45:22,353 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.complex.JodConverter.Image as sub transformers could not be found or created ("JodConverter.2Pdf|pdf|complex.PDF.Image").
13:45:22,353 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.complex.JodConverter.Pdf2swf as sub transformers could not be found or created ("JodConverter.2Pdf|pdf|Pdf2swf").
13:45:22,353 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.JodConverter.Html2Pdf as sub transformers could not be found or created ("JodConverter|odt|JodConverter").
13:45:22,354 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.JodConverter.2Pdf as sub transformers could not be found or created ("JodConverter|JodConverter.Html2Pdf").
13:45:22,354 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.complex.JodConverter.PdfBox as sub transformers could not be found or created ("JodConverter.2Pdf|pdf|PdfBox").
13:45:22,561 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Transformers' subsystem, ID: [Transformers, default] complete
</blockcode>

If you missed it I am getting this WARNING when I start the server:
WARN  [org.alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.


I am getting these errors after the preview initiates whether it is successful (viewing a PDF) or unsuccessful (viewing a .doc or .xls)


ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.complex.JodConverter.Image as sub transformers could not be found or created ("JodConverter.2Pdf|pdf|complex.PDF.Image").
ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.complex.JodConverter.Pdf2swf as sub transformers could not be found or created ("JodConverter.2Pdf|pdf|Pdf2swf").
ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.JodConverter.Html2Pdf as sub transformers could not be found or created ("JodConverter|odt|JodConverter").
ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.JodConverter.2Pdf as sub transformers could not be found or created ("JodConverter|JodConverter.Html2Pdf").
ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.complex.JodConverter.PdfBox as sub transformers could not be found or created ("JodConverter.2Pdf|pdf|PdfBox").
INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Transformers' subsystem, ID: [Transformers, default] complete



This is what my alfresco-global.properties file looks like:

<blockcode>
[root@web /]# cat /opt/alfresco/tomcat/shared/classes/alfresco-global.properties

###############################
## Common Alfresco Properties #
###############################

dir.root=/opt/alfresco/alf_data

alfresco.context=alfresco
alfresco.host=web.mydomain.com
alfresco.port=8080
alfresco.protocol=http

share.context=share
share.host=web.mydomain.com
share.port=8080
share.protocol=http

db.driver=org.postgresql.Driver
db.name=alfresco
db.username=alfresco
db.password=mypassword
db.host=192.168.10.25
db.port=5432
db.url=jdbcSmiley Tongueostgresql://${db.host}:${db.port}/${db.name}

### FTP Server Configuration ###
ftp.enabled=true
ftp.port=21

### RMI service ports ###
alfresco.rmi.services.port=50500
avm.rmi.service.port=0
avmsync.rmi.service.port=0
attribute.rmi.service.port=0
authentication.rmi.service.port=0
repo.rmi.service.port=0
action.rmi.service.port=0
deployment.rmi.service.port=0

### External executable locations ###
ooo.exe=/opt/alfresco/libreoffice/program/soffice.bin
ooo.enabled=true
ooo.port=8100
img.root=/opt/alfresco/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
swf.exe=/opt/alfresco/common/bin/pdf2swf
swf.languagedir=/opt/alfresco/common/japanese

jodconverter.enabled=false
jodconverter.officeHome=/opt/alfresco/libreoffice
jodconverter.portNumbers=8100

### Initial admin password ###
alfresco_user_store.adminpassword=89361c0bfe1b98e4930652685cc6deeb

### E-mail site invitation setting ###
notification.email.siteinvite=false

### License location ###
dir.license.external=/opt/alfresco

### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443

### BPM Engine ###
system.workflow.engine.jbpm.enabled=false
</blockcode>




I have seen many people that have had this issue, many of the forum responses are still unresolved and some that had been resolved had solutions that did not work for me such as these two:

http://injustfiveminutes.com/2012/11/28/docx-pptx-document-preview-fails-on-alfresco-4-2-c/ <— Did not work, I am sure it is not a size issue, I am using the files from the sample site.

https://forums.alfresco.com/forum/end-user-discussions/alfresco-share/office-document-thumbnailsprev... <— I was hoping this was it, but this didn't work either.


Can someone please help me figure this out. This is a pretty standard install so far and I am getting this error.
I installed it using the Alfresco installer, the only thing I left out was the database install which I did seperately.


15 REPLIES 15

eswbitto
Confirmed Champ
Confirmed Champ
Try adding this to your global.properties and then restart your alfresco service.


content.transformer.OpenOffice.extensions.docx.pdf.maxSourceSizeKBytes=10240


That may or may not work. Its worth a try.

sicknick
Champ on-the-rise
Champ on-the-rise
Unfortunately that didn't work.

Identical results to what I always had. I should also note that the thumbnail previews work, just not the full document.

Any other ideas?

eswbitto
Confirmed Champ
Confirmed Champ
Is this a vanilla install?

Might look at this and see what modules are installed.

http://localhost/share/service/modules/deploy

sicknick
Champ on-the-rise
Champ on-the-rise
ESWBitto

Yes this is a pretty vanilla install, the only thing that I changed that's different from the "Easy" install method is I used "Advanced" and left out the Database and Sharepoint Plugin. I set up the database on a different server and it seems to be working fine that way.

When I ran http://mydomain.com:8080/share/service/modules/deploy I see that I have Alfresco Portlet Extension on the left site as an available module. Nothing is listed under modules deployed.

hgindl
Champ in-the-making
Champ in-the-making
what happens if you use the commandline to convert a doc to pdf? To do that

Put soffice.bin on your PATH


export PATH=/opt/alfresco/libreoffice/program:$PATH



then upload a document in your home and do


soffice.bin –headless –convert-to pdf test.doc

sicknick
Champ on-the-rise
Champ on-the-rise
This is a very good idea for troubleshooting. I downloaded a doc into the directory, I named it test.doc.

Then:

<blockcode>
[root@web home]# export PATH=/opt/alfresco/libreoffice/program:$PATH
[root@web home]# ls
lost+found  test.doc
[root@web home]# soffice.bin –headless –convert-to pdf test.doc
/opt/alfresco/libreoffice/program/.soffice.bin: error while loading shared libraries: libcups.so.2: cannot open shared object file: No such file or directory
</blockcode>

Any idea what this means? Out of curiosity I did a yum install libcups.so.2 but that didn't fix it. I did a reboot after the install was complete.



hgindl
Champ in-the-making
Champ in-the-making
i think you are missing some libraries needed for soffice, try to install them
http://docs.alfresco.com/4.2/topic/com.alfresco.enterprise.doc/concepts/install-lolibfiles.html

kind regards,
hannes

sicknick
Champ on-the-rise
Champ on-the-rise
I have good news and bad news, this resolved the error when you ran the soffice.bin command.

<blockcode>
Installing:
cups-libs                                   x86_64                               1:1.4.2-50.el6_4.5                               base                                  317 k
Installing for dependencies:
avahi-libs                                  x86_64                               0.6.25-12.el6                                    base                                   54 k
gnutls                                      x86_64                               2.8.5-13.el6_5                                   updates                               346 k
libjpeg-turbo                               x86_64                               1.2.1-3.el6_5                                    updates                               174 k
libtiff                                     x86_64                               3.9.4-10.el6_5                                   updates                               343 k
</blockcode>

<blockcode>
[root@web home]# export PATH=/opt/alfresco/libreoffice/program:$PATH
[root@web home]# ls
lost+found  test.doc
[root@web home]# soffice.bin –headless –convert-to pdf test.doc
convert /home/test.doc -> /home/test.pdf using writer_pdf_Export
[root@web home]# ls
lost+found  test.doc  test.pdf
</blockcode>

It worked! but…
When I log into Share I still receive <strong>"This document can't be previewed. Click here to download it."</strong>

I also still see this in my log when I start the server:
<blockcode>WARN  [org.alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.</blockcode>
.
.
.
<blockcode>14:28:35,250 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.complex.JodConverter.Image as sub transformers could not be found or created ("JodConverter.2Pdf|pdf|complex.PDF.Image").
14:28:35,250 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.complex.JodConverter.Pdf2swf as sub transformers could not be found or created ("JodConverter.2Pdf|pdf|Pdf2swf").
14:28:35,251 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.JodConverter.Html2Pdf as sub transformers could not be found or created ("JodConverter|odt|JodConverter").
14:28:35,251 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.JodConverter.2Pdf as sub transformers could not be found or created ("JodConverter|JodConverter.Html2Pdf").
14:28:35,251 ERROR [org.alfresco.repo.content.transform.TransformerConfigDynamicTransformers] Cannot create dynamic transformer transformer.complex.JodConverter.PdfBox as sub transformers could not be found or created ("JodConverter.2Pdf|pdf|PdfBox").
14:28:35,375 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Transformers' subsystem, ID: [Transformers, default] complete
</blockcode>
Any ideas on how I can test the connection between Share and OpenOffice?

I really appreciate the replies!

eswbitto
Confirmed Champ
Confirmed Champ
This might be worth a try…Download these add-ons.
http://addons.alfresco.com/addons/media-viewers
http://addons.alfresco.com/addons/wiki-rich-content

Place the jar files in /install/alfresco/tomcat/shared/lib

Restart your alfresco service.

Now go to http://localhost/share/service/modules/deploy

Here you will see modules that you can deploy. It will give you options for different viewers. I've personally deployed all EXCEPT the following.

PdfJs Viewer
MP3Player Viewer
MP3Player Configuration
FLVPlayer Viewer
Embed Viewer
WebODF Viewer
PdfJs Configuration
Prettify Viewer

This might help.