users@glassfish.java.net

Re: DataSource Issue

From: <glassfish_at_javadesktop.org>
Date: Mon, 19 Apr 2010 13:00:13 PDT

Thank you for the great replies cf1,

jdbc/sqlserver is the data source name so i edited resource-ref in web.xml so it is now:

    <resource-ref>
        <res-ref-name>jdbc/sqlserver</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>

In the sun-web.xml:

    <res-ref-name>jdbc/sqlserver</res-ref-name>
    <jndi-name>jdbc/sqlserver</jndi-name>
    <default-resource-principal>
      <name>username</name>
      <password>password</password>
    </default-resource-principal>
  </resource-ref>

I receive:

WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ SQLPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: null]
SEVERE: getConnectionError in allocating a connection. Cause: null
SEVERE: java.sql.SQLException: Error in allocating a connection. Cause: null
[Message sent by forum member 'chardoc89']

http://forums.java.net/jive/thread.jspa?messageID=397895