Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getting database connection in junit  RSS feed

 
Sunitha Arun
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hi all,
i want to write a junit test case for testing a database query function.
I am getting the following error:

Cannot get connection: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

The following is my code



Please help me to solve this issue.


Regards,
Sunithamm
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!