cancel
Showing results for 
Search instead for 
Did you mean: 

OpenOffice cannot find OpenOffice, but path correct.

sacco
Champ in-the-making
Champ in-the-making
I have never been able to get the new method of starting
OpenOffice to work, although I have fiddled with the
contents of  bootstrap/openoffice-startup-context.xml

No matter what I do,  the result is always something like:

03:02:22,398 User:System INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
03:02:23,101 User:System ERROR [util.exec.RuntimeExecBootstrapBean] Bootstrap command failed:
Execution result:
   os:         Linux
   command:    "/usr/lib/openoffice.org2.0/program/soffice" "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" "-env:UserInstallation=file:///%2Fopt/alfresco/2.1-b/oouser" -nologo -headless -nofirststartwizard -nocrashrep -norestore
   succeeded:  false
   exit code:  2
   out:
   err:        "/usr/lib/openoffice.org2.0/program/soffice": not found

However, /usr/lib/openoffice.org2.0/program/soffice certainly does exists, and in fact can be started (the old way) unsing exactly this patyh by an external script and will function with Alfresco.

Any ideas why Alfreso reports that it is anuable to find this existent path?

The current contents of my (ineffective) bootstrap/openoffice-startup-context.xml
is:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

   <bean id="openOfficeStartupBootstrap" class="org.alfresco.util.exec.RuntimeExecBootstrapBean" >
      <property name="startupCommands">
         <list>
            <ref bean="openOfficeStartupCommand" />
         </list>
      </property>
      <property name="failOnError">
         <value>false</value>
      </property>
   </bean>

   <bean id="openOfficeStartupCommand" class="org.alfresco.util.exec.RuntimeExec">
      <property name="commandMap">
          <map>
              <entry key=".*">
                  <value><![CDATA["/usr/lib/openoffice.org2.0/program/soffice" "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" "-env:UserInstallation=file:///%2Fopt/alfresco/2.1-b/oouser" -nologo -headless -nofirststartwizard -nocrashrep -norestore]]></value>
              </entry>
          </map>
      </property>
      <property name="waitForCompletion">
         <value>false</value>
      </property>
      <property name="errorCodes">
         <value>2</value>
      </property>
   </bean>

</beans>
4 REPLIES 4

saravanan
Champ in-the-making
Champ in-the-making
Hi,
Openoffice gets installed in Linux under /usr/lib/openoffice/program (depends on the linux distro.
openoffice-startup-context.xml is essential to bootstrap openoffice when the server is started.
The openoffice-startup-context.xml file should be modified to point to the correct location of the openoffice installation.

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
   <bean id="openOfficeStartupBootstrap" class="org.alfresco.util.exec.RuntimeExecBootstrapBean" >
      <property name="startupCommands">
         <list>

            <ref bean="openOfficeStartupCommand" />
         </list>
      </property>

      <property name="failOnError">
         <value>false</value>
      </property>

   </bean>
   <bean id="openOfficeStartupCommand" class="org.alfresco.util.exec.RuntimeExec">
      <property name="commandMap">
          <map>
              <entry key=".*">
                  <value><![CDATA[/usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" "-env:UserInstallation=file:///usr/lib/openoffice" -nologo -headless -nofirststartwizard -nocrashrep -norestore]]></value>

              </entry>
          </map>
      </property>

      <property name="waitForCompletion">
         <value>false</value>
      </property>

      <property name="errorCodes">
         <value>2</value>
      </property>

   </bean>

</beans>

Use the above xml code snippet and have a look into the log file.
A rule  to transform files to .pdf is a test for whether openoffice is running as a background process. The above code snippet has been tested under Linux.

Cheers

Saravanan Sellathurai

jbgreer
Champ in-the-making
Champ in-the-making
Hi,
Openoffice gets installed in Linux under /usr/lib/openoffice/program (depends on the linux distro.
openoffice-startup-context.xml is essential to bootstrap openoffice when the server is started.
The openoffice-startup-context.xml file should be modified to point to the correct location of the openoffice installation.

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
   <bean id="openOfficeStartupBootstrap" class="org.alfresco.util.exec.RuntimeExecBootstrapBean" >
      <property name="startupCommands">
         <list>

            <ref bean="openOfficeStartupCommand" />
         </list>
      </property>

      <property name="failOnError">
         <value>false</value>
      </property>

   </bean>
   <bean id="openOfficeStartupCommand" class="org.alfresco.util.exec.RuntimeExec">
      <property name="commandMap">
          <map>
              <entry key=".*">
                  <value><![CDATA[/usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" "-env:UserInstallation=file:///usr/lib/openoffice" -nologo -headless -nofirststartwizard -nocrashrep -norestore]]></value>

              </entry>
          </map>
      </property>

[/quote]

Like the original poster, I, too continue to receive a log message stating that Open Office is not able to be started.  To solve this problem I am starting Open Office outside of the Alfresco start process.

I believe that Alfresco has some sort of error in attempting to start Open Office.  My main evidence to support this is that if I take the Open Office Startup Command, i.e.


/usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" "-env:UserInstallation=file:///usr/lib/openoffice" -nologo -headless -nofirststartwizard -nocrashrep -norestore


and put it in a separate shell script and run it as the same user as Alfresco, it works perfectly fine. 

I don't know what you mean when you say that "[b]openoffice-startup-context.xml[/b] is essential to bootstrap openoffice when the server is started."  I think what you mean to say is that it is essential that Open Office be started as part of the Alfresco process. My own limited testing supports the notion that Alfresco will interoperate with a separately started Open Office instance correctly.

Kind regards,
Jim Greer

norgan
Champ in-the-making
Champ in-the-making
Hi Jim,
just to confirm your observation :
Hi,

Like the original poster, I, too continue to receive a log message stating that Open Office is not able to be started.  To solve this problem I am starting Open Office outside of the Alfresco start process.

I believe that Alfresco has some sort of error in attempting to start Open Office.  My main evidence to support this is that if I take the Open Office Startup Command, i.e.

We need to start the openoffice first and about 10 seconds later, we call up alfresco. Thats when all is fine and well 🙂

Regards, Norgan

gangadharjwala
Champ in-the-making
Champ in-the-making
hi all here i am not able to logged in to share dash board but i am able to logged in into alfresco.when i start the server i am getting below errors .

UserSmiley Frustratedystem ERROR [util.exec.RuntimeExecBootstrapBean] Bootstrap command failed:
Execution result:
   os:         Linux
   command:    "/usr/lib/openoffice.org2.0/program/soffice" "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" "-env:UserInstallation=file:///%2Fopt/alfresco/2.1-b/oouser" -nologo -headless -nofirststartwizard -nocrashrep -norestore
   succeeded:  false
   exit code:  2
   out:
   err:        "/usr/lib/openoffice.org2.0/program/soffice": not found

ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker] (ServerService Thread Pool – 73) ImageMagickContentTransformerWorker not available: 01010001 Failed to perform ImageMagick transformation:
Execution result:
   os:         Linux
   command:    ./ImageMagick/bin/convert /tmp/Alfresco/ImageMagickContentTransformerWorker_init_source_5706202593529567422.gif /tmp/Alfresco/ImageMagickContentTransformerWorker_init_target_6517030316904701978.png
   succeeded:  false
   exit code:  410
   out:
   err:        Cannot run program "./ImageMagick/bin/convert": error=2, No such file or directory.

ERROR [org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker] (ServerService Thread Pool – 73) Failed to start a runtime executable content transformer:
Execution result:
   os:         Linux
   command:    ./bin/pdf2swf -V
   succeeded:  false
   exit code:  1
   out:
   err:        Cannot run program "./bin/pdf2swf": error=2, No such file or directory.


some one is suggested to change the path of open office on bootstrap/openoffice-startup-context.xml file.
here i am using alfresco-enterprise-4.2 version…i am not seen this .xml file on Enterprise-4.2 can any one help me out where can i get this .xml file on 4.2Version. and how can i solve the issue.