So I was submitting my first iOS app to the App Store after upgrading to OS X 10.8 Mountain Lion and Xcode 4.4, and all was well until the very last step of the submission process...

My app had successfully passed validation via the "Validate..." button in the Organizer window, but when I tried to submit it to the App Store, I got the dreaded, unhelpful error message:

"An error occurred uploading the app to the iTunes Store".

No explanation, nothing else to diagnose the problem. Same thing occurred using the Application Loader. A little googling provided a clue -- this Stack Overflow question pointed to an incompatiblity with the current version of Java for OS X, but it referred to Java 1.5 running on Lion.

With this clue, I opened up the Java Preferences app (in your /Application/Utilities folder) and found this: