Page 2 of 2

Re: Cannot get LibreOffice document preview to work

PostPosted:Sun Dec 23, 2012 12:21 pm
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 11813 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 11813 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.

Re: Cannot get LibreOffice document preview to work

PostPosted:Sun Dec 23, 2012 6:13 pm
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.

Re: Cannot get LibreOffice document preview to work

PostPosted:Mon Dec 24, 2012 5:17 pm
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 )).

Re: Cannot get LibreOffice document preview to work

PostPosted:Mon Dec 24, 2012 6:23 pm
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?

Re: Cannot get LibreOffice document preview to work

PostPosted:Thu Dec 27, 2012 10:08 am
by jllort
Error in administrations stats ?

Re: Cannot get LibreOffice document preview to work

PostPosted:Thu Dec 27, 2012 12:42 pm
by mahyar
yes, and I have installed on two different computers, both Ubuntu 12.04 and got exactly the same errors.

Re: Cannot get LibreOffice document preview to work

PostPosted:Sat Dec 29, 2012 11:23 am
by jllort
The problem could be on sigar library. Can you see if setenv.sh is correctly ( look for path to sigar )

Re: Cannot get LibreOffice document preview to work

PostPosted:Sat Dec 29, 2012 12:37 pm
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!

Re: Cannot get LibreOffice document preview to work

PostPosted:Mon Dec 31, 2012 10:15 am
by pavila
The file setenv.sh is for Linux and If you are using Windows you need to use the setenv.bat file.

Re: Cannot get LibreOffice document preview to work

PostPosted:Tue Jan 01, 2013 10:06 am
by mahyar
There must have been some misunderstanding. The reply has nothing to do with the question(s) mentioned above. Have I missed something here?

Re: Cannot get LibreOffice document preview to work

PostPosted:Wed Jan 02, 2013 7:21 pm
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.

Re: Cannot get LibreOffice document preview to work

PostPosted:Wed Jan 02, 2013 10:04 pm
by mahyar
thanks jllort , I will do after another test with everything freshly installed.

Re: Cannot get LibreOffice document preview to work

PostPosted:Fri Jan 04, 2013 12:40 pm
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.

Re: Cannot get LibreOffice document preview to work

PostPosted:Sun Jan 06, 2013 5:52 pm
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.

Re: Cannot get LibreOffice document preview to work

PostPosted:Tue May 28, 2013 6:05 pm
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?