Reply
New Member
Posts: 4
Registered: ‎10-30-2014
Kudos: 1
Accepted Solution

Java 8 and 3.2.7

[ Edited ]

I receive an error with version 3.2.7:

 

JRE Current Value 1.8 but 1.7 is required.


Accepted Solutions
Ubiquiti Employee
Posts: 9,073
Registered: ‎01-28-2013
Kudos: 15446
Solutions: 600
Contributions: 20

Re: Java 8 and 3.2.7


@lambda379 wrote:

I looked at my system and had both j1.7 x86 and j1.8 x64 installed on x64 Windows 7.  I uninstalled j1.7 x86 and the controller worked.  Thanks for your support!


You're welcome!

 

So what is happening here, in some cases when Java 7 is installed as well as Java 8, Java 7 may place a javaw.exe (and other executables) into the system32 directory (where the shortcut looks). So, in that case, it uses the Java 7 javaw.exe then sees that Java 8 (1.8) is set as the default runtime, so it gives you this soft error about the Java version being wrong (saying it's 1.8 but expecting 1.7). In some cases when you uninstall Java 7 it will not remove the Java executables from the system32 directory too.

 

If you have both Java 7 (1.7) and Java 8 (1.8) installed and Java 1.8 is set as the default JRE, it's best to update the shortcut so that it starts with: C:\ProgramData\Oracle\Java\javapath\javaw.exe instead of C:\Windows\system32\javaw.exe. That will prevent this issue from occuring. 

 

Hope that's helpful for explaining what you experienced.

 

Cheers,

Mike

View solution in original post


All Replies
Senior Member
Posts: 2,730
Registered: ‎09-11-2009
Kudos: 1124
Solutions: 61

Re: Java 8

  • CTRL - Add Java 8 support.

They just posted in the beta blog 3.2.7 Man Happy

New Member
Posts: 4
Registered: ‎10-30-2014
Kudos: 1

Re: Java 8

Same error!  JRE Current Value 1.8 but 1.7 is required.

New Member
Posts: 29
Registered: ‎10-28-2013
Kudos: 5

Re: Java 8

Waiting for a response too.

 

Here there's a stopgap solution, with Java 7...

http://community.ubnt.com/t5/UniFi-Wireless/Error-message-https-127-0-0-1-8443-manage-page-cannot-be...

Marcus Vinícius Rocha Marçal
UCT - Ubiquiti Certified Trainer
UEWA - Ubiquiti Enterprise Wireless Admin
UBWA - Ubiquiti Broadband Wireless Admin
UBWS - Ubiquiti Broadband Wireless Specialist
marcus@vozedados.com.br
SuperUser
Posts: 8,181
Registered: ‎01-05-2012
Kudos: 2170
Solutions: 1075

Re: Java 8

Just tried, uninstalled 4.2.0, removed java 7u71 32 and 64, installed java 8u25 32 and 64 , installed 3.2.7 ...no luck , a message says that version 7 is required....uninstalled all (controller and java) reinstalled both java 7, reinstalled the controller 3.2.7, configured all, ok.....then I closed the controller , upgraded java ( both) , the controller again has not started with the same message ....removed java 8 and now it is working...on win7 64.

Shouldn't be supported java 8 on 3.2.7 ?
Regards

New Member
Posts: 4
Registered: ‎10-30-2014
Kudos: 1

Re: Java 8 and 3.2.7

Please update the feature description for 3.2.7 as support for Java 8 has not been added.  This only confuses everyone.  It's obviously that 3.2.7 does not work with Java 8.

Ubiquiti Employee
Posts: 9,073
Registered: ‎01-28-2013
Kudos: 15446
Solutions: 600
Contributions: 20

Re: Java 8 and 3.2.7

[ Edited ]

@lambda379 wrote:

Please update the feature description for 3.2.7 as support for Java 8 has not been added.  This only confuses everyone.  It's obviously that 3.2.7 does not work with Java 8.


 It does work, as you can see below. Question, are you x86 or x64? Which version(s) of Java 1.8 do you have installed? If you check which version is in use under the Java control panel applet, what does it show (control panel>java>java>view)?

 

And yes, there are other ways to get there (start>configure java>java>view), and likely a few others too.

 

Cheers,

Mike

2014-11-03 13_56_40-Wizard - UniFi Controller.png
2014-11-04 08_33_32-Java Runtime Environment Settings.png
Ubiquiti Employee
Posts: 9,073
Registered: ‎01-28-2013
Kudos: 15446
Solutions: 600
Contributions: 20

Re: Java 8


@lambda379 wrote:

JRE Current Value 1.8 but 1.7 is required.


I mentioned this in another thread, but thought I shoud mention it here too. Although it does work on Java 8, we are investigating this particular error. Will report back at a later time about this..

 

Thanks,
Mike

Ubiquiti Employee
Posts: 9,073
Registered: ‎01-28-2013
Kudos: 15446
Solutions: 600
Contributions: 20

Re: Java 8 and 3.2.7

So we have been able to duplicate this (stating found 1.8, requires 1.7) when both j1.7 x86 and j1.8 x86 are installed on a x64 system (win8 in this case, and no x64 Java installed of either channel, j1.8 as default). I'm on my cell so haven't had time to see this on my own systems. I had both versions and it worked fine. Initial suspicion is that this appears to be a Java problem. 

 

More updates to follow as soon as they are available.

 

Cheers,

Mike

New Member
Posts: 4
Registered: ‎10-30-2014
Kudos: 1

Re: Java 8 and 3.2.7

I looked at my system and had both j1.7 x86 and j1.8 x64 installed on x64 Windows 7.  I uninstalled j1.7 x86 and the controller worked.  Thanks for your support!

Ubiquiti Employee
Posts: 9,073
Registered: ‎01-28-2013
Kudos: 15446
Solutions: 600
Contributions: 20

Re: Java 8 and 3.2.7


@lambda379 wrote:

I looked at my system and had both j1.7 x86 and j1.8 x64 installed on x64 Windows 7.  I uninstalled j1.7 x86 and the controller worked.  Thanks for your support!


You're welcome!

 

So what is happening here, in some cases when Java 7 is installed as well as Java 8, Java 7 may place a javaw.exe (and other executables) into the system32 directory (where the shortcut looks). So, in that case, it uses the Java 7 javaw.exe then sees that Java 8 (1.8) is set as the default runtime, so it gives you this soft error about the Java version being wrong (saying it's 1.8 but expecting 1.7). In some cases when you uninstall Java 7 it will not remove the Java executables from the system32 directory too.

 

If you have both Java 7 (1.7) and Java 8 (1.8) installed and Java 1.8 is set as the default JRE, it's best to update the shortcut so that it starts with: C:\ProgramData\Oracle\Java\javapath\javaw.exe instead of C:\Windows\system32\javaw.exe. That will prevent this issue from occuring. 

 

Hope that's helpful for explaining what you experienced.

 

Cheers,

Mike

New Member
Posts: 8
Registered: ‎08-04-2014
Kudos: 10

Re: Java 8 and 3.2.7

[ Edited ]

I'd like to add that the OS X version has the same problem (running 3.2.7 on OS X Yosemite with Java 8 u25 installed). It is demanding Java 6 to be installed (which is no longer supported by Oracle and OS X Yosemite) just as it did prior to 3.2.7. Looking at the pinned topic about 3.2.7 and Java 8 I get the feeling that this is Windows-only. Since both Oracle and Apple are no longer supporting Java 6 the Unifi controller software really needs to use Java 8 on OS X.

Ubiquiti Employee
Posts: 9,073
Registered: ‎01-28-2013
Kudos: 15446
Solutions: 600
Contributions: 20

Re: Java 8 and 3.2.7

[ Edited ]

@ypu wrote:

I'd like to add that the OS X version has the same problem (running 3.2.7 on OS X Yosemite with Java 8 u25 installed). It is demanding Java 6 to be installed (which is no longer supported by Oracle and OS X Yosemite) just as it did prior to 3.2.7. Looking at the pinned topic about 3.2.7 and Java 8 I get the feeling that this is Windows-only. Since both Oracle and Apple are no longer supporting Java 6 the Unifi controller software really needs to use Java 8 on OS X.


Hmm, I don't have any Macs here to test (Debian, Ubuntu, and Windows), I was under the impression that it did work. I will mention this.

 

Thanks,
Mike

New Member
Posts: 18
Registered: ‎12-09-2013
Kudos: 10

Re: Java 8 and 3.2.7

Same problem here. Brand new OS X Yosemite (10.10) installation with a brand new Java 8u25 installation - I get the same error and it won't start.

New Member
Posts: 2
Registered: ‎11-06-2014

Re: Java 8 and 3.2.7

Same problem with OS X and Win 7 on Ver 8.

 

Tried the directory change, get a invalid path;

C:\ProgramData\Oracle\Java\javapath2014-11-06_22-10-49.jpg

 

New Member
Posts: 1
Registered: ‎04-17-2014

Re: Java 8 and 3.2.7

[ Edited ]

I have find how to fix this problem for Win7:
go to your "C:\ProgramData\Oracle\Java\javapath" (in explorer), you must recreate your 3 links, so delete and recreate new link for:
- java.exe
- javaw.exe
- javaws.exe

These 3 files are located in this folder:
 C:\Program Files\Java\jre1.8.0_25\bin
 

SuperUser
Posts: 20,401
Registered: ‎09-17-2013
Kudos: 5133
Solutions: 1458

Re: Java 8 and 3.2.7

[ Edited ]

@sanderson wrote:

Same problem with OS X and Win 7 on Ver 8.

 

Tried the directory change, get a invalid path;

C:\ProgramData\Oracle\Java\javapath2014-11-06_22-10-49.jpg

 


 

 

I think that you have to replace "javapath" with the actual path name ... so (making this up)

 

C:\ProgramData\Oracle\Java\Java8_r3.121\javaw.exe

Ubiquiti Employee
Posts: 9,073
Registered: ‎01-28-2013
Kudos: 15446
Solutions: 600
Contributions: 20

Re: Java 8 and 3.2.7

Just for Windows systems I have in myhome lab, 2x Win 8.1, 1x Win 7 and one of my co-workers Win 8 systems, the symlinks were automatically created. Oracle also added the path to the symlinks to environmental variables (C:\ProgramData\Oracle\Java\javapath). Interesting that it's not creating this for you guys when you have Java 1.8 installed. 

 

For those with an error, what happens if you show all files and folders under folder options (may also be called show hidden files, folders, and drives)? Does it find the folder then? Or is it still MIA?

 

For Yosemite with j1.8b25 it is confirmed to be working. I don't have a system. I'm just waitng to hear back as to what is causing it as it's suspected to be something similar.

 

Cheers,

Mike

Ubiquiti Employee
Posts: 9,073
Registered: ‎01-28-2013
Kudos: 15446
Solutions: 600
Contributions: 20

Re: Java 8 and 3.2.7

As the 1.8 installer creates a symlink and defines the path, I"ve modified my instructions slightly. Removing the path to javaw should be suffice. 

 

Cheers,

Mike

New Member
Posts: 8
Registered: ‎08-04-2014
Kudos: 10

Re: Java 8 and 3.2.7

[ Edited ]

Did a little bit of research and thought "why not try starting UniFi from the commandline?" and so I did with the following result:

 

% open -a UniFi 
LSOpenURLsWithRole() failed for the application /Applications/UniFi.app with error -10658.

 

Setting $JAVA_HOME or unsetting it doesn't matter. What I'm also seeing in my logfiles (I opened up Console and checked the "All messages" log where I searched for "unifi") is the following error message:

07/11/14 18:57:22,000 kernel[0]: Sandbox: mdworker(44239) deny file-read-data /Applications/UniFi.app/Contents/Resources

 Couldn't this be a problem with the more tight security concerning the kernel and sandboxing? There are more apps that have run into problems due to the tighter restrictions that come with Yosemite.

 

Some additional info about Java in OS X as of Lion (could be helpful):

In OS X all the commands are already created in /usr/bin as symlinks to the current Java version (which is the Java version that is set as the default, to give you an example: /usr/bin/java links to

/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

). 

 

JDK versions are now installed in /Library/Java/JavaVirtualMachines/. They will show up as a dir underneath that so you get: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/. When you run "/usr/libexec/java_home" it should give you this exact location. JRE is at the same location: /Library/Internet\ Plug-Ins.

 

Edit:

When I run the following command (which should be comparable to the Windows version described as being the fix) "java -jar /Applications/UniFi.app/Contents/Resources/Java/ace.jar ui" it will start the UniFi window where it will say "Starting UniFi Controller..." and after a while it fails with the message "Server taking too long to start...".

 

Edit2:

With the command "java -jar /Applications/UniFi.app/Contents/Resources/Java/ace.jar info" you can get some nice details:

% java -jar /Applications/UniFi.app/Contents/Resources/Java/ace.jar info
unifi.version=3.2.7 (atag_3.2.7_2347 - release)
unifi.https.port=8443
unifi.ip=192.168.67.1
os.name=Mac OS X
os.version=10.10
java.version=1.8.0_25
java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre

 The first thing I noticed is the ip-address. This is in the range of the vmnet8 adapter that is running on my Mac (I have VMware Fusion installed). It is not in the same range as the ip-address of my Mac nor is it the localhost which it has been previously. Might be related, might be because I now also have to tell it what ip-address it should use. Anyway, if I fire up a vm that is attached to the vmnet8 network I'm able to contact the UniFi Controller webinterface so it is working...to some extend (it won't see the APs because they are obviously not attached to the vmnet8 network).

Reply