• 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

JNDI lookup problem

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am currently designing a Java Stand-alone Application in WSAD 5.1.2.
I try to look up JNDI name from the DataSource that I set from the Testing server 5.0 of WSAD. However, it throws "can't not cast java.util.HashMap" when I try to execute the following code:



However, if i treat it as web application and execute as servlet, then I can bind the JNDI name successfully.

Later on, I debugged with the following code:



what I got from the println in Servlet lookup is "javax.naming.Reference"
what I got from the println in pure java(Stand-alone application) lookup is "com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource"

So is that something to do with classloader ? Please suggest me what to do since I am getting crazy with this kind of technical question.

Thanks in advance

Transistor
[ February 01, 2006: Message edited by: YuenLian Wu ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic