• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with EJB lookup on GlassFish 2  RSS feed

 
sanchit dua
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to do an EJB lookup on GlassFish vr2 for a class like this: .

And it gives Exception while I'm trying to look up from the hibernate as:

The connection pool made at glassfish site is giving me the ping successful.
The Exceptio I get is :

Thanks!
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exception says you are trying to cast a datasource to a Context.
You probably just need to do
 
sanchit dua
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The connection pooling is done I think...
But I'm getting an exception like this:

Thanks!
 
sanchit dua
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made some changes in this.
But I'm unable to lookup the resources from connection pool. And I'm getting exception as:


I'm trying to do lookup with the following code of bussiness bean:

I have set the connection pool name to be jdbc/TestDB and I have done ping successfully using mysql database.
Even after I'm getting this exception. !!

Thanks!
 
sanchit dua
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the problem is resolved by renaming java/TestDB with TestDB.
Thanks....!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!