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


How to Run A Project with Command Line Arguments in MonoDevelop

If you are writing a C# console application which involves of accepting user input from the command line parameter, the execution part will be slightly different in MonoDevelop. In Visual C++, you can access to the project’s /bin directory and just run the exe application with the parameter together using the command line. For example,

C:/Projects/testing/bin > sequence 6 

The procedures will be different in Monodevelop installed on Mac OS X because the exe application will not work on Mac OS X. Due to this reason, you need to use the custom parameter to run the application. Here are the steps:
1. In MonoDevelop, click on Run > Run With > Custom Parameters
2. Browse the folder (/bin directory > Release) that stores the sequence.exe file and the location will be generated for the Working Directory. For example,


3. For the ‘Arguments’ text box, you need to put the filename and the parameter which works as the input for the application. For example, sequence 6
4. Click the ‘Execute’ button and the output of the application will be displayed on the external command line window.

If you need more details about the configuration with the screenshots, you can refer to this page:  How to run a project with command line arguments (switches) after building in Monodevelop?


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.


Running TreeView in Mac

TreeView is a graphical tool that displays a tree view of an XML document which can handle invalid XML. The steps to use to TreeView in Mac is as following:-

1. Download the Xerces-J binaries from here: http://xml.apache.org/dist/xerces-j/

2. Unzip the binary file. (e.g. Xerces-J-bin.2.11.0.zip)

3. In the extracted directory, copy and paste the relevant jar files (xercesImpl.jar, xercesSamples.jar, xml-apis.jar) to the ext folder in JAVA installation directory

cd /Users/mychin/Documents/libraries/xerces-2_11_0

sudo cp x* /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext

4. Run the TreeView to view the XML file

Mins-MacBook-Pro:ext mychin$ java -cp xercesImpl.jar ui.TreeView /Users/mychin/Documents/workspace/WebServicesTutorial3/src/Patient2.xml