yep, the joint orientation thingy is a bit confusing.. but powerful once you know how to deal with it.
I've found the easiest way to get the joint's rotations to be 0 0 0, and to have the axis doing the right thing.. and have the joint orients aiming correctly is to use an aimConstraint to get the rotation values I want, then transfer those rotations into the jointOrient values.
For example, create a joint structure you like, moving the joints as you need them to be in the correct positions.
The next step is a bit complicated.. and you have to do it for each of the joints in the chain.. but if you write a script to do it, it'll make it faster. 
Let's say your joint structure looks like: joint1-->joint2-->joint3
To fix the orientation for joint1, unparent joint2
Now set all the rotations and rotateAxis and jointOrients on joint1 to 0 0 0.
Now make an aimConstraint, where joint1 aims at joint2. Set the upVector however you want (I usually use another object as the upVector.. you can use a world vector, or whatever. Just get the joint aiming correctly at joint2).
Now delete the aimConstraint. We were only using it for grabbing the correct rotations.
Now copy the rotateX, y, and z values to the jointOrientX, Y, and Z.
Set rotateX, Y, and Z back to 0 0 0.
Re-parent joint2 to joint1.
VOILA!
your joint is now oriented towards the child joint.. and the rotations are 0 0 0.
enjoy!
-jason
jason schleifer
animator
weta digital