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.

Bug 218229 - Forced to enter GlassFish credentials
Summary: Forced to enter GlassFish credentials
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P2 normal with 1 vote (vote)
Assignee: TomasKraus
Depends on:
Reported: 2012-09-12 14:34 UTC by dheffelfinger
Modified: 2012-09-20 08:54 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Config file from NetBeans 7.2. (1.56 KB, text/plain)
2012-09-13 13:12 UTC, Jiri Skrivanek

Note You need to log in before you can comment on or make changes to this bug.
Description dheffelfinger 2012-09-12 14:34:54 UTC
I just installed build 201209120001.

Right clicked on an existing Maven Java EE project and clicked "Debug", I was asked to select an app server to use.

I selected "GlassFish Server 3+", which comes bundled with NetBeans (it was already installed from a previous NetBeans installation).

NetBeans prompted me for an admin username and password for GlassFish.

I didn't have one since it is not necessary to set one when running the local GlassFish. 

NetBeans wouldn't let me start GlassFish without said credentials, so I had to log in to the GlassFish admin console and set the admin username and password just so that I could deploy.

I don't think I should have been prompted for GlassFish admin credentials in the first place.
Comment 1 TomasKraus 2012-09-13 09:44:12 UTC
There was a change in password storage. Previous version did not store passwords at all and there was predefined value for default setup (user admin, no password). It was working fine with default settings but once user changed it he saw the same problem.

Now passwords can be configured in GlassFish registration wizard and are stored in Keyring and Netbeans will reuse them.
It is possible that old settings were not imported correctly.

Defalt glassfish setup is user name 'admin' and no password. This should work in popup window.
I installed 201209130001 build to see what will happen. Looks like GlassFish was not registered at all. I see it on the disk but not in NetBeans.
I registered it manually using wizard (just clicked on Finish after setting GF installation directory) and it works fine without asking anything.

As a workaround you can delete GlassFish from Services tab and register it gain. Provide installation directory and eventually check on 'Next' wizard tab that it's local and username is admin and password field is empty.

I'll try to find out what's wrong.
Comment 2 TomasKraus 2012-09-13 10:23:56 UTC
I was able to reproduce this problem by injecting wrong password into server properties manually (there may be more instances so find the correct one with matching displayName attribute):

<attributes version="1.0">
    <fileobject name="instance">
        <attr name="username" stringvalue="admin"/>
        <attr name="password" stringvalue="adminadmin"/>

This changed password from empty string to "adminadmin" and NetBeans started to ask for password like in your issue. When I removed password element it worked fine again.

Please check your .netbeans/dev/config/GlassFishEE6/Instances/.nbattrs file to see if you also have password stored there. If so, just stop NetBeans, comment it out this way:

        <!--attr name="password" stringvalue="adminadmin"/-->

and start them again and let me know it it solved your problem.

I will implement credentials editor as part of server properties to allow username and password changes from IDE to allow users resolve issues like this.
Comment 3 TomasKraus 2012-09-13 11:46:09 UTC
Also i'm changing priority to P2. This is not a show stopper, but yes, it's _very_ annoying.
Comment 4 Jiri Skrivanek 2012-09-13 13:12:03 UTC
Created attachment 124305 [details]
Config file from NetBeans 7.2.

I can confirm that after importing settings from 7.2 it starts asking for credentials. It should be fixed to not ask for password with default domain. My steps:

- install NetBeans 7.2 Java EE with GlassFish
- create web project and run it
- close IDE
- install NetBeans Dev Java EE (GLassFish detected as already installed)
- run NetBeans Dev and import settings from NetBeans 7.2
- project is opened and GlassFish is registered
- run project
- it asks for credentials when starting GlassFish
- if I provide "admin" username and empty password, it is successfully deployed
- if I restart IDE and run project it asks for password again

Attached is .nbattrs from 7.2 which is imported to Dev userdir. I am not sure whether <userdir>/ is somehow important. There is gfv3.username=admin and no password property contrary to .nbattrs where is

<attr name="username" stringvalue="admin"/>
<attr name="password" stringvalue="adminadmin"/>

Product Version: NetBeans IDE Dev (Build 201209130001)
Java: 1.7.0_07; Java HotSpot(TM) 64-Bit Server VM 23.3-b01
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 5 TomasKraus 2012-09-13 13:58:58 UTC
Jiri: yes, that's the problem. For some unknown reason there is password property set to 'adminadmin' in old versions but in reality there is _no_ password set in Glassfish.

All I did is a change to reflect reality - no password means now password now and 'adminadmin' is real password that anyone can use.
We have to do some change in import code to translate 'adminadmin' to empty string in 7.3 imports.

Also i'm waiting for full rebuild and commit validation tests to push properties editor which allows to change user name and password - it will be available in couple of minutes.
Comment 6 TomasKraus 2012-09-13 14:39:15 UTC
changeset:   232912:10dcc1f0b098
summary:     #218229 - Added user name and password fields into properties editor

This allows to change user name and password in properties editor (Services : Servers : GF Instance -> Properties).

TODO: Modify old settings import to remove
<attr name="password" stringvalue="adminadmin"/>
from glassfish properties when being copied to 7.3
Comment 7 Quality Engineering 2012-09-14 02:10:21 UTC
Integrated into 'main-golden', will be available in build *201209140001* on (upload may still be in progress)
User: Tomas Kraus <>
Log: #218229 - Added user name and password fields into properties editor
Comment 8 TomasKraus 2012-09-14 10:39:21 UTC
org.netbeans.modules.glassfish.common.registration.AutomaticRegistration class seems to be responsible for newly added server only. I have no way in the plugin to interact with old settings import now.
Comment 9 TomasKraus 2012-09-19 11:50:53 UTC
changeset:   232964:4a1136b93a06
summary:     #218229 - Local server password adminadmin is replaced with empty string
Comment 10 Quality Engineering 2012-09-20 02:27:48 UTC
Integrated into 'main-golden', will be available in build *201209200001* on (upload may still be in progress)
User: Tomas Kraus <>
Log: #218229 - Local server password adminadmin is replaced with empty string
Comment 11 Jiri Skrivanek 2012-09-20 08:54:59 UTC
It works for me in build 201209200001.