Archive for the ‘OS X’ Category

Disk Warrior & damaged Journaling data

May 15, 2008

If an application on OS X has damaged the Journaling data, then when you try to run Disk Warrior, you may get this error:the new directory cannot replace the original directory due to a mac os services failure. You may be able to work around this problem by temporarily turning off Journaling via Disk Utility:

  1. Open Disk Utility
  2. Select the Volume of the drive
  3. Hold down the Option key on the keyboard
  4. Go to the File menu - select Disable Journaling

Now run Disk Warrior again. Afterwards, you can turn back journaling. I spend many hours trying to get Disk Warrior to rebuild my file-system and after many futile searches, I contacted the Disk Warrior Support, and they suggested this solution. The good news is that in my case it worked.

OS X 10.5, SyncServer takes 100% of CPU

May 6, 2008

For the past couple of days a process called SyncServer started every 15 minutes or so and it would take over a 100% of the CPU on my MacBook Pro. Not quite sure what initiated this problem, but I found the remedy discussed in this Apple support case to be useful and apparently effective (well at least so far). I did have .Mac and BlackJack synchronization, so not sure if either of these applications caused this problem or not.

Here is the command that you’ll need to run (broken into a set of cd commands to fit the width of this column).
$ cd /System/Library/Frameworks/
$ cd SyncServices.framework/Versions/
$ cd A/Resources/
$ ./resetsync.pl full

How to change the default version of JDK on the Mac

May 4, 2008


Mac Java Preferences
On the Mac, there is an application called Java Preferences. You can use the Spotlight to find it. Launch the Java Preferences and in the Java Application Runtime Settings panel, drag the version of the JDK that you wish to use to the top. Save and restart any terminal applications that you may have had opened and you should be set.

How to get the set of open files/ports for a process

October 26, 2007

Every once in a while I need to know the set of files/ports that a process on OS X has opened. I have been using the Activity Monitor for a while but was unaware that this tool also provided this kind of information. In Activity Monitor, just select the process of interest and then click on the Inspect button, and then on the Open Files and Ports button. Here is a screen-cast to show you how.

Eclipse and Perforce plug-in

October 23, 2007

This morning, eclipse refused to start again on my Mac laptop. The following lines were in the .metadata/.log file:


!SUBENTRY 1 org.eclipse.ui.workbench 2 0 2007-10-23 14:50:10.999
!MESSAGE Conflict for 'com.perforce.team.ui.actions.unlock':
HandlerActivation(commandId=com.perforce.team.ui.actions.unlock,
handler=ActionDelegateHandlerProxy(null,com.perforce.team.ui.actions.UnlockAction),
expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@b0f929),sourcePriority=16384)
HandlerActivation(commandId=com.perforce.team.ui.actions.unlock,
handler=ActionDelegateHandlerProxy(null,com.perforce.team.ui.actions.UnlockAction),
expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@b0f929),sourcePriority=16384)

Deleting the .metadata/.lock file fixed the problem. I’m not sure what caused this problem, but deleting the .lock file did fix it.

Eclipse startup problem again

September 17, 2007

Yesterday I ran the MAC OS X Disk Utility program and Repaired the Permissions and the Disk. This morning Eclipse wont start. I get this error (~/your-workspace/.metadata/.log):


!ENTRY org.eclipse.osgi 2 0 2007-08-28 14:57:04.550
!MESSAGE While loading class "org.eclipse.mylyn.internal.tasks.ui.ITaskHighlighter",
     thread "Thread[Worker-1,5,main]” timed out waiting (5000ms) for thread
     “Thread[Worker-3,5,main]” to finish starting bundle
     “update@plugins/org.eclipse.mylyn.tasks.ui_2.0.0.v20070627-1400.jar [125]“.
     To avoid deadlock, thread “Thread[Worker-1,5,main]” is proceeding but
     “org.eclipse.mylyn.internal.tasks.ui.ITaskHighlighter” may not be fully initialized.
!STACK 0 org.osgi.framework.BundleException: State change in progress for bundle
     “update@plugins/org.eclipse.mylyn.tasks.ui_2.0.0.v20070627-1400.jar” by thread “Worker-3″.

There may be an easier way to fix this problem short of a re-download and re-install of eclipse and all of the plugins that you use. Re-install of eclipse and all of its plugins is the options that I took (Perforce, Tomcat, Mylyn, Subclipse/Mylyn integration and Subversion plugins). The Subversion plugin, however, wont install. It complains about missing Mylar integration component. I’ve installed Mylyn integration component (Mylyn is the new name for Mylar). There must be a more recent version of Subversion….

Eclipse startup problem

July 19, 2007

This morning I fired up eclipse on OS X, and it just disappeared after I selected my workspace. Searching the workspace log file in your-workspace/.metadata/.log showed the following error:


!ENTRY org.eclipse.team.core 4 0 2007-07-19 09:51:03.988
!MESSAGE Could not instantiate provider com.perforce.team.core.PerforceTeamProvider
for project your-project.
!STACK 1

The only way out was to delete the .metadata folder and start eclipse again. Of course, once you’ve done this you’ll need to import your projects again. I’m not sure what has caused the perforce plugin for eclipse to fail, but it is really annoying that a failed attempt to instantiate the perforce plugin brings down the entire eclipse.

Eclipse Java builds on OS X

July 17, 2007

I fired up eclipse on OS X today and much to my surprise the project I’m working on failed to build by eclipse 3.2. In the Problems view, I saw this error:


Project XXX is missing the required library:
     '/System/Library/Java/Extensions/QTJSupport.jar'

I’m not sure what this library is supposed to do and why all of sudden is missing. Here is how you can fix this problem:

  1. Upgrade to eclipse 3.3
  2. Open the eclipse Preferences... menu and select Java > Installed JREs...; make sure that eclipse can locate the OS X Java 1.5. If it cannot (as was in my case), you manually add it. It is in the following folder:
    
    /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
    
  3. Now open the project properties, and make sure that the QTJSupport.jar is no longer referenced in Java Build Path > Libraries > JRE System Libraries. If it is, you’ll need to remove the JRE System Library and add it again.

How to copy & playback DVDs on OS X

July 4, 2007

Xilisoft DVD CopyToday I tried to copy a DVD that I own to a network drive so that I could watch the movie from any computer on my home network. After a number of false starts and paths that lead to no where, I managed to find a solution that works:

To copy the DVD, you need a DVD copy application that can decrypt the DVD. I found Xilisoft DVD Copy does a good job (it is however not free: $49). The copy creates a folder for the movie and two sub folders: AUDIO_TS and VIDEO_TS. You can try the DVD Copy for free but it compresses the video and you’ll lose quality (although it looked pretty good). To get the full quality you’ve to buy it.

Once you’ve copied the DVD, I tried playing the copy using Apple DVD Player. This player refuses to play, giving the following error:

There was a problem opening the media.

After some more Google searching, I found a free player (VLC) that works pretty well (the DVD menu, audio selection, chapter selection and a lot more).

Updating Ruby & Rails on OS X

May 28, 2007

The 10.4.9 version of OS X includes ruby 1.8.1-1, and readline 5.0. The latest version of ruby is 1.8.6. You can follow the excellent instructions on maconrails.com I had to make a few minor adjustments to get it to work on my system.

  1. Install xcode for C development. At least you’ll need to install these packages: gcc4.0.pkg, DevSDK.pkg, BSDSDK.pkg, and X11SDK.pkg
  2. The readline that is included in OS X is recent enough.
  3. Create .bash_profile file and modify the PATH environment variable.

    export
    PATH="/usr/local/bin:/usr/local/mysql/bin:/usr/local/sbin:$PATH"
  4. Get the latest version of Ruby and Gem. Copy their folders into /usr/local/src. Now build & install it on your system:

    $ cd /usr/local/src/ruby-1.8.6
    $ source ~/.bash_profile
    $ ./configure –prefix=/usr/local –enable-pthread
    $ make
    $ sudo make install
    $ sudo make install-doc
    $ cd ../rubygems-0.9.4
    $ sudo ruby setup.rb
    $ sudo gem update –system
    $ sudo gem install rails –include-dependencies