• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WSAS 5.0 not able to find my jdbcpool...

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I followed most of the ibm directions on how to set this up. My app server obtains Connections using the following code:
/** Obtain JDBC connection. */
public java.sql.Connection getConnection() throws Exception
{
javax.sql.DataSource ds = null;
java.sql.Connection conn = null;
String jdbcPoolName = "java:comp/env/jdbc/hhhhPool";

try
{
javax.naming.InitialContext ctx = new javax.naming.InitialContext();
// InitialContext ctx = this.getInitialContext();
ds = (javax.sql.DataSource) ctx.lookup (jdbcPoolName);
conn = ds.getConnection();
log.debug("Connection to " + jdbcPoolName + " established..");
return conn;
}
catch(Exception e)
{
throw new Exception("Could not establish a Connection using the following connection pool: " +
jdbcPoolName + " with this problem: " + e);
}
}
Yet any time I attempt to use the Connection, I get the following error:
[9/18/03 10:59:14:744 EDT] 61ec06a6 ConnectionFac I J2CA0122I: Resource reference jdbc/hhhhPool could not be located, so default values of the following are used: [Resource-ref settings]
res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)
As a WS newbie, the configuration nightmare is killing me. Anybody know why I'm getting this and how to fix?
Thanks!
 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check my posting in this thread (It's long so I won't reprint it here) It gives lots of detail about connecting to a database in WS 5.0
https://coderanch.com/t/73311/Websphere/WAS-Error-while-connecting-Oracle
HOpe it helps
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic