Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Lookup problem

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to make an ejb which connects to a database using JNDI lookup
i am using Netbeans on Glassfish server (only if this info would help)

i have created a datasource on glassfish server for a sybase databse and the connection test went successfully

i have JNDI name: jdbc/test i have made reference and tried to use the look up method but always giving me error this is my code and below will print you the error




ERROR



i am still new in this area i have searched alot for a solution with no help i guess if there any configuration need to be made or what please any one help
 
Ranch Hand
Posts: 247
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

bean.main.main(main.java:25)



"test" Stateless Session bean does not have Business Interface from which it implements.
Seeing the trace, you are calling the "test" class from main() method of main class...

Seems you have directly instantiated the "test" class and making a conventional method on object invocation...

Does not seem to be done in Application Server...

 
Mohamed Mostafa
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
test is the JNDI name .. whatever i have a dataSource that i need to use i can't know how to call it or why is this error happening
 
Ranch Hand
Posts: 34
Mac IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Execute asadmin list-jndi-entries command to see if your ejb entry is available.

List of available commands http://glassfish.java.net/nonav/v3/admin/planning/j109/list-of-commands.html

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic