预览pdf失败
报错
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) [BUG28343311_10360181016.jar:1.11.0.0]
Caused by: java.lang.NullPointerException: null
at com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection.disconnect(AbstractOpenOfficeConnection.java:88) ~[na:na]
at com.wisedu.emap.util.OfficeUtil.convertByOpenOffice(OfficeUtil.java:96) ~[na:na]
at com.wisedu.emap.wqhtgl.service.impl.ContractServiceImpl.createPdfTempFile(ContractServiceImpl.java:203) ~[na:na]
at com.wisedu.emap.wqhtgl.service.impl.ContractServiceImpl$$FastClassBySpringCGLIB$$aba5c006.invoke(<generated>) ~[na:na]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[MethodProxy.class:na]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:700) ~[CglibAopProxy%24CglibMethodInvocation.class:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[ReflectiveMethodInvocation.class:na]
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) ~[MethodInvocationProceedingJoinPoint.class:na]
at com.wisedu.emap.bean.aop.ServiceCacheAop.execute(ServiceCacheAop.java:59) ~[na:na]
at sun.reflect.GeneratedMethodAccessor146.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) ~[AbstractAspectJAdvice.class:na]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) ~[AbstractAspectJAdvice.class:na]
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) ~[AspectJAroundAdvice.class:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[ReflectiveMethodInvocation.class:na]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) ~[ExposeInvocationInterceptor.class:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[ReflectiveMethodInvocation.class:na]
linux 查看进程
https://stackoverflow.com/questions/26884733/openoffice-convert-doc-to-pdf-with-java 这个是个参考信息
看这个原理好像是通过服务转换的,上面的这个是否是运行在WEB服务中的,如果是的话
首先使用上面的例子看命令行下是否可以,如果这个可以那就是运行用户权限之类的问题
如果不可以,首先解决命令行和UI下的正常运行问题