Bug 203431 - Cannot install JDK bundle on fresh x64 OS installation
Cannot install JDK bundle on fresh x64 OS installation
Status: RESOLVED FIXED
Product: installer
Classification: Unclassified
Component: JDK bundle
8.0.2
PC Linux
: P2 (vote)
: 7.3
Assigned To: Ondrej Vrabec
issues@installer
71patch2-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-10 11:59 UTC by Petr Cyhelsky
Modified: 2015-03-28 04:49 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
instal log (16.54 KB, text/x-log)
2012-03-06 15:16 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2011-10-10 11:59:56 UTC
On install i'm getting:

Configuring the installer...
Searching for JVM on the system...
Preparing bundled JVM ...
eval: 1: /tmp/.nbi-1105856.tmp/jre-7-linux-i586.bin: not found
Cannot prepare bundled JVM to run the installer.
Most probably the bundled JVM is not compatible with the current platform
Comment 1 Yulia Novozhilova 2011-10-10 12:49:20 UTC
What JDK version are you installing? jdk 7 or jdk 7u1?
Comment 2 Petr Cyhelsky 2011-10-10 13:39:57 UTC
the same problem is with two bundles:
NB 7.0.1 + JDK7u1 b08
NB 7.0.1 + JDK6u29 b11
Comment 3 Petr Cyhelsky 2011-10-10 14:25:27 UTC
this issue will occur for 64-bit linux user who doesn't have installed the package ia32-libs(ubuntu, debian) or some equivalent. imho it would be enough to include something like 

"this problem can be caused by absence of ia32-libs package on your system, please install it and try again"

at the end of the error message, so the user will have some clue as to what can be done...
Comment 4 Yulia Novozhilova 2011-10-11 13:23:13 UTC
Thank you for catching.
I'll fix the error message in current JDK Bundle release if we have another build or in the next release. I don't think this is a stopper anyway, so downgrading to P3.
Comment 5 Marian Mirilovic 2011-10-11 13:39:56 UTC
(In reply to comment #4)
> Thank you for catching.
> I'll fix the error message in current JDK Bundle release if we have another
> build or in the next release. I don't think this is a stopper anyway, so
> downgrading to P3.

Agreed, please do so for next bundle. Thanks in advance.
Comment 6 Vladimir Riha 2012-03-06 13:16:20 UTC
The problem is again in (at least) NB7.1.1 & JDK7u3 bundle and NB7.1 (the same JDK) bundle. Running the sh installer on 64b Ubuntu (without any already installed JDK/JRE) results in:

Configuring the installer...
Searching for JVM on the system...
Preparing bundled JVM ...
Extracting installation data...
Running the installer wizard...

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"


There is no word about the mentioned ia32-libs (which again fixes the problem).
Comment 7 Petr Cyhelsky 2012-03-06 13:38:33 UTC
well maybe the message should be little more generic than the one I proposed, because the libs enabling run of 32-bit apps on 64-bit machines can differ on different Linux distributions / OS's

also it seems the problem was always there, it just isn't too visible because it only occurs if this is the first 32-bit app run on the particular 64-bit system (so essentially it must be fresh OS install...)
Comment 8 Ondrej Vrabec 2012-03-06 13:59:55 UTC
> The problem is again in (at least) NB7.1.1 & JDK7u3 bundle and NB7.1 (the same
> JDK) bundle. Running the sh installer on 64b Ubuntu (without any already
> installed JDK/JRE) results in:
Your case is slightly different from the original one. That one crashed while preparing the JVM, yours crashes while the JVM is already running (well, at least starting running). Attach the install log file if there's any generated, it may indicate where exactly the application crashed.

> well maybe the message should be little more generic than the one I proposed,
> because the libs enabling run of 32-bit apps on 64-bit machines can differ on
> different Linux distributions / OS's
agreed, any suggestions? I am not a fan of referring to 32 bit/64 bit libraries when we plan to build separate 32bit and 64bit bundles in future. Printing info about 32bit libraries without a strong knowledge of what's really happening would be:
1) really bold and potentially dangerous - when installing ia32-libs does not help
2) would be absolutely wrong in case the bundle is 64bit (*in future*)
What about displaying a link to a wiki with description and eventual hints?
Comment 9 Petr Cyhelsky 2012-03-06 14:13:54 UTC
> agreed, any suggestions? I am not a fan of referring to 32 bit/64 bit libraries
> when we plan to build separate 32bit and 64bit bundles in future. Printing info
> about 32bit libraries without a strong knowledge of what's really happening
> would be:
> 1) really bold and potentially dangerous - when installing ia32-libs does not
> help
> 2) would be absolutely wrong in case the bundle is 64bit (*in future*)
> What about displaying a link to a wiki with description and eventual hints?

I would vote for the wiki/faq solution - it seems to be best because it can be universally displayed as a reference for any installer trouble - people usually understand that f in faq means frequently and are not upset when the answer for their particular problem isn't there.
Comment 10 Vladimir Riha 2012-03-06 15:16:59 UTC
Created attachment 116401 [details]
instal log

Here's the log from the attempt in comment #6, it happened on 1 day old system installation (so some SW were already installed). I tried it on fresh installation of Ubuntu 11.10 64b and it ended up with the same message as in bug's description (and no log was created).

Anyway, I'm also for wiki page.
Comment 11 Antonin Nebuzelsky 2012-03-14 16:26:34 UTC
+1 for the link to a wiki page in the error message
Comment 12 Ondrej Vrabec 2012-03-28 14:49:44 UTC
fix: http://hg.netbeans.org/core-main/rev/fc5232a2191e
Comment 13 Ondrej Vrabec 2012-03-28 14:51:35 UTC
i added a link to the FAQ to the error message. It now states:
> Cannot prepare bundled JVM to run the installer.
> Most probably the bundled JVM is not compatible with the current platform.
> See FAQ at http://wiki.netbeans.org/FaqUnableToPrepareBundledJdk for more information.
Review the message, if you have any objections, let me know.
Feel free to edit the FAQ if you think it should say anything else.
Comment 14 Petr Cyhelsky 2012-03-28 15:30:48 UTC
Both the message and web faq are very clear. It may be noted in the faq, that the ia32-libs package can be used on all debian-based distros(ubuntu is an example). AFAIK most Redhat-based distros don't suffer from this problem as the IA32 instruction set support is present automatically.
Comment 15 Ondrej Vrabec 2012-04-03 11:25:36 UTC
I'll transplant the fix to release71_fixes tomorrow if there are no objections
Comment 16 Marian Mirilovic 2012-04-03 12:20:13 UTC
I agree, go ahead Ondra ...
Comment 17 Ondrej Vrabec 2012-04-04 08:05:02 UTC
release71_fixes: http://hg.netbeans.org/releases/rev/084e1e728208
Comment 18 Quality Engineering 2012-04-05 01:20:45 UTC
Integrated into 'releases', will be available in build *201204042205* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/084e1e728208
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #203431 - Cannot install JDK bundle on fresh x64 OS installation
link to FAQ added
Comment 19 Vladimir Riha 2012-04-05 09:48:54 UTC
verified, the message with the link is in output

jdk7u4-nb712 (20120405095539) bundle
Comment 20 Ondrej Vrabec 2012-04-25 13:57:53 UTC
fix: http://hg.netbeans.org/core-main/rev/50b7d4d404a2
Comment 21 Quality Engineering 2012-04-26 10:30:19 UTC
Integrated into 'main-golden', will be available in build *201204260400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/50b7d4d404a2
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #203431 - Cannot install JDK bundle on fresh x64 OS installation
adding link to the FAQ to other bundle messages just to be sure it's displayed everywhere
Comment 22 Marian Mirilovic 2013-01-17 06:46:38 UTC
I actually don't know why, but it fails again with 7.2.1 & 7u9/7u10/7u11 32b installers running on Ubuntu 12.10x64 .... the only message is :
-------
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
-------

Log file (verbose logging) contains :

----------
...
 starting the installer
     ... initializing look and feel
         ... custom look and feel class name was not specified, using system default
     ... initializing L&F finished
     An unexpected exception happened in thread main
     java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
     	at java.awt.Color.<clinit>(Color.java:275)
     	at javax.swing.plaf.metal.MetalTheme.<clinit>(MetalTheme.java:76)
     	at javax.swing.plaf.metal.MetalLookAndFeel.getCurrentTheme(MetalLookAndFeel.java:1672)
     	at javax.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(MetalLookAndFeel.java:1569)
     	at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1591)
     	at javax.swing.UIManager.setLookAndFeel(UIManager.java:536)
     	at javax.swing.UIManager.setLookAndFeel(UIManager.java:576)
     	at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1345)
     	at javax.swing.UIManager.initialize(UIManager.java:1455)
     	at javax.swing.UIManager.maybeInitialize(UIManager.java:1422)
     	at javax.swing.UIManager.getLookAndFeel(UIManager.java:489)
     	at org.netbeans.installer.utils.UiUtils.getLAF(UiUtils.java:516)
     	at org.netbeans.installer.utils.UiUtils.initializeLookAndFeel(UiUtils.java:453)
     	at org.netbeans.installer.wizard.Wizard.newWizardContainer(Wizard.java:493)
     	at org.netbeans.installer.wizard.Wizard.open(Wizard.java:527)
     	at org.netbeans.installer.Installer.start(Installer.java:144)
     	at org.netbeans.installer.Installer.main(Installer.java:81)
     ... show message dialog
         title: Critical Error
         message: An unexpected exception happened in thread main
         
         Exception:
           java.lang.NoClassDefFoundError:
           Could not initialize class java.awt.Toolkit
         
         You can get more details about the issue in the installer log file:
          /home/marian/.nbi/log/20130117073419.log

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
         executing command: chmod ugo+x nbi-cleaner8265404917661592597.sh, in directory: /tmp
             [return]: 0
         ... command execution finished
         ... cleaning process has been started 
> ... java process finished with code 1
> Removing directory /tmp/.nbi-4013414.tmp
> exitCode = 1
------------------------------
Comment 23 Ondrej Vrabec 2013-01-18 09:48:56 UTC
For the fix i have prepared we should find a slightly different error message:
1) this happens later in the code and i cannot tell at the time if the installer is a bundle or a standalone one
2) this can easily happen even in a standalone installer - simply download and unzip a standalone 32bit jdk and run NB7.2 installer (without bundled JDK) on it. You'll get the same result.

My suggestion:
An error occured while initializing the NetBeans IDE installer UI.
Most probably the running JVM is not compatible with the current platform.
See FAQ at http://wiki.netbeans.org/FaqUnableToPrepareBundledJdk for more information.

-----

This is what user will get on commandline when he runs the patched version:

An error occured while initializing the NetBeans IDE installer UI.
Most probably the running JVM is not compatible with the current platform.
See FAQ at http://wiki.netbeans.org/FaqUnableToPrepareBundledJdk for more information.
/home/mkozeny/Downloads/bbb/jdk1.7.0_06/jdk1.7.0_06/jre/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory

Exception:
  java.lang.UnsatisfiedLinkError:
  /home/mkozeny/Downloads/bbb/jdk1.7.0_06/jdk1.7.0_06/jre/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory

You can get more details about the issue in the installer log file:
 /home/mkozeny/.nbi/log/20130118104119.log

Agreed???
Comment 24 Antonin Nebuzelsky 2013-01-18 10:16:57 UTC
Sounds good to me.
Comment 25 Marian Mirilovic 2013-01-18 11:14:39 UTC
Ok, this is good enough.
Comment 26 Ondrej Vrabec 2013-01-18 11:23:56 UTC
fix: http://hg.netbeans.org/core-main/rev/c1298e51c67f
Comment 27 Quality Engineering 2013-01-19 02:51:11 UTC
Integrated into 'main-golden', will be available in build *201301190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c1298e51c67f
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #203431 - Cannot install JDK bundle on fresh x64 OS installation
fix attempt, when an error occurs in the UI init phase, display a reasonable message and do not continue
Comment 28 Ondrej Vrabec 2013-01-21 12:37:28 UTC
on branch: https://hg.netbeans.org/releases/rev/7da4ed413fed
Comment 29 Quality Engineering 2013-01-22 00:15:09 UTC
Integrated into 'releases', will be available in build *201301212100* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/7da4ed413fed
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #203431 - Cannot install JDK bundle on fresh x64 OS installation
fix attempt, when an error occurs in the UI init phase, display a reasonable message and do not continue
(transplanted from c1298e51c67f4a07ed1b32e98a40013a1917736c)
Comment 30 dovidhalevi 2014-07-14 11:28:05 UTC
This has reappeared in netbeans-8.0-javase-linux.sh.

Actually, if I run a regular user for a home installation, the installer works just fine. However if run from sudo, i.e. to place the installation in /opt or /usr/local. one gets this error.

Could try manually moving the home installation, see if the thing runs.

Running on a fresh Debian 64bit Sid, Java-8 sdk manually placed in /opt, /etc/alternatives symlinks pointing to this. Intellij and Android Studio, manually placed in /opt, run just fine.
Comment 31 Libor Fischmeistr 2014-07-14 12:22:32 UTC
(In reply to dovidhalevi from comment #30)
> This has reappeared in netbeans-8.0-javase-linux.sh.
> 
> Actually, if I run a regular user for a home installation, the installer
> works just fine. However if run from sudo, i.e. to place the installation in
> /opt or /usr/local. one gets this error.
> 
> Could try manually moving the home installation, see if the thing runs.
> 
> Running on a fresh Debian 64bit Sid, Java-8 sdk manually placed in /opt,
> /etc/alternatives symlinks pointing to this. Intellij and Android Studio,
> manually placed in /opt, run just fine.

Hello,

your comment is not relevant to this issue, which is related to JDK bundles.

Please file new bug.

Thanks


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo