• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Problems accessing MS Access using Tomcat and JSPs

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently studying a computer science course at university and one of the modules is teaching about Web Development using JSPs. This post is NOT concerning a coursework assignment although I would expect the issue I have will no doubt be the same when the coursework is eventually released. The problem I am having crops up ONLY when accessing the database which is unfortunately MS Access. We are using Tomcat for all our tasks.

When I try to load a page from examples given be the lecturer I get the error:-

HTTP Status 500 - An exception occurred processing JSP page /connection.jsp at line 3



For this page to load it is assumed the path specified is correct. I have checked, rechecked, and more. The path is absolutely correct for running on the laptop I am using. I have however tried many options. I have even put Tomcat on my C drive and renamed it to mywebserver to make it fit the path that is there in the original example: c:/mywebserver/webapps/db_examples/orders.mdb

All the JSPs that DON'T involve accessing the database work. I am guessing there must be something else on line 3 of this JSP causing the issue. I am hoping someone can help me understand what needs changing. I am pretty good with understanding most programming but am not yet familiar with the classes used for these tasks. I am pretty sure I need a JDBC driver and that the code in this JSP sets this up, but I am not understanding why all the pages that access the database will not work.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JDBC driver you are using is the standard ODBC-JDBC bridge which comes with Java.

However you WILL need an ODBC driver for MSAccess.
Have you got MS Access installed on this laptop? Or an ODBC driver for it?

One thing you can check is in the windows control panels:
Control Panel --> Administrative Tools --> Data Sources (ODBC)

Click on the Drivers tab, and it should tell you what ODBC drivers you have on your system.

 
Dan Brit
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have attached screenshots of the ODBC info which I think you are pointing me towards. I do have MS Access installed on this laptop.

I just googled access ODBC and installed drivers from Microsoft site but I still am getting the same problem.

ODBC_info.JPG
[Thumbnail for ODBC_info.JPG]
ODBC_drivers.JPG
[Thumbnail for ODBC_drivers.JPG]
 
Stefan Evans
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its been years since I last used MS Access with java. One thing that does trigger my memory - make sure it is there in System DSN, not just user DSN.

 
Dan Brit
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This problem is driving my absolutely nuts. I am wanting to get on with the programming problems but find there is this issue where I need something installed and configured beforehand.

I know this will not be a first for this issue. Does anyone know of a step by step tutorial to fix this so that the proper ODBC drivers are working and that when a JSP wants information from the MS Access database it doesn't give the error in the first post or this one:-

HTTP Status 500 - javax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic