使用开放办公 API 生成报告时出现 BootstrapException

发布于 2024-11-02 20:30:09 字数 10022 浏览 0 评论 0原文

我已经使用开放办公 API 生成报告,报告在窗口中工作正常,但在 Linux 中它将生成

 java.lang.Exception: com.sun.star.comp.helper.BootstrapException
2011-04-21 14:21:27,919 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.docpopulate.util.DocumentWriter.createDoc(DocumentWriter.java:82)
2011-04-21 14:21:27,919 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.docpopulate.util.DocumentWriter.populateTemplateData(DocumentWriter.java:526)
2011-04-21 14:21:27,919 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.reports.CRMReportServlet.getReportDataBytes(CRMReportServlet.java:111)
2011-04-21 14:21:27,919 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.reports.CRMReportServlet.doWebAction(CRMReportServlet.java:34)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.base.BaseWsServelt.doGet(BaseWsServelt.java:34)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at java.lang.Thread.run(Thread.java:619)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2) Caused by: com.sun.star.comp.helper.BootstrapException
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   at ooo.connector.BootstrapConnector.connect(BootstrapConnector.java:129)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   at ooo.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.java:68)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   at ooo.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.java:45)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.docpopulate.util.DocumentWriter.createDoc(DocumentWriter.java:74)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   ... 26 more
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2) java.io.FileNotFoundException:  (No such file or directory)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at java.io.FileInputStream.open(Native Method)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at java.io.FileInputStream.<init>(FileInputStream.java:106)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.docpopulate.util.Utility.getBytesFromFile(Utility.java:35)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.reports.CRMReportServlet.getReportDataBytes(CRMReportServlet.java:114)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.reports.CRMReportServlet.doWebAction(CRMReportServlet.java:34)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.base.BaseWsServelt.doGet(BaseWsServelt.java:34)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at java.lang.Thread.run(Thread.java:619)

如下错误,我添加 OOo 配置代码

if(context == null) { 尝试 {

            List oooOptions = OOoServer.getDefaultOOoOptions();
            oooOptions.add("-nofirststartwizard");
            OOoServer oooServer = new OOoServer(commonBundle.getString("OPEN_OFFICE_PATH"), oooOptions);

            // Connect to OOo
            BootstrapSocketConnector bootstrapSocketConnector = new BootstrapSocketConnector(oooServer);
            context = bootstrapSocketConnector.connect();


            //DocumentPopulateConfig
            //context = BootstrapSocketConnector.bootstrap(commonBundle.getString("OPEN_OFFICE_PATH"));
        }
        catch (BootstrapException e)
        {
            throw new java.lang.Exception(e);
        } 
    } 

I have generate report using open office API, Report work fine in window but in Linux it will generate error like

 java.lang.Exception: com.sun.star.comp.helper.BootstrapException
2011-04-21 14:21:27,919 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.docpopulate.util.DocumentWriter.createDoc(DocumentWriter.java:82)
2011-04-21 14:21:27,919 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.docpopulate.util.DocumentWriter.populateTemplateData(DocumentWriter.java:526)
2011-04-21 14:21:27,919 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.reports.CRMReportServlet.getReportDataBytes(CRMReportServlet.java:111)
2011-04-21 14:21:27,919 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.reports.CRMReportServlet.doWebAction(CRMReportServlet.java:34)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.base.BaseWsServelt.doGet(BaseWsServelt.java:34)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
2011-04-21 14:21:27,920 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
2011-04-21 14:21:27,921 ERROR [STDERR] (http-0.0.0.0-20150-2)   at java.lang.Thread.run(Thread.java:619)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2) Caused by: com.sun.star.comp.helper.BootstrapException
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   at ooo.connector.BootstrapConnector.connect(BootstrapConnector.java:129)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   at ooo.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.java:68)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   at ooo.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.java:45)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.docpopulate.util.DocumentWriter.createDoc(DocumentWriter.java:74)
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2)   ... 26 more
2011-04-21 14:21:27,922 ERROR [STDERR] (http-0.0.0.0-20150-2) java.io.FileNotFoundException:  (No such file or directory)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at java.io.FileInputStream.open(Native Method)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at java.io.FileInputStream.<init>(FileInputStream.java:106)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.docpopulate.util.Utility.getBytesFromFile(Utility.java:35)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.reports.CRMReportServlet.getReportDataBytes(CRMReportServlet.java:114)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.reports.CRMReportServlet.doWebAction(CRMReportServlet.java:34)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at com.cc.crm.web.base.BaseWsServelt.doGet(BaseWsServelt.java:34)
2011-04-21 14:21:27,923 ERROR [STDERR] (http-0.0.0.0-20150-2)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
2011-04-21 14:21:27,924 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
2011-04-21 14:21:27,925 ERROR [STDERR] (http-0.0.0.0-20150-2)   at java.lang.Thread.run(Thread.java:619)

Below i add OOo configuration code

if(context == null)
{
try
{

            List oooOptions = OOoServer.getDefaultOOoOptions();
            oooOptions.add("-nofirststartwizard");
            OOoServer oooServer = new OOoServer(commonBundle.getString("OPEN_OFFICE_PATH"), oooOptions);

            // Connect to OOo
            BootstrapSocketConnector bootstrapSocketConnector = new BootstrapSocketConnector(oooServer);
            context = bootstrapSocketConnector.connect();


            //DocumentPopulateConfig
            //context = BootstrapSocketConnector.bootstrap(commonBundle.getString("OPEN_OFFICE_PATH"));
        }
        catch (BootstrapException e)
        {
            throw new java.lang.Exception(e);
        } 
    } 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦初启 2024-11-09 20:30:09

我认为问题出在 Open Office 的配置方式上。当使用(我猜)从某些配置文件获取的连接参数连接到 OOo 服务器时,似乎会发生此异常。

I think that the problem is in the way Open Office is configured. This exception appears to occur when connecting to your OOo server using connection parameters taken (I guess) from some config file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文