12

Yesterday there were an update to Jave (1.6.0_31) in the "Software update", but now when I try to send my updated app, I get this error "An error occurred uploading to the iTunes Store".

Console writes this error... Java 1.5, 1.6, or 1.7 is required. Currently, java is the default java version. Please upgrade.

Any idea how to fix this?

Thanks!

MojoDK
  • 4,410
  • 10
  • 42
  • 80
  • have you checked to see if you have the latest version of the Application Loader? – Jason Apr 04 '12 at 13:13
  • Please state the exact version of operating system your using along with the version of the other tools (like Application Loader, the iOS SDK, Xcode...) – poupou Apr 04 '12 at 13:14
  • @Jason, yeah I'm using latest version of App Loader (downloaded it today). – MojoDK Apr 04 '12 at 14:13
  • @Poupou, Mac OS X ver 10.7.3. Application Loader 2.5.1 (235). XCode 4.3.2. iOS SDK 5.1. Monodevelop 2.8.8.4. Monotouch: 5.2.10. – MojoDK Apr 04 '12 at 14:20
  • Have you tried using the in-built app submission tools rather than the standalone app? – Luke Apr 04 '12 at 17:48
  • I have this error too! I can't upload anything, i'm so stressed out! – Mathias Apr 04 '12 at 18:51

6 Answers6

20

I met the same "An error occurred uploading to the iTunes Store" issue, and it took me a WHOLE NIGHT!

Here comes the way to solve it:

cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0

the thread: https://devforums.apple.com/thread/147231

Jiulong Zhao
  • 1,313
  • 1
  • 15
  • 25
  • BEWARE! The reason for that Java patch that came out this week was a security vulnerability that has resulted in half a million Macs being loaded with bot net software. Downgrading your Java using this tip re-exposes you to the issue. Details here: http://news.drweb.com/?i=2341&c=5&lng=en&p=0 – Tim Farley Apr 05 '12 at 18:54
  • input these to confirm your mac is not infected: defaults read /Applications/%broswer%.app/Contents/Info LSEnviroment defaults read ~/.MacOSX/environment DYLD_INSERT_LIBRARIERS – Jiulong Zhao Apr 05 '12 at 20:04
  • where did you find this java updade? I downloaded one and it didn't work – RollRoll Nov 17 '12 at 20:39
  • that's in April. java will not be installed by default now. if you meet that issue NOW., please reinstall your Xcode first. – Jiulong Zhao Nov 18 '12 at 06:05
10

I had this problem once over the summer and was able to get past it by reordering my JRE's in Java Preferences. Today I got this error while trying to submit an app, but now Java Preferences is gone. I suspect it's related to Apple's recent removal of the Java Plugin from OSX.

My default java /usr/bin/java was using 1.7 at the time

$ java -version
java version "1.7.0_04"

I checked in /System/Library/Frameworks/JavaVM.framework/Versions, and all of the links were dated Oct 18:

lrwxr-xr-x  1 root  wheel   10 Oct 18 09:57 1.4 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 09:57 1.4.2 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 09:57 1.5 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 09:57 1.5.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 09:57 1.6 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 09:57 1.6.0 -> CurrentJDK
drwxr-xr-x  8 root  wheel  272 Oct 18 10:00 A
lrwxr-xr-x  1 root  wheel    1 Oct 18 09:57 Current -> A
lrwxr-xr-x  1 root  wheel   59 Oct 18 09:57 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

I changed Current to link to CurrentJDK:

sudo rm Current

sudo ln -s CurrentJDK Current

And checked the version

$ java -version
java version "1.6.0_37"

At this point, I was able to submit to the App Store from Xcode again.

Leehro
  • 561
  • 5
  • 10
4

Recreate the old Java 1.5 symlinks:

sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
Wasauce
  • 350
  • 3
  • 11
2

If Xcode gives you the following error in Console

Error: Java 1.5, 1.6, or 1.7 is required. Currently, java is the default java version. Please upgrade.

Check whether there is a Software Update. In my case there was one: Java for OSX 2012-002

Java for OS X 2012-002 delivers improved compatibility, security, and reliability by updating Java SE 6 to 1.6.0_31.

Please quit any web browsers and Java applications before installing this update.

See http://support.apple.com/kb/HT5055 for more details about this update.

See http://support.apple.com/kb/HT1222 for information about the security content of this update.

After the update I could submitted my app with no error.

Tibidabo
  • 21,461
  • 5
  • 90
  • 86
1

Started getting this error as a result of the latest Java release from Oracle (1.7 which I have on my system):

Error: Java 1.5, 1.6, or 1.7 is required. Currently, java is the default java version. Please upgrade.

I'm using:

OSX 10.7.4
Xcode 4.4.1

~~~~~~~~~~~~~~~~~~~~~ UPDATE ~~~~~~~~~~~~~~~~~~~~~~

Oracle Java Update 1.7 definitely breaks Xcode uploader. This IS an acknowledged bug and is reported (by me and others) in ADC.

You can fix it one of TWO WAYS:

  1. In light of the recent security issues with 1.7, simply Uninstall that version of Java and fall back to Apples latest 1.6.35. Which DOES work ok.
  2. If you must have 1.7 on your Mac, go into Applications > Utilities > Java Preferences and temporarily unselect 1.7. Do your upload, then reselect... or not :)
Cliff Ribaudo
  • 8,932
  • 2
  • 55
  • 78
0

I just ran into the same issue and this solution worked for me. I also upgraded to the latest using Apple OS Software Update tool.

cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo rm Current
sudo ln -s CurrentJDK Current
Igor
  • 1,212
  • 12
  • 23