This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Lookup problem

 
Mohamed Mostafa
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Mujahed Syed
Ranch Hand
Posts: 34
IntelliJ IDE Java Mac
  • 0
  • Mark post as helpful
  • send pies
  • 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

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic