Restore Windows Bug in LibreOffice & OpenOffice

I experienced the restore windows bug for several times when I try to open the Open Office or LibreOffice. Usually, my workaround is to remove the existing application and install the new one. I guess the root cause of the problem is I didn’t close each application separately before shutting down my laptop and causing this bug keeps occurring in my application.

When I try to open the application, this window will prompt out:

Restore Windows Bug
Neither “Don’t Restore Windows” button nor “Restore Windows” button is working. I cannot use the application to create new documents or view any documents properly. I tried to kill the process via Activity Monitor and it won’t solve the problem as it reappears again when I open the application next time.

Recently, I found the workaround to fix the problem. In Mac, search for the Terminal application and run this command to remove the savedState file:

rm -fr ~/Library/Saved\ Application\ State/org.libreoffice.script.savedState/

Bug reference:

Bug 39007 – Persistent “Restore Windows” dialog won’t disappear, disables key functionality


Installation of WebLogic & Eclipse Integration on Mac OS X

  1. Download Oracle Enterprise Pack for Eclipse (Mac OS X 64-bit) from: Oracle Enterprise Pack for Eclipse (
  2. Download Oracle WebLogic Server 11gR1 (10.3.3) ZIP distribution for Mac OS X from: Oracle WebLogic Server Installers  (Extracted the file under /Users/mychin/weblogic)


Backend Part

  1. Ensure you have set your JAVA_HOME.
  2. Set the WebLogic directory to a variable on the terminal:
    export MW_HOME=/Users/mychin/weblogic
  3.  Under your installation directory or extracted folder from the installation zip, execute the script with this command: ./configure.sh
  4. You will see the message “BUILD SUCCESSFUL” if the weblogic has been installed successfully.


Eclipse Part

  1. Add new Server by right click the space under Server tab. If you can’t see the Server tab, you can click Window > Show View > Server.
  2. Choose Oracle > Oracle WebLogic Server 211gR1 (10.3.3)
  3. Define the WebLogic Runtime:
    Name: Oracle WebLogic Server 11gR1 (10.3.3)
    WebLogic home: /Users/mychin/weblogic/wlserver
    Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
  4. Specify a WebLogic Domain Directory by clicking the ‘Create Domain’ icon that appears beside of the text box.
  5. For the first time user, choose ‘Launch Domain Configuration Wizard‘ icon that appears beside the text box.
  6. The configuration wizard will popup and do the settings as following:
    • Create a new WebLogic domain
    • Choose the option: Generate a domain configured automatically to support the following products: (tick the checkbox for JAX-WS Extension –
    • Domain name: weblogic
      Domain location: (auto-generated)
    • Next > Configure Administrator User Name and Password
      User Password:
    • Next, choose Development Mode
    • Optional Configuration: (I have chosen Administration Server and it leads to the next screen
    • Configure the Administration Server
      Name: AdminServer(default)
      Listen address: localhost
      Listen port: 7001 (default)
  7. Then, click the ‘Create’ button to create the domain.
  8. After the domain has been created successfully, you can choose the name that you have given for the domain and the location will be auto populate for you.
  9. Finally, click ‘Finish’.

Eclipse Failed to Launch on Mac OSX: “No application id has been found”

I tried to startup my existing Eclipse and it doesn’t work with the error message: “An error has occurred. See the log file /Applications/eclipse/configuration/1344483936178.log”.

So, I tried to remove the existing Eclipse installation folder and re-install a new Eclipse but the problem still occurs. I did some google work and found this site that provides the workaround which worth to give it a try:
Eclipse on macosx: org.osgi.service.application.ApplicationException: No application id has been found

The directed log file contains the following stacktrace:

!ENTRY org.eclipse.equinox.p2.core 4 0 2012-08-09 13:44:21.828

!MESSAGE Provisioning exception


org.eclipse.equinox.p2.core.ProvisionException: Unknown repository type at file:
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.

!ENTRY org.eclipse.osgi 4 0 2012-08-09 13:44:22.863

!MESSAGE Application error


org.osgi.service.application.ApplicationException: No application id has been found.

at org.eclipse.equinox.internal.app.EclipseAppContainer.
at org.eclipse.equinox.internal.app.MainApplicationLauncher.


Here are the steps that I have done to resolve the problem:

  1. Remove the following files (My id is 1 instead of 9):
    • /Application/eclipse/configuration/org.eclipse.core.runtime/.extraData.1
    • /Application/eclipse/configuration/org.eclipse.core.runtime/.mainData.1
  2. Find the location of xercesImp.jar via the terminal:
    mychin$ locate xercesImpl.jar
  3. Move the xercesImpl.jar to the /tmp folder:
    mychin$ mv /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/xercesImpl.jar /tmp

Relaunch the Eclipse and now it works well.


Find Location of JAVA_HOME in Mac OS X

Few days ago,  when I was trying to setup the Atlassian SDK plugin, I need to find the location of JAVA_HOME in my laptop. I knew how to do it in Ubuntu but I’m not too sure how to do it in Mac OS X. After doing some research, this is the command to find the location of JAVA_HOME in Mac OS X:


And the output will be as following (including the command):

$ /usr/libexec/java_home


I still have a lot to learn as a Mac newbie ;)


Display Hidden Files in Mac OS X

Initially, it seems hidden files are not shown in Mac OS X. This blog is really good as a reference: http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/. I found this command is useful for me to show the hidden files in Mac OS X:

defaults write com.apple.finder AppleShowAllFiles TRUE

And if I want to hide the hidden files, just set it back to false:

defaults write com.apple.finder AppleShowAllFiles FALSE