• 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

Accessing MS ACCESS [Tomcat SERVER] Problem

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Actually am creating database web application..i can access the ms access datas when normally am calling an application..once i deploy the WAR file into Tomcat server ..i cannot access the database...


please give me a solution for this issue..


Here my Code:


 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What error or exception are you getting exactly?
Please follow the steps first
1. Check if the "user" DSN is created and pointed to the proper .mdb file
2. Check the tomcat console for any exception
3. Print the Connection object . You should not get null if connection is established.
 
Mani kan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeah here connection is not establishing! what i have to do to get rid of this problem? but access path and dsn creation are perfect ?
 
Soumyajit Hazra
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

but access path and dsn creation are perfect ?


Please state properly what are the steps you followed to create the DSN. Typically
1. Goto start and control panel. Select administrative tools.
2. In that select DataSources (ODBC).
3. Click on the right side pane.
4. Select the driver as Driver do Microsoft access(*.MDB)
5. Click finish.
6. Goto select and find the databse name on the drive. Select the location.
7. Give Dsn name. Click on ok.
8. Find the Dsn name added to the list.
9. You are done.
above are the steps. Did you ran your java code out of tomcat (not as web app) and still getting same problem? What exception are you getting?
 
Mani kan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no no..normally i can establish the connection after deploying my web app to tomcat server..i cannot create the connection ..thats the problem in my application...


what issue it might be?
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, you really shouldn't be using MS Access with any webserver. It's not safe to use in a multi-threaded environment, and that's just about every web server, and definitely Tomcat.

You should use a database server that runs as a stand-alone application. Popular ones include MySQL, PostgreSQL, Apache Derby, SQLite, IBM DB2, Oracle and others. All the ones listed up to (but not including) DB2 are free open-source products. The others are available in "express" versions for free or as commercial products.

Oh. Forgot one. As long as you're running Windows - and only Windows, there's a version of SQL Server available for free as well. My experience has been that it's better to use the SourceForge JDBC drivers instead of Microsoft's drivers. The MS-supplied drivers were giving me problems on stuff where someone had gone insane on nested transactional stored procedures.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Soumyajit Hazra wrote:

but access path and dsn creation are perfect ?


Please state properly what are the steps you followed to create the DSN. Typically
1. Goto start and control panel. Select administrative tools.
2. In that select DataSources (ODBC).
3. Click on the right side pane.
4. Select the driver as Driver do Microsoft access(*.MDB)
5. Click finish.
6. Goto select and find the databse name on the drive. Select the location.
7. Give Dsn name. Click on ok.
8. Find the Dsn name added to the list.
9. You are done.
above are the steps. Did you ran your java code out of tomcat (not as web app) and still getting same problem? What exception are you getting?


It throws data not found exception
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic