Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Naming Exception while Jndi Lookup for DataSource

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • 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 )
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator


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

THanks in advance
 
Pawel Nowacki
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • 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
  • 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??
 
Renjan Thomas
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
hey Thomas ,

Thanks for your time , atlast it worked .

THank you very much .
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic