• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Naming Exception while Jndi Lookup for DataSource

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi i am using Weblogic 11g

I had created a Datasource in it from Services/JDBC/DataSources and assigned it a name JNDIDataSource .


But from my jsp page when i am looking for it It is displaying as

Unable to resolve JNDIDataSource .

I had used differnt options like

1. Putting the properties and passing it to the InitailContext.

2. Used java:comp/env/JNDIDataSource , java:comp/JNDIDataSource .

But all in waste ,so please let me know where i am doing wrong .

(Sorry for my English Its very poor )
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Browse your JNDI tree. This will tell you where the object is bound. Perhaps it was not bound at all ?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Could you please tell me how can i found this ??

THanks in advance
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my Weblogic 10.3 I can look it up through console in web browser under Enviroment->Servers->Choose your server from the table and click its name->There is a link above table in general tab "View JNDI Tree".
I bet there are another ways to get it (some scripts for example) but this is quite fast.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi ,

When i clicked on the View JNDI Tree Tab it is displaying nothing .

But i can see i have configured myDBPool under DataSources and its successfully done .

Please help me with what name i should look to the DataSource under Context.lookup??
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

check the target of your datasource...whether it is properly targeted to the cluster or server whichever you have configured.
 
Renjan Thomas
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check the target of your datasource...whether it is properly targetted to the cluster or server whichever you have configured.

I guess..it will be your datasource jndi name....
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey Thomas ,

Thanks for your time , atlast it worked .

THank you very much .
 
What are your superhero powers? Go ahead and try them on this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic