• 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

connection error when running web aplication using Tomcat 6.0

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

I have developed a web application using Netbeans. I've used jdbc odbc connection to connect to a database which is on another server. The database server is MS Access 2007 . My program runs fine when I run it from Netbeans integrated tomcat server. The problem comes when it is deployed in some other machine with tomcat installed in it. The database connection fails and an exeception is thrown. I use Tomcat 6 for deployment. I checked it again and again and it was very surprising for me to see the same program running from Netbeans but fail when it is deployed. Can anyone please help me.

i have searched for possible causes and results online but have not got much of an assistance. If anyone can help me sorting this issue, it ll be of great help.

Regards,

Deepak
 
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the full error you are getting.

So you have three computers involved. The NetBeans computer, the Access computer and the Tomcat computer. The web application works when run on the NetBeans computer (runinng under NetBeans) but does not work when running on the Tomcat server.

Did you try running it on the NetBeans computer without using Netbeans? That is, just run it as a web application under Tomcat on that computer. This may determine if it is a Tomcat configuration issue or a server issue.

And please don't use red font. It won't get your question answered any faster and it's annoying.
 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch Please avoid coloured text, which many people find difficult to read.
 
deepak nv
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@ Tom

Thanks for replying
Sorry for dat colored text..
well as for my issue. My project was developed in a computer in which i installed netbeans. every thing is working fine in the project when i am deploying the project in tomcat 6.0 that is integrated with the netbeans. all the connections are wotking fine and dats is fetched properly. The Access database is also present in the same computer.
the problem arises when i am trying to install tomcat 6.0 from tomcat web site. I deployed the WAR file generated from netbeans into the new tomcat dat i have installed in the computer separately. the application is deployed and the jsp pages are getting displayed. when i am trying to fetch the dats, it show the following error

Data selection is failed. Please do it againjava.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Data connection could not be made.

and i have specified th correct path of Database. Everything is working fine if i am using the Integrated tomcat server of Netbeans, but the moment i try and deploy the project from an Tomcat server separately, ie not from net beans i am encountering the issue.

I hope this reduces ambiguity and explains the issue.
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The connection problem you are experiencing can be caused in many places including, among others, physical hardware, firewalls, software configuration, and software bugs. You need to narrow down those possibilities. I suggest you start with working on the computer that you know is working and getting the application to work without Netbeans. Once you've proven that it is not a Tomcat configuration problem or a software bug, you can move on to the next step.
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My guess:

Your NetBeans tomcat is started by hand, using your Windows logon account
Your installed Tomcat is running as a service, with the LocalSystem Windows account.

Your access database is located on another computer in the network. Your LocalSystem account does not have the rights to access this network location.

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Deepak am also facing same problem . Did you find the solution?
 
Jan Cumps
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, Anil!
 
I RELEASE YOU! (for now .... ) Feel free to peruse this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic