users@glassfish.java.net

RE: Can't connect to JavaDB database

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Thu, 28 May 2009 13:44:37 -0400

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

  <resources>
    <jdbc-resource enabled="true" jndi-name="jdbc/__default" object-type="user" pool-name="DerbyPool"/>
    <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="org.apache.derby.jdbc.ClientDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="DerbyPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
      <property name="PortNumber" value="1527"/>
      <property name="Password" value="bar"/>
      <property name="User" value="fu"/>
      <property name="serverName" value="localhost"/>
      <property name="DatabaseName" value="DatabaseNameGoesHere"/>
      <property name="connectionAttributes" value=";create=true"/>
    </jdbc-connection-pool>

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_at_Sun.COM
> To: users_at_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_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>

_________________________________________________________________
Hotmail® goes with you.
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009