• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

NameNotFoundException

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I've deployed a CMP bean in Websphere 4.0. Whenever I try to run the application using launchClient, I always get the exception.
javax.naming.NameNotFoundException: InvoiceDB
I checked the dumpnamespace, the data source name is there. I checked out the log file also. It
s saying that
javax.naming.NamingException: ClassNotFoundException: com.ibm.db2.jdbc.app.DB2Driver
Can anyone help me??
Nayan
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need to add your db2 jdbc jar file to you command line path in the WAS for that instance?
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this your first CMP example? Did you remember to run the "usejdbc2" batch file in DB2?
Kyle
 
Nayanjyoti Talukdar
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Yeah, this is my first CMP. After running the "usejdbc2" also, it's throwing the same exception. The message from log file is:
A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.urlns.genericURLContextRoot
Context method: lookup(String)
Context name: local:
Target name: local:jdbc/jdbc/CmpData
Other data:
Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while attempting to get an instance of the object for the specified reference object. Root exception is javax.naming.NamingException: ClassNotFoundException: com.ibm.db2.jdbc.app.DB2Driver
 
Nayanjyoti Talukdar
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I figured out the problem for NameNotFoundException. Now my application throws this execption:
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0204N "DB2ADMIN.COM_IBM_IVJ_EJB_SAMPLES_CABIN1" is an undefined name. SQLSTATE=42704
Can anyone help me??
Nayan
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like you didn't create the table for your CMP. Use the table.ddl file inside your deployed JAR file to do so.
(BTW, are you working with Richard Monson-Haefel's book? If so, why not download my free workbook for WAS 4.0 for this book from www.titan-books.com and let it step you through all of these problems...)
 
Nayanjyoti Talukdar
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much, Mr.Kyle. Finally, I made CMP working with Websphere 4.0
 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic