Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to resolve java:comp error after adding the specified jar

sushi sri
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm using eclipse IDE and trying to run a JNDI program as stanalone.

where the look up is context.lookup("java:comp/env/jdbc/sunDB")

When i'm running this under J2EE environement, (i.e in tomcat) then it's working fine.

But when i try to run this program as standalone i'm getting the error java:comp is not bound in this context.

So, i added appserv-rt.jar and j2ee.jar in jre lib and trying to run in eclipse. Still the error persist.

How to resolve this problem.

any kind of help is appreciated.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic