Help with Mecanum Drive Orientation

As we are setting up our Mecanum drive in Java, we are encountering a problem: while we can get three of our motors to drive in the correct direction at any given time, at least one is off during either strafing or driving straight. For example, after inverting a couple motors, our strafing worked perfectly, but the drive was turning when it should have been going straight. However, it is not one particular motor - based on the direction our joystick is oriented, different motors are driving incorrectly. For example, the left rear motor may be going in the correct direction when we try to strafe with the other motors driving incorrectly, while the left front motor is the one driving incorrectly while we try to go straight.

We have tried many combinations of inverting motors and joystick axes, but can only figure out combinations that allow us to drive forward and back without strafing, or combinations that can strafe but turn while going forward and back. Any help, advice, or better resources to solve this problem would be appreciated.

Your original post just left way too many questions open. What robot driving rules/infrastructure are you using?

Edit: It is certainly possible by looking at all the responses of your system to figure out the problem, but the easiest way is to start with verifying that each wheel is correct. Write a test robot that allows you to activate each wheel individually, and verify that the correct wheel is moving the correct direction. If you have that working and the mecanumdrive is still crazy, check the order of the motors that you used in the constructor, or which wire you attached if using LabView.