This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Cannot install JDK bundle on fresh x64 OS installation | ||
---|---|---|---|
Product: | installer | Reporter: | Petr Cyhelsky <cyhelsky> |
Component: | JDK bundle | Assignee: | Ondrej Vrabec <ovrabec> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | anebuzelsky, jrechtacek, loren, mmirilovic, vriha |
Priority: | P2 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | Windows 8 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | instal log |
Description
Petr Cyhelsky
2011-10-10 11:59:56 UTC
What JDK version are you installing? jdk 7 or jdk 7u1? the same problem is with two bundles: NB 7.0.1 + JDK7u1 b08 NB 7.0.1 + JDK6u29 b11 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... 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. (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. 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). 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...) > 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? > 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.
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. +1 for the link to a wiki page in the error message 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.
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. I'll transplant the fix to release71_fixes tomorrow if there are no objections I agree, go ahead Ondra ... release71_fixes: http://hg.netbeans.org/releases/rev/084e1e728208 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 verified, the message with the link is in output jdk7u4-nb712 (20120405095539) bundle 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 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
------------------------------
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??? Sounds good to me. Ok, this is good enough. 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 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) 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. (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 |