• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MSAccess and Tomcat JNDI Configuration

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. I have a MS Access file and I made a DSN to that call jkdb in the Windows Control Panel

2. I setup the JNDI datasource configuration in http://localhost:8080/admin like below :-
JNDI name : jdbc/jkdb
Datasource URL : jdbc dbc:jkdb
JDBC Driver Class : sun.jdbc.odbc.JdbcOdbcDriver

3. in the java file I made a method like below

Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env/");
DataSource ds = (DataSource)envContext.lookup("jdbc/jkdb");
conn = ds.getConnection();

It gives error like
"javax.naming.NoInitialContextException: Need to specify class name in environment or system property,................"

I wonder whether my Configuration is correct or not. Tomcat JNDI Documentation not talk about MS Access connection details Please jelp me on this Thanks
 
muthulingam Jayakanthan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

I went through some forum and found that it is not possible to use JNDI DataSource Connection setup to MS Access.

I can use DriverManager to do that. But I need to make sure whether it is possible to use Tomcat (5) Web Server To configure MS Access and Call with JNDI naming concept.

Please help me on discussing regarding.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic