• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

DB2 datasource lookup in WSAD, SQLSTATE=42705

 
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I look up my datasource using jndi from WSAD 5.1 Test Server.

But it throws an exception when I call getConnection() on that datasource.

Username and pwd are set in Security tab of WSAD for that datasource. I think I am not getting connected cause of security constraint.

I tried using overloaded method of geConnection that sets userName and pwd. But no luck.

I get error below. Any thoughts?

Has anyone encountered Mapping the following SQLException, with ErrorCode -1,013 and SQLState 08001, to a StaleConnectionException: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] SQL1013N The database alias name or database name "SAMPLE" could not be found. SQLSTATE=42705

Pleasde note that the datasource and databse name is different from SAMPLE that I see in exception. There is no database called SAMPLE. I am connecting to DB2 database. SAMPLE may be something used by DB2 itself. Name of database schema is not SIMPLE either.

I can connect to the same DB2 database from the same local computer. It fails when I use getConnection() method within Java code.
 
author & internet detective
Posts: 42056
926
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I answered in your other thread.
 
I don't even know how to spell CIA. But this tiny ad does:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic