• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Problem with EJB lookup on GlassFish 2

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the problem is resolved by renaming java/TestDB with TestDB.
Thanks....!
 
reply
    Bookmark Topic Watch Topic
  • New Topic