Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebSphere - MSAccess Connection

 
Neela Sathesh
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I m using wsad5.1.1 and i connecting to database MSACCESS in my servlet.But i got the following exception in the statement below,


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

EXCEPTION:ClassnotFoundException "sun.jdbc.odbc.JdbcOdbcDriver"

But i when run a standalone java application it works fine.
Can i know abt the problem??

With rgds,
Sathesh
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is just a guess, but by default WSAD uses the IBM JDK which may not include the JDBC-ODBC bridge. Trying running the app within WSAD specifying the Sun JDK explicitly.

Dave
 
Neela Sathesh
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
thanks 4 ur reply.Can u say how to do that??
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is how to do it in Eclipse 3, it should be pretty close...

In your Preferences>Java>Installed JREs, add the location of your Sun JRE
Open the program you want to run, from the run dropdown, select 'Run...', select 'Java Applicatio', New, make sure the correct class is selected, on the JRE tab select 'alternate JRE' and select the JRE you just added.

Now when you choose to run this class it will run using the JRE specified and not the default (possibly IBM) JRE.

I hope this helps.

ps please reduce the use of contractions (4, ur, abt, rgds, u etc) They make posts harder to read and reduce understanding. Particularly for this site which has a high proportion of international visitors.

thanks,
Dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic