Bug 122186 - Plugins can't be installed through Plugins Manager if User Account Control is turned on
Plugins can't be installed through Plugins Manager if User Account Control is...
Status: VERIFIED FIXED
Product: platform
Classification: Unclassified
Component: -- Other --
6.x
PC Windows Vista
: P2 (vote)
: 6.x
Assigned To: t_h
issues@platform
EXT-USER
:
: 123329 123675 123928 124012 127174 128517 128934 129011 132232 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-16 22:40 UTC by el_diego
Modified: 2008-12-22 11:20 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
cnd-error.png (60.11 KB, image/png)
2007-12-10 18:00 UTC, Peter Lam
Details
uninstalled-plugin-error-messages.log (42.34 KB, text/plain)
2007-12-10 18:01 UTC, Peter Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description el_diego 2007-11-16 22:40:20 UTC
I can not install the UML plugin in the Web & Java EE release of Netbeans 6.0 RC1 via Tools -> Plugins in the IDE. If 
I try to activate the plugin it fails with this error message. The same problem was present in beta 2 also.

Activation failed: Not all requested modules can be enabled:
[StandardModule:org.netbeans.modules.uml.kit jarFile: C:\Program Files\NetBeans 6.0 RC1\uml4\modules\org-netbeans-
modules-uml-kit.jar]

Required modules for plugin UML to complete activation: 
module org.netbeans.modules.uml/1 > 1.1 
module org.netbeans.modules.uml/1 > 1.2 
module org.netbeans.modules.uml/1 > 1.2.0

I'm running Windows Vista Business and Suns JDK 1.6.03

java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
Comment 1 Peter Lam 2007-11-17 00:21:33 UTC
Thanks for submitting the issue.
I tried this but not able to reproduce it.
Did you have NB installed by the same user (eg, Administrator) installing the UML plugin?
Did you start NB in a fresh userdir?
Comment 2 el_diego 2007-11-17 20:12:58 UTC
The account I'm using to install both the IDE and the plugins is an account with administrator rights. 

I installed 6.0 beta 2 fresh a couple of weeks ago and tried the uml plugin with the same result as above. I did not 
report it at the time. Yesterday I uninstalled beta 2 and installed rc1, tried to install the uml plugin and then 
reported the issue. The user-dir is new to the 6.0 rc1 installation. 

More info from the about dialog:
Product Version: NetBeans IDE 6.0 RC1 (Build 200711131200)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Windows Vista version 6.0 running on x86; Cp1252; sv_SE (nb)
Userdir: C:\Users\Fredrik\.netbeans\6.0rc1
Comment 3 el_diego 2007-11-19 20:09:03 UTC
I uninstalled my previous 6.0 RC1 and downloaded the full installer where the uml plugin is integrated. I had no 
problem with the uml plugin and it seems to work as far as I can see. 
Comment 4 jsacha 2007-11-29 23:37:23 UTC
I have similar problem with RC1 and RC2. I installed JavaSE version then tried to add a couple of plugins (UML, Ant
documentation, Platform documentation, ...). I am getting following error when I try to start NetBeans:

Warning - could not install some modules:
	UML Palette - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Properties - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Project - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Code Generation - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Drawing Area - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML XML Requirements - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Requirements - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML DOORS Requirements - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML IDE Integration - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Web Report - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Samples - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Java 5.0 Parser - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Design Center - The module named org.netbeans.modules.uml/1 was needed and not found.
	UML Doc Control - The module named org.netbeans.modules.uml/1 was needed and not found.
	10 further modules could not be installed due to the above problems.

When I click "Disable and Continue" NetBeans starts UML is disabled but other plugins that I added seems to work fine.
Comment 5 jsacha 2007-12-04 16:25:59 UTC
This problem is still present in final release of 6.0.
Comment 6 George Vasick 2007-12-07 00:27:11 UTC
Can you provide a the IDE Log File taken from the session where the problem occurred?

Thanks,
George
Comment 7 Peter Lam 2007-12-07 00:57:03 UTC
Ok. I just got my new Vista system and I now can reproduce this issue. Below is the exception. The issue seems to be a
permission problem. I found this by trying to edit netbeans.conf from the NB's etc directory so that the ide userdir is
pointing to a different location but saving the changes to the file got me a permission access denied problem, even
though I installed nb 6 with the same user account that has adminstrator role.


java.io.FileNotFoundException: C:\Program Files\NetBeans 6.0\uml4\modules\DoorsIntegrationFiles\configDoors.vbs (Access
is denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at org.netbeans.updater.ModuleUpdater.unpack(ModuleUpdater.java:375)
    at org.netbeans.updater.ModuleUpdater.run(ModuleUpdater.java:128)
Warning - could not install some modules:
    UML Java 5.0 Parser - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Palette - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML IDE Integration - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML IDE Integration - The module UML Project would also need to be installed.
    UML IDE Integration - The module UML Properties would also need to be installed.
    UML IDE Integration - The module UML Requirements would also need to be installed.
    UML Samples - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Samples - The module UML Project would also need to be installed.
    UML XML Requirements - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Project - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Project - The module UML Doc Control would also need to be installed.
    UML Project - The module UML Properties would also need to be installed.
    UML Design Center - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Design Center - The module UML Project would also need to be installed.
    UML Web Report - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Web Report - The module UML Project would also need to be installed.
    UML DOORS Requirements - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML - The module UML Code Generation would also need to be installed.
    UML - The module UML Design Center would also need to be installed.
    UML - The module UML Doc Control would also need to be installed.
    UML - The module UML DOORS Requirements would also need to be installed.
    UML - The module UML Drawing Area would also need to be installed.
    UML - The module UML IDE Integration would also need to be installed.
    UML - The module UML Java 5.0 Parser would also need to be installed.
    UML - The module UML Palette would also need to be installed.
    UML - The module UML Project would also need to be installed.
    UML - The module UML Properties would also need to be installed.
    UML - The module UML Requirements would also need to be installed.
    UML - The module UML Samples would also need to be installed.
    UML - The module UML Web Report would also need to be installed.
    UML - The module UML XML Requirements would also need to be installed.
    UML Drawing Area - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Drawing Area - The module UML Palette would also need to be installed.
    UML Drawing Area - The module UML Project would also need to be installed.
    UML Drawing Area - The module UML Properties would also need to be installed.
    UML Code Generation - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Code Generation - The module UML IDE Integration would also need to be installed.
    UML Code Generation - The module UML Project would also need to be installed.
    UML Code Generation - The module UML Properties would also need to be installed.
    UML Properties - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Properties - The module UML Doc Control would also need to be installed.
    UML Doc Control - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Requirements - The module named org.netbeans.modules.uml/1 was needed and not found.
    UML Requirements - The module UML Design Center would also need to be installed.

Comment 8 Peter Lam 2007-12-10 17:29:06 UTC
*** Issue 123329 has been marked as a duplicate of this issue. ***
Comment 9 Peter Lam 2007-12-10 17:59:48 UTC
Instead of filing a new issue, I'm re-categorizing this to the auc component.

This was started with UML that several UML users were having problem installing the UML Plugin through the Plugin
Manager on their Vista systems. The real issue is that Vista has the User Account Control (UAC) turned on by default
which prevents the same users installing NetBeans from installing plugins due to permission problem. 

I have tried installing the C/C++ Plugin too when my UAC was on and got the same problem (see attached screenshot named
"cnd-error.png"). So, this issue is not specific to the UML Plugin itself.

After turning off UAC so I could install the UML and C/C++ Plugins, then turning on UAC will give me the same kind of
permission problem uninstalling these plugins. See attached ide log file for this (uninstalled-plugin-error-messages.log)


In the case of UML, the behaviour is also seen in Windows XP when the ide is installed as administrator but later the
uml module update is done globally by another user. This suggests that it is not a Vista specific problem but really
some underlying permissions issue and that some code in au-client should be checking for permissions... 


==>>> Since there are several users running into this issue, the release note should be updated to include this issue.
Comment 10 Peter Lam 2007-12-10 18:00:36 UTC
Created attachment 54104 [details]
cnd-error.png
Comment 11 Peter Lam 2007-12-10 18:01:57 UTC
Created attachment 54105 [details]
uninstalled-plugin-error-messages.log
Comment 12 Karthikeyan Rajeswaran 2007-12-10 22:14:30 UTC
Reassigning to 'jkovalsky' from issues@uml . 
Jiri: This may not be an update center issue per se, but autotupdate client issue. If so, please reassign to autoupdate
component.
Comment 13 sslavic 2007-12-10 23:49:24 UTC
Sorry for creating a duplicate (http://www.netbeans.org/issues/show_bug.cgi?id=123329) of this issue. Hopefully
resolution won't end just with installation/release note that one has to turn UAC off. Maybe UAC prompt can be triggered
by plug-in (un)installation, so that (un)installation gets performed only if user has proved to have required rights.
Comment 14 Jiri Kovalsky 2007-12-11 13:29:39 UTC
Jirko, can Plugins Manager do something about this problem? Thanks for your evaluation!
Comment 15 Jiri Rechtacek 2007-12-12 10:15:55 UTC
I'm going to evaluate the problem on Vista. On other platform it works for me. I let you know ASAP.
Comment 16 Peter Lam 2007-12-12 22:05:11 UTC
*** Issue 123675 has been marked as a duplicate of this issue. ***
Comment 17 rmatous 2007-12-13 13:02:14 UTC
*** Issue 123928 has been marked as a duplicate of this issue. ***
Comment 18 rmatous 2007-12-13 13:41:30 UTC
The cause: New Security Features in Windows Vista. You must have administrator privileges to install files into
c:\program files\. 

If you had installed netbeans in your home, then you wouldn't have any problems. 

Of course its common to install programs into "Program Files" folder on Windows, but then if you want to modify your
installation (e.g.add additional plugins via Plugin Manager), then you need to have administrator privileges - can be
achieved e.g. by using "Run as Administrator" action from popup on Netbeans shortcut on desktop. As soon as you finish
installation(including restart if required), then you can use netbeans again without administrator privileges. 

Because this security feature is new there was introduced mechanism for ensuring backward compatibility, which obviously
doesn't work 100%.
Comment 19 sslavic 2007-12-13 15:24:43 UTC
When one starts installation of NetBeans (or any other program) under Vista into Program Files folder, window pops-up 
asking administrator to confirm or deny installation. If one confirms, application installation has rights to write 
into Program Files and installation continues. Why couldn't similar thing happen when adding plug-ins?

E.g. after downloading plug-in, upon NetBeans restart window would have to pop-up for administrator to confirm. If 
confirmed installation of plug-in would continue, otherwise NetBeans could disable plug-in. When user tries to 
activate disabled plug-in that needs to be installed in Program Files, similar scenario is needed. Question is if it 
is a bug in NetBeans or in Vista that this already doesn't happen?

Just guessing, maybe there is API in Vista that has to be called to trigger this kind of behaviour (ask for 
administrative privileges for a process). If Vista is supposed to do this automatically when someone tries to access 
protected resources, then its a bug in Vista. Quite often I've had similar problem with XP and Vista regarding windows 
firewall - sometimes windows would alert that application is trying to communicate on some port and would offer to 
open port for that application, but sometimes it decides just to be silent.
Comment 20 Peter Lam 2007-12-13 17:47:27 UTC
Yes, I agree with sslavic. Even using the Adminstrator account which has all permission needed to write to the "Program
Files" folder still has this problem. The Plugins Manager should be checking into the permission thing similar to how
other programs that work properly.
Comment 21 rmatous 2007-12-13 20:09:36 UTC
>Even using the Adminstrator account which has all permission needed to write to the "Program
>Files" folder still has this problem.

Yes, this is new Vista security feature (UAC ON, Admin Approval Mode which is on as dfault) .

There are a few ways how to request elevated execution level which is probably what you had in mind mentioning other
programs that work properly. The most strange and simple is to rename netbeans.exe to setup.exe (or alternatively
"setup", "install", "update", "patch"). Very strange to me, the same as virtualization or file redirection, "program
files" seems to be writable (at least File.canWrite in java returns true) and if you create files in "progam files"
folder the files are created in other virtual folder in your home. This behavior causes e.g. bug in JDK impl. for system
Preferences(API) because they are stored effectively per user and cannot be shared(which is purpose for system
preferences)  
  
Comment 22 sslavic 2007-12-14 00:08:34 UTC
Vista nightmare continues. While searching why after upgrade a text editor suddenly began triggering UAC screen each
time it was started, I found an information on support forum (
http://sourceforge.net/forum/forum.php?thread_id=1890149&forum_id=331754 ) that might be interesting to have this
NetBeans issue resolved. Some sort of Vista manifest file (?!) seems to be solution/problem. After finding out about
this manifest file, I've found several blogs that contained more information and here are several:

http://koobmeej.blogspot.com/2006/11/cc-and-windows-vista-woes.html
http://www.gregcons.com/KateBlog/CommentView.aspx?guid=682d4de9-572f-4a18-b822-19069e50410f
http://blogs.msdn.com/cheller/archive/2006/08/24/how-to-embed-a-manifest-in-an-assembly-let-me-count-the-ways.aspx
http://www.codeproject.com/KB/vista-security/UAC__The_Definitive_Guide.aspx

Java developers, beware of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6410605 and related bugs.
Comment 23 rmatous 2007-12-14 13:59:25 UTC
Agree with your latest comment. Here is my evaluation.

Problem occures:
- if Windows Vista
- if installed not in user's home (the most common installation is in "Program Files")
- if Admin Approval Mode is ON (as default)
- if virtualization of file and registry is ON (as default)


How plugin manager works:
- if write permission for install dir => installed into install dir
- if not => installed into user dir

Above mentioned behavior doesn't work because of file virtualization - in other words PM doesn't know about the lack of
write permission

Suggested fix:
- fix launcher - the primary goal is to switch off file virtualization. Adding manifest file into launcher seems to be
right solution.

Reassigned to core/code to fix windows launcher. There is no expected fix for Plugin Manager.
Comment 24 rmatous 2007-12-14 14:07:06 UTC
Recommended workaround until its fixed: 
- use "Run as Administrator" action from popup on Netbeans shortcut on desktop (make this permanent - see advanced
properties "Run as Administrator" )
Comment 25 Peter Lam 2007-12-14 16:42:23 UTC
Thanks rmatous! I agree with your evaluation and workaround. Before it's fixed, I'd request to have this issue and
workaround added to the release note on the web, or at least a FAQ item. Thanks!
Comment 26 Jaromir Uhrik 2007-12-16 17:33:50 UTC
We have added the following FAQ item that is related to this issue: 
http://wiki.netbeans.org/wiki/view/FaqInstallPluginVista
Comment 27 Jiri Rechtacek 2008-01-17 11:43:07 UTC
*** Issue 124012 has been marked as a duplicate of this issue. ***
Comment 28 dlipin 2008-01-24 14:00:23 UTC
Adding manifest can solve the problem, indeed (we had similar issue in NBI, Issue 102168).
We had big problems with adding that manifest to the installer launcher executable for NBI (Netbeans Installer) using 
gcc and windres. To be honest, we failed to do that. The manifest was added (using RT_MANIFEST in resource file) to exe 
file but Vista thought different.
The solution (for us) was using Microsoft compiler and rc.exe from MS Visual Studio C++ 2005 Express, manifest tool 
(mt.exe) was used from Microsoft Platform SDK (to fix Issue 109099).
Afaik netbeans.exe is now compiled using gcc (under cygwin) so be prepared to solve similar problems..
Not so long ago we have found a (hopefully) correct solution so that we can now correctly add the manifest to exe file 
using gcc/windres but honestly we still use MS tools.

If you are interested - pls have a look at nbi/engine/native/launcher/windows.
We had there 2 makefiles - one for gcc/cygwin and the other for MS VC.
Comment 29 t_h 2008-02-04 09:56:18 UTC
Adding manifest cannot solve the problem. If manifest (with asInvoker access rights) is added to netbeans.exe and/or
nbexec.exe these processes runs without folder virtualization. However, once java.exe is invoked by nbexec.exe it runs
with folder virtualization enabled. It would be necessary to add manifest to java.exe itself which is not possible.
If manifest with Level=”requireAdministrator” is added it solves the problem with virtualization (because all process
created (e.g. java.exe) can run with administrative rights as well and therefore virtualization is disabled for them by
default). Problem is that each time netbeans are started, elevation dialog box appears requesting user confirmation for
running with administrative rights. This would be very annoying for user. So, solution is to disable virtualization
explicitly for java.exe process by modifying its token via SetTokenInformation() in nbexec.exe).

Changes:
http://hg.netbeans.org/main/rev/e902415c82f4
Comment 30 Jaromir Uhrik 2008-02-04 17:18:57 UTC
Verified in build #200802041203.
Comment 31 George Vasick 2008-02-13 20:45:48 UTC
*** Issue 127174 has been marked as a duplicate of this issue. ***
Comment 32 George Vasick 2008-02-27 15:54:46 UTC
*** Issue 128517 has been marked as a duplicate of this issue. ***
Comment 33 Jiri Prox 2008-03-03 07:37:05 UTC
*** Issue 128934 has been marked as a duplicate of this issue. ***
Comment 34 George Vasick 2008-03-03 16:09:02 UTC
*** Issue 129011 has been marked as a duplicate of this issue. ***
Comment 35 George Vasick 2008-04-07 19:06:45 UTC
*** Issue 132232 has been marked as a duplicate of this issue. ***


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