Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An error occurred uploading to the iTunes Store - Please upgrade Java

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!

like image 975
MojoDK Avatar asked Apr 04 '12 12:04

MojoDK


3 Answers

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

like image 158
Jiulong Zhao Avatar answered Oct 15 '22 13:10

Jiulong Zhao


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.

like image 30
Leehro Avatar answered Oct 15 '22 12:10

Leehro


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
like image 4
Wasauce Avatar answered Oct 15 '22 12:10

Wasauce