users@glassfish.java.net

Re: NameNotFound Exception: No object bound to name java:/comp/env

From: Mon Cab <futon33_at_yahoo.com>
Date: Mon, 31 Mar 2008 15:42:55 -0700 (PDT)

Hi

I was missing a mysql driver, and adding that to the packages seems to
have cleared the problem, with glassfish finding the db resource.
However, now I am getting a

 Error in allocating a connection. Cause: No PasswordCredential found

I configured the connection to have an empty string as a password, so I
dont know why I am getting htis error..

Sorry for the newbie questions. I am completely new to netbeans and
glassfish.

I included the sun-resources.xml config file below:

 <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="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
fail-all-connections="false" idle-timeout-in-seconds="300"
is-connection-validation-required="false"
is-isolation-level-guaranteed="true"
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="connectionPool" 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="URL" value="jdbc:mysql://localhost/mydb"/>
    <property name="User" value="root"/>
     <property name="Password" value=""/>
  </jdbc-connection-pool>




--- glassfish_at_javadesktop.org wrote:

> Can you post the stack trace or post what line of source code it's
> failing on. It's not clear from you r message whether the
> NameNotFoundException is coming from the same java:comp/env lookup as
> before or from the jdbc lookup. You need to double-check that
> whatever string you are using
> for a global lookup actually corresponds to a the global JNDI name of
> a jdbc resource. I don't see anything with the name "jdbc/mydb" in
> your sun-resources.xml.
> [Message sent by forum member 'ksak' (ksak)]
>
> http://forums.java.net/jive/thread.jspa?messageID=266894
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>



      ____________________________________________________________________________________
Like movies? Here's a limited-time offer: Blockbuster Total Access for one month at no cost.
http://tc.deals.yahoo.com/tc/blockbuster/text4.com