• 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

JDBC connection error

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am doing a project which works in my school , and i have taken the whole project back home to spend more time doing it. however the school lab environment and my home computer is totally different, their settings are set for us such that there is practically nothing for us to configure. i have done my configurations and i reach a error from tomcat : Exception in init(): Unable to establish connection to database 'bus_guide'

this is my servlet file


i have attached a image of my sql client server and tomcat DOS .

 
kyro gue
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have connector j downloaded, and renamed and have set my classpath for connector j

CLASSPATH C:\mysqlconnectorj\mysql-connector-java-5.1.13-bin.jar;
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Print the actual exception message, in stead of your own error text. The exception will tell you what's wrong.
 
kyro gue
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
replaced with e.getMessage(); displayed on tomcat

Communications Link Failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

i do not know how to write the codes for printing a full stack trace. pardon me
 
kyro gue
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks resolved. it is correct all along.because i have been using the old class files
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic