目录

1、导论

2、报错信息 

3、问题分析

4、解决方法

4.1、下载 

4.2、安装步骤



 

1、导论

今天进行项目部署时,遇到了一个问题。在启动kkfileview时,出现了报错异常:

2024-06-09 06:36:44.765 ERROR 1 --- [ main] cn.keking.service.OfficePluginManager : 启动office组件失败,请检查office组件是否可用

2、报错信息 


  _      _      ______   _   _         __      __  _
 | |    | |    |  ____| (_) | |        \ \    / / (_)
 | | __ | | __ | |__     _  | |   ___   \ \  / /   _    ___  __      __
 | |/ / | |/ / |  __|   | | | |  / _ \   \ \/ /   | |  / _ \ \ \ /\ / /
 |   <  |   <  | |      | | | | |  __/    \  /    | | |  __/  \ V  V /
 |_|\_\ |_|\_\ |_|      |_| |_|  \___|     \/     |_|  \___|   \_/\_/

 => Spring Boot ::  (v2.4.2)               QQ1 :: 613025121
 => kkFileView  ::  (v4.1.0-SNAPSHOT)      QQ2 :: 484680571
 => github      ::  https://github.com/kekingcn/kkFileView
 => gitee       ::  https://gitee.com/kekingcn/file-online-preview

2024-06-09 06:36:34.612  INFO 1 --- [           main] org.eclipse.jetty.util.log               : Logging initialized @3328ms to org.eclipse.jetty.util.log.Slf4jLog
2024-06-09 06:36:34.830  INFO 1 --- [           main] o.s.b.w.e.j.JettyServletWebServerFactory : Server initialized with port: 8012
2024-06-09 06:36:34.834  INFO 1 --- [           main] org.eclipse.jetty.server.Server          : jetty-9.4.35.v20201120; built: 2020-11-20T21:17:03.964Z; git: bdc54f03a5e0a7e280fab27f55c3c75ee8da89fb; jvm 1.8.0_251-b08
2024-06-09 06:36:34.866  INFO 1 --- [           main] o.e.j.s.h.ContextHandler.application     : Initializing Spring embedded WebApplicationContext
2024-06-09 06:36:34.866  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1514 ms
2024-06-09 06:36:35.032  INFO 1 --- [           main] org.eclipse.jetty.server.session         : DefaultSessionIdManager workerName=node0
2024-06-09 06:36:35.032  INFO 1 --- [           main] org.eclipse.jetty.server.session         : No SessionScavenger set, using defaults
2024-06-09 06:36:35.033  INFO 1 --- [           main] org.eclipse.jetty.server.session         : node0 Scavenging every 600000ms
2024-06-09 06:36:35.042  INFO 1 --- [           main] o.e.jetty.server.handler.ContextHandler  : Started o.s.b.w.e.j.JettyEmbeddedWebAppContext@74e52303{application,/,[file:///tmp/jetty-docbase.8012.3689503957133423006/],AVAILABLE}
2024-06-09 06:36:35.043  INFO 1 --- [           main] org.eclipse.jetty.server.Server          : Started @3762ms
2024-06-09 06:36:35.065  INFO 1 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : Autowired annotation is not supported on static methods: public static void cn.keking.config.ConfigConstants.setFileUploadDisable(java.lang.Boolean)
2024-06-09 06:36:35.230  INFO 1 --- [           main] cn.keking.service.FileConvertQueueTask   : 队列处理文件转换任务启动完成
2024-06-09 06:36:35.323  INFO 1 --- [           main] o.a.j.office.ProcessPoolOfficeManager    : ProcessManager implementation is LinuxProcessManager
2024-06-09 06:36:35.339  WARN 1 --- [ProcessThread-0] o.a.jodconverter.office.OfficeProcess    : profile dir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2001' already exists; deleting
2024-06-09 06:36:35.399  INFO 1 --- [ProcessThread-0] o.a.jodconverter.office.OfficeProcess    : starting process with acceptString 'socket,host=127.0.0.1,port=2001,tcpNoDelay=1' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2001'
2024-06-09 06:36:35.407  INFO 1 --- [ProcessThread-0] o.a.jodconverter.office.OfficeProcess    : started process; pid = 35
2024-06-09 06:36:38.709  WARN 1 --- [ProcessThread-0] o.a.j.office.ManagedOfficeProcess        : office process died with exit code 81; restarting it
2024-06-09 06:36:38.723  INFO 1 --- [ProcessThread-0] o.a.jodconverter.office.OfficeProcess    : starting process with acceptString 'socket,host=127.0.0.1,port=2001,tcpNoDelay=1' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2001'
2024-06-09 06:36:38.727  INFO 1 --- [ProcessThread-0] o.a.jodconverter.office.OfficeProcess    : started process; pid = 44
2024-06-09 06:36:41.395  INFO 1 --- [ProcessThread-0] o.a.j.office.OfficeConnection            : connected: 'socket,host=127.0.0.1,port=2001,tcpNoDelay=1'
2024-06-09 06:36:41.415  INFO 1 --- [ProcessThread-1] o.a.jodconverter.office.OfficeProcess    : starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2002'
2024-06-09 06:36:41.420  INFO 1 --- [ProcessThread-1] o.a.jodconverter.office.OfficeProcess    : started process; pid = 60
2024-06-09 06:36:44.697  WARN 1 --- [ProcessThread-1] o.a.j.office.ManagedOfficeProcess        : office process died with exit code 81; restarting it
2024-06-09 06:36:44.752  INFO 1 --- [ProcessThread-1] o.a.jodconverter.office.OfficeProcess    : starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2002'
2024-06-09 06:36:44.765 ERROR 1 --- [           main] cn.keking.service.OfficePluginManager    : 启动office组件失败,请检查office组件是否可用
2024-06-09 06:36:44.828  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'officeFilePreviewImpl' defined in URL [jar:file:/opt/kkFileView-4.1.0-SNAPSHOT/bin/kkFileView-4.1.0-SNAPSHOT.jar!/BOOT-INF/classes!/cn/keking/service/impl/OfficeFilePreviewImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'officeToPdfService' defined in URL [jar:file:/opt/kkFileView-4.1.0-SNAPSHOT/bin/kkFileView-4.1.0-SNAPSHOT.jar!/BOOT-INF/classes!/cn/keking/service/OfficeToPdfService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'officePluginManager': Invocation of init method failed; nested exception is org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
2024-06-09 06:36:45.078  INFO 1 --- [           main] org.eclipse.jetty.server.session         : node0 Stopped scavenging
2024-06-09 06:36:45.082  INFO 1 --- [           main] o.e.jetty.server.handler.ContextHandler  : Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@74e52303{application,/,[file:///tmp/jetty-docbase.8012.3689503957133423006/],STOPPED}
2024-06-09 06:36:45.110  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2024-06-09 06:36:45.199 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'officeFilePreviewImpl' defined in URL [jar:file:/opt/kkFileView-4.1.0-SNAPSHOT/bin/kkFileView-4.1.0-SNAPSHOT.jar!/BOOT-INF/classes!/cn/keking/service/impl/OfficeFilePreviewImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'officeToPdfService' defined in URL [jar:file:/opt/kkFileView-4.1.0-SNAPSHOT/bin/kkFileView-4.1.0-SNAPSHOT.jar!/BOOT-INF/classes!/cn/keking/service/OfficeToPdfService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'officePluginManager': Invocation of init method failed; nested exception is org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1206) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:923) ~[spring-context-5.3.3.jar!/:5.3.3]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588) ~[spring-context-5.3.3.jar!/:5.3.3]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.2.jar!/:2.4.2]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) ~[spring-boot-2.4.2.jar!/:2.4.2]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.4.2.jar!/:2.4.2]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) ~[spring-boot-2.4.2.jar!/:2.4.2]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) ~[spring-boot-2.4.2.jar!/:2.4.2]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:144) [spring-boot-2.4.2.jar!/:2.4.2]
        at cn.keking.ServerMain.main(ServerMain.java:27) [classes!/:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_251]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_251]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_251]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [kkFileView-4.1.0-SNAPSHOT.jar:na]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) [kkFileView-4.1.0-SNAPSHOT.jar:na]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [kkFileView-4.1.0-SNAPSHOT.jar:na]
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [kkFileView-4.1.0-SNAPSHOT.jar:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'officeToPdfService' defined in URL [jar:file:/opt/kkFileView-4.1.0-SNAPSHOT/bin/kkFileView-4.1.0-SNAPSHOT.jar!/BOOT-INF/classes!/cn/keking/service/OfficeToPdfService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'officePluginManager': Invocation of init method failed; nested exception is org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1206) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.3.jar!/:5.3.3]
        ... 27 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'officePluginManager': Invocation of init method failed; nested exception is org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:429) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1780) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:609) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.3.jar!/:5.3.3]
        ... 41 common frames omitted
Caused by: org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:58) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:96) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:56) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at cn.keking.service.OfficePluginManager.startOfficeManager(OfficePluginManager.java:76) ~[classes!/:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_251]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_251]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_251]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ~[spring-beans-5.3.3.jar!/:5.3.3]
        ... 54 common frames omitted
Caused by: java.util.concurrent.ExecutionException: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
        at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_251]
        at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[na:1.8.0_251]
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:56) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        ... 64 common frames omitted
Caused by: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:136) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access$000(ManagedOfficeProcess.java:25) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:52) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_251]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_251]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_251]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_251]
        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_251]
Caused by: java.lang.IllegalStateException: process with acceptString 'socket,host=127.0.0.1,port=2002' started but its pid could not be found
        at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:90) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess$6.attempt(ManagedOfficeProcess.java:127) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:34) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:24) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:134) ~[office-plugin-4.1.0-SNAPSHOT.jar!/:na]
        ... 7 common frames omitted

3、问题分析

通过阅读官方更新内容得知,KKFileView在4.0.0版本之后,将底层集成 OpenOffice 替换为了 LibreOffice,而 OpenOffice 本身在linux的安装盘中都会携带,不需要自行安装。

而此次更新将底层替换成了 LibreOffice,由于 linux 中没有,自然就会出现报错。kkFileView v4.0.0 发布,文件文档在线预览解决方案 - OSCHINA - 中文开源技术交流社区icon-default.png?t=N7T8https://www.oschina.net/news/149206/kkfileview-4-0-released

4、解决方法

4.1、下载 

既然没有 LibreOffice,那么下载一个即可,前往官方下载:Download LibreOffice | LibreOffice - Free Office Suite - Based on OpenOffice - Compatible with Microsofticon-default.png?t=N7T8https://www.libreoffice.org/download/download-libreoffice/

选择下载 “LibreOffice_7.6.7_Linux_x86-64_rpm.tar.gz” 

4.2、安装步骤

  • 上传:首先将安装包上传到 linux 服务器
  • 删除:在安装之前,先删除已经安装的 LibreOffice: yum remove libreoffice* 
  • 解压: tar -xvf LibreOffice_7.6.7_Linux_x86-64_rpm.tar.gz 
  • 安装: cd LibreOffice_7.6.7_Linux_x86-64_rpm/RPMS             yum localinstall *.rpm

 完成以上步骤后,重新启动KKFileView就可以看到运行成功了!

 

【博主推荐】

使用STS临时访问凭证通过客户端直连OSS对象存储服务器_oss sts yourrolesessionname-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/zzzzzhxxx/article/details/139377927?spm=1001.2014.3001.5501【Java多线程】面试常考 —— JUC(java.util.concurrent) 的常见类_java concurrent哪些类-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/zzzzzhxxx/article/details/136777947?spm=1001.2014.3001.5501【网络原理】TCP 协议中比较重要的一些特性(三)-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/zzzzzhxxx/article/details/136597348?spm=1001.2014.3001.5501

如果觉得作者写的不错,求给博主一个点赞支持一下,你们的支持是我更新的最大动力!

如果觉得作者写的不错,求给博主一个点赞支持一下,你们的支持是我更新的最大动力!

如果觉得作者写的不错,求给博主一个点赞支持一下,你们的支持是我更新的最大动力!

 

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐