Skip to main content

Can't connect to JavaDB database

5 replies [Last post]
taoli66
Offline
Joined: 2005-11-29
Points: 0

I just created a JavaDB in NetBeans 6Beta1 and tried to configure a JDBC datasource in Glassfish v2. After I created the connection Pool, and tried to ping it. I got an error message saying "Connection authentication failure occurred. Reason: userid or password invalid." But I can login into the database in NetBeans with the same username/password. I had this problem in both windows and solaris 10 environment. Is this a bug?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Maori

Hi, answer below.

glassfish-2 wrote:
>
> I just created a JavaDB in NetBeans 6Beta1 and tried to configure a JDBC
> datasource in Glassfish v2. After I created the connection Pool, and tried
> to ping it. I got an error message saying "Connection authentication
> failure occurred. Reason: userid or password invalid." But I can login
> into the database in NetBeans with the same username/password. I had this
> problem in both windows and solaris 10 environment. Is this a bug?
> [Message sent by forum member 'taoli66' (taoli66)]
>

I have just now encountered the same problem and found this request for
help. For future use:
It is most probable you had the SecurityMechanism property of the Connection
Pool set to 4 (this is the default when you create new Connection Pool in
glassfish using derby). In your case it should be the value 3 (or you can as
well delete the property value). For a reference on the meaning of those
values visit http://wiki.apache.org/db-derby/SecurityMechanism.

--
View this message in context: http://www.nabble.com/Can%27t-connect-to-JavaDB-database-tp13271736p2375...
Sent from the java.net - glassfish users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

puce
Offline
Joined: 2007-09-01
Points: 0

I had the same issue and setting SecurityMechanism to 3 did the trick, thanks! This was a tricky one. :-/

Sathyan Catari

You might also want to check the connection pool parameters to see if
the values are in sync with what's displayed
in NB(as a tool-tip on top of DB connection).

HTH
-Sathyan

Maori wrote:
> Hi, answer below.
>
>
> glassfish-2 wrote:
>
>> I just created a JavaDB in NetBeans 6Beta1 and tried to configure a JDBC
>> datasource in Glassfish v2. After I created the connection Pool, and tried
>> to ping it. I got an error message saying "Connection authentication
>> failure occurred. Reason: userid or password invalid." But I can login
>> into the database in NetBeans with the same username/password. I had this
>> problem in both windows and solaris 10 environment. Is this a bug?
>> [Message sent by forum member 'taoli66' (taoli66)]
>>
>>
>
> I have just now encountered the same problem and found this request for
> help. For future use:
> It is most probable you had the SecurityMechanism property of the Connection
> Pool set to 4 (this is the default when you create new Connection Pool in
> glassfish using derby). In your case it should be the value 3 (or you can as
> well delete the property value). For a reference on the meaning of those
> values visit http://wiki.apache.org/db-derby/SecurityMechanism.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Martin Gainty

check DB connection-pool details at $GF_HOME/domains/domain1/config/domain.xml e.g.



hth
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

> Date: Thu, 28 May 2009 09:46:58 -0700
> From: Sathyan.Catari@Sun.COM
> To: users@glassfish.dev.java.net
> Subject: Re: Can't connect to JavaDB database
>
> You might also want to check the connection pool parameters to see if
> the values are in sync with what's displayed
> in NB(as a tool-tip on top of DB connection).
>
> HTH
> -Sathyan
>
>
> Maori wrote:
> > Hi, answer below.
> >
> >
> > glassfish-2 wrote:
> >
> >> I just created a JavaDB in NetBeans 6Beta1 and tried to configure a JDBC
> >> datasource in Glassfish v2. After I created the connection Pool, and tried
> >> to ping it. I got an error message saying "Connection authentication
> >> failure occurred. Reason: userid or password invalid." But I can login
> >> into the database in NetBeans with the same username/password. I had this
> >> problem in both windows and solaris 10 environment. Is this a bug?
> >> [Message sent by forum member 'taoli66' (taoli66)]
> >>
> >>
> >
> > I have just now encountered the same problem and found this request for
> > help. For future use:
> > It is most probable you had the SecurityMechanism property of the Connection
> > Pool set to 4 (this is the default when you create new Connection Pool in
> > glassfish using derby). In your case it should be the value 3 (or you can as
> > well delete the property value). For a reference on the meaning of those
> > values visit http://wiki.apache.org/db-derby/SecurityMechanism.
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

_________________________________________________________________
Hotmail® goes with you.
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tuto...
[att1.html]

sm157516
Offline
Joined: 2005-03-28
Points: 0

I am not able to reproduce this issue.
I did the following:

1. In netbeans, created a new connection (after starting Java DB server). The URL i specified was jdbc:derby://localhost:1527/foo;create=true with "someuser" and "somepassword".
2. In the admin console, when i create a new jdbc connection pool and mention "foo" as database name and the above user name and password and ping the connection pool, it succeeds.

Could you attach your pool configuration here?
Also, i tried this on linux, but not solaris or windows with b58g. Could that be a problem?