• Cannot get LibreOffice document preview to work

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #20003  by mahyar
 
first of all, there are some warnings like this
Code: Select all
2012-12-23 12:57:20,311 [pool-2-thread-1] WARN  com.openkm.d.m - Extractor class not found: com.openkm.extractor.PdfTextExtractor
2012-12-23 12:57:20,312 [pool-2-thread-1] WARN  com.openkm.d.m - Extractor class not found: com.openkm.extractor.AudioTextExtractor
2012-12-23 12:57:20,313 [pool-2-thread-1] WARN  com.openkm.d.m - Extractor class not found: com.openkm.extractor.ExifTextExtractor
2012-12-23 12:57:20,313 [pool-2-thread-1] WARN  com.openkm.d.m - Extractor class not found: com.openkm.extractor.CuneiformTextExtractor
2012-12-23 12:57:20,314 [pool-2-thread-1] WARN  com.openkm.d.m - Extractor class not found: com.openkm.extractor.SourceCodeTextExtractor
2012-12-23 12:57:20,315 [pool-2-thread-1] WARN  com.openkm.d.m - Extractor class not found: com.openkm.extractor.MsOffice2007TextExtractor
and then there is this warning about a starting and connecting to office or jodconverter :
Code: Select all
2012-12-23 12:57:20,939 [pool-2-thread-1] INFO  com.openkm.util.i - *** Build Office Manager ***
2012-12-23 12:57:20,939 [pool-2-thread-1] INFO  com.openkm.util.i - system.openoffice.path=/usr/lib/libreoffice
2012-12-23 12:57:20,939 [pool-2-thread-1] INFO  com.openkm.util.i - system.openoffice.tasks=200
2012-12-23 12:57:20,940 [pool-2-thread-1] INFO  com.openkm.util.i - system.openoffice.port=2002
2012-12-23 12:57:20,988 [pool-2-thread-1] INFO  org.artofsolving.jodconverter.office.ProcessPoolOfficeManager - ProcessManager implementation is SigarProcessManager
2012-12-23 12:57:21,013 [pool-2-thread-1] WARN  com.openkm.servlet.RepositoryStartupServlet - failed to start and connect
org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:64)
	at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:101)
then, i get this error message, when i go to adminstration --> Stats
Code: Select all
2012-12-23 12:58:29,672 [http-bio-0.0.0.0-8080-exec-6] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM].[jsp] - Servlet.service() for servlet [jsp] in context with path [/OpenKM] threw exception [Unable to compile class for JSP: 

An error occurred at line: 17 in the generated java file
Only a type can be imported. com.openkm.extractor.TextExtractorWork resolves to a package
(....)
An error occurred at line: 17 in the generated java file
Only a type can be imported. com.openkm.extractor.TextExtractorWork resolves to a package

An error occurred at line: 18 in the generated java file
Only a type can be imported. com.openkm.extractor.TextExtractorWorker resolves to a package

Stacktrace:
	at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
	at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
	at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469)
snapshot6.jpeg
snapshot6.jpeg (172.33 KiB) Viewed 11806 times
and this one, on administration --> Scripting
Code: Select all
2012-12-23 12:58:41,102 [http-bio-0.0.0.0-8080-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM].[jsp] - Servlet.service() for servlet [jsp] in context with path [/OpenKM] threw exception [Unable to compile class for JSP: 

An error occurred at line: 15 in the generated java file
Only a type can be imported. com.openkm.util.UserActivity resolves to a package

An error occurred at line: 82 in the jsp file: /admin/scripting.jsp
UserActivity cannot be resolved
79: 				IOUtils.closeQuietly(fis);
80: 			} else {
snapshot5.jpeg
snapshot5.jpeg (137.21 KiB) Viewed 11806 times
and this one, when trying to preview or download an office document as pdf
Code: Select all
2012-12-23 12:59:25,950 [http-bio-0.0.0.0-8080-exec-5] ERROR com.openkm.servlet.frontend.ConverterServlet - Error in application/vnd.oasis.opendocument.spreadsheet to PDF conversion
com.openkm.core.c: Error in application/vnd.oasis.opendocument.spreadsheet to PDF conversion
	at com.openkm.util.i.b(Unknown Source)
	at com.openkm.servlet.frontend.ConverterServlet.b(Unknown Source)
	at com.openkm.servlet.frontend.ConverterServlet.c(Unknown Source)
of course I have copied just a small part of each group of messages from log file and the complete log is attached too.
Just to clarify, I have installed all the relevant softwares.

Thanks for your help in advanced.
Attachments
(17.97 KiB) Downloaded 823 times
 #20005  by mahyar
 
Oh forgot to say, since I have installed it using the wizard, I have still not installed java separately. Anyway all these errors did appear with my last installation with java installed on my machine.
 #20011  by jllort
 
Seems soffice service is not starting correctly.
Code: Select all
2012-12-23 12:57:20,988 [pool-2-thread-1] INFO  org.artofsolving.jodconverter.office.ProcessPoolOfficeManager - ProcessManager implementation is SigarProcessManager
2012-12-23 12:57:21,013 [pool-2-thread-1] WARN  com.openkm.servlet.RepositoryStartupServlet - failed to start and connect
org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
   at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:64)
   at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:101)
Should concentrate on it. Which is your OS and which your libreoffice configuration path ( when you click on test configuration parameters in administration -> all goes right ( test action is at top right table icon )).
 #20015  by mahyar
 
I have already tested and path is OK.
It's an Ubuntu 12.04 LTS Server (virtual machine). Libreoffice is the latest version installed from repository and according to this post http://forum.openkm.com/viewtopic.php?f=4&t=8329#p18990
so there should hardly be any library or packages left uninstalled. Strange thing is that the community version works fine, but not the professional one. I assume there is some difference in the way the two versions start the office service.
Anyway, could the error with stats and scripting be relevant to starting office?
 #20056  by mahyar
 
setenv.sh is pointing to catalina.home/lib/sigar and as far as I know, it is the right path.
Code: Select all
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib/sigar
As I mentioned before, the problem looks like to be with the files in this path, as there is just these two dll files there : sigar-amd64-winnt.dll and sigar-x86-winnt.dll

There is a sigar-1.6.5.132.jar file in /webapps/OpenKM/Web-INF/lib and I will try (completely blindfolded) to copy it in the address mentioned above to see if it works!

I have recently tested under windows 7 and it works (except the problem with stat and scripting as said before, besides the port must be 8100 not 2002!).

If there should be any other files for sigar or in any other addresses, please let me know.

Thanks!
 #20564  by jllort
 
I suggest you start new post because this is so long and seems in you server community version soffice starts correctly but no trial version.
 #20589  by mahyar
 
Hi all,

well, I have solved the problem. As I speculated before, there were some files missing. I installed the community version once more and noticed that there are two libsigar**.so files in /tomcat/lib, which are not present in trial version. I copied these two files in 6.2.4-trial version and preview works now.

I assume that this deletion has been just an accident and does not happen in purchased versions.

By the way, thanks for the help.
 #20607  by jllort
 
That's mahyar to indentify the problem. We got some problem with svn repository when uploading .so files ( and althought I solved for java libraries I forget these libraries). Apologies for it. I will rebuild the trial, thanks.
 #23239  by pavila
 
The Trial includes a JDK and I don't think you need the JDK also installed in the computer, but in this case maybe a problem with the included JDK.

This problem is in a Ubuntu 32 bits or 64 bits?

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.