ATO CSI Client on Apple Snow Leopard -OS X 10.6


The other day I upgraded to 10.6. Ok so I'm slow in doing so but I have software that I knew would break so I've been putting it off.
One thing I wasn't expecting to break was my Australian Taxation Office (ATO) CSI and ECI Clients. This software graciously helps me feed the ATO large sums of money for the government to waste :-). There is a web portal now I understand but I'll stick to the Java client for the moment.

So the problem is the ATO don't appear to have figured out a few things about Macs leaving us to sort them out. *If* the ATO have solved this I haven't seen the solution so please (after reading my prerequisites) let me know :-)
At some point I assume the ATO will fix it and these instructions will no-longer be relevant, except as a pleasant memory of several wasted hours and learning things I didn't otherwise need to know.

My Prerequisites

My Prerequesities for this solution include not installing Rosetta.
So if you don't care just install Rosetta and follow the other fiddly bits you may find on the internet to actually get it working. Or else dear reader continue on...

The Problem

Running the CSI utilities or ECI Client after installing OS X 10.6 results in a system complaint that it needs to install Rosetta.
You do not need Rosetta.
I've nothing against Rosetta per-se but the bottom line is, it's silly that a Java application should require Rosetta to run PowerPC code on an Intel processor. It's not like Apple only just released the x86 architecture...

If I were cynical I would suspect the ATO is trying to get everyone to use the web application and kill off the Java client because they can't be bothered maintaing it. That's the only reason I can think for them failing to perform a basic fix for so long.

Long-winded problem explanation for the terminally curious

The CSI and ECI utilities are cross-platform Java applications. However the operating system doesn't inherently know how to run programs that are not native executables. Java applications are by nature in a platform neutral format and are run by the native java engine. So you port the java engine to your platform once and then it can run all java programs. (I'm glossing over a bit here but nothing major).

So to run a java application like CSI or ECI we need a small native starter application (run when you double click on it etc) that says "hey this is a java app, run the java engine and have it load the java app.

Apple provide a standard utility to do this, the JavaApplicationStub.
The JavaApplicationStub native executable reads an Info.plist file containing the name of the java application (main class) and starts java and passes it the relevant details. And off we go.
In a simple, but perhaps in the circumstances less than perfect, design decision the JavaApplicationStub looks like it needs to be packaged with each application. It's simple, works and should not be a big deal but...

Years ago there only existed PowerPC processors. Then apple changed to Intel.

The ATO supplies a JavaApplicationStub written for the PowerPC.
PowerPC code doesn't run on the Intel except via Apple's clever Virtual Machine (Rosetta) that translates PowerPC processor instructions into their Intel equivalent. Rosetta is (I think) deprecated and will eventually be unavailable.

The solution is for ATO to simply provide the latest JavaApplicationStub which contains three native formats PPC, Intel x86 (32 bit) and Intel x86 (64 bit).
However they don't appear to have done this so we need to do it for them.

In addition there seems to be a second unrelated problem of where the csi.jar file (containing the csi application) is actually found by java. I didn't end up trying to work out why this wasn't installed automatically. The csi.jar file is used by several applications (CSI utilities, ECI client) so it needs to be in a place where they can all find it.


These steps worked for me, YMMV. I need to provide a disclaimer because this relates to business/tax/accounts data and we live in a litigious society where people sue McDonalds for failing to provide a warning that your coffee will be hot. So:
Disclaimer. If you break your machine doing this, if your goldfish dies, if you get a flat tyre etc don't blame me. Your machine, your decision, your responsibility.

Step 1 - Download the latest CSI installer.

I got it here: (external link) and at the time I looked it was version 3.1.

I don't know if this and the next step are required (because I did them before checking properly) but I'll tell you what I actually did.
The main thing you need is a file called csi.jar. This is available in the latest CSI installer where it lived in the old install I'm not sure.

Step 2 - (Optional?) Install the CSI.

  • Just run the normal apple install process.
  • Leave the CSI Installer disk image mounted once you've finished (ie don't eject it yet)

If you have a previous version installed it just installs over the top. Based on the file contents I tend to suspect this step may not be needed at least for version 3.1 A later version may actually do what we will be doing below and then the whole problem will go away.
Note your certificates etc are all safe. It won't trash them.
For the record it just overwrites /Applications/CSI/*. Your certificates are in your home directory : ~/.csi (or $HOME/.csi same place)
To see them:
find ~/.csi

Step 3 - Update the JavaApplicationStub

There are three applications that need to be updated in the same way
  • I chose to make a copy of the existing stub "just in case...". Wise but not strictly necessary unless something bad goes wrong :-)
  • Perform the following steps in Terminal.
  • If you get a permission denied error on the mv or cp commands place 'sudo' before them.
Eg sudo mv ..., sudo cp ...
It will only ask you for your password the first time (or every 5 minutes or so).
  • Note the period (.) at the end of the CoPy command. You need to include that.

3.1 CSI Help

cd "/Applications/CSI/CSI"
mv JavaApplicationStub JavaApplicationStub.OLD
cp /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub .

3.2 CSI Management

cd "/Applications/CSI/CSI Management"
mv JavaApplicationStub JavaApplicationStub.OLD
cp /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub .

3.3 ECI Application

cd "/Applications/ECI Client"  (or wherever you have it installed)
mv JavaApplicationStub JavaApplicationStub.OLD
cp /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub .

If you are curious to see the basic difference between the new JavaApplicationStub and the old one, do this:
Assuming you are in one of the directories above..
At the command prompt enter:
$ file *

JavaApplicationStub:     Mach-O universal binary with 3 architectures
JavaApplicationStub (for architecture x86_64):	Mach-O 64-bit executable x86_64
JavaApplicationStub (for architecture i386):	Mach-O executable i386
JavaApplicationStub (for architecture ppc7400):	Mach-O executable ppc

JavaApplicationStub.OLD: Mach-O executable ppc

Note the OLD executable is for PPC cpu only, whereas the new one supports all three current apple architectures.

Step 4 - Install csi.jar

No idea why this isn't installed for you but...
Assuming your CSI Installer disk image is still mounted.

cp "/Volumes/CSI Installer 3.1.19/CsiInstaller.pkg/Contents/Resources/jarFiles/csi.jar" /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/ext/

I've specified CurrentJDK there are actually a bunch of symlinks in this directory that all point to the same place. I chose CurrentJDK as being the "safest" choice.

Step 5 - Test

Try running CSI Help or CSI Management. They should run without wanting Rosetta installed and your certificates etc should all be fine.
Then try ECI Client (which relies on csi.jar too).

Having searched the web I note others suggesting one needs to change Java preferences to use 32bit before 64bit. This may have been the case once (don't know) but it isn't necessary now. The above steps are all that is necessary notwithstanding any silly errors on my part.

  • + : A leading plus sign indicates that this word must be present in every object returned.
  • - : A leading minus sign indicates that this word must not be present in any row returned.
  • By default (when neither plus nor minus is specified) the word is optional, but the object that contain it will be rated higher.
  • < > : These two operators are used to change a word's contribution to the relevance value that is assigned to a row.
  • ( ) : Parentheses are used to group words into subexpressions.
  • ~ : A leading tilde acts as a negation operator, causing the word's contribution to the object relevance to be negative. It's useful for marking noise words. An object that contains such a word will be rated lower than others, but will not be excluded altogether, as it would be with the - operator.
  • * : An asterisk is the truncation operator. Unlike the other operators, it should be appended to the word, not prepended.
  • " : The phrase, that is enclosed in double quotes ", matches only objects that contain this phrase literally, as it was typed.


Related Sites