Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problems setting drivers

 
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code in a class, which has objects of it created by two applets.

I get the JOptionPane showing the message "Getting Drivers" twice, and then the applet fails to initialize. It apparently is getting hung up on Class.forName(...).newInstance(). I can run any a test servlet that gets a JDBC connection just fine. It doesn't appear to be a path problem, because it compiles fine.
Any ideas on where I should start looking?
Thanks!
Jason
 
jason adam
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I got it to work, but I had to copy the folder that contained all the classes for the drivers to the location that my applets were in. Shouldn't have to do this, should I?
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by jason adam:
Well, I got it to work, but I had to copy the folder that contained all the classes for the drivers to the location that my applets were in. Shouldn't have to do this, should I?


did you put the jdbc driver file into your classpath?
Jamie
 
jason adam
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, it's in there. Just seems like anytime I want to use the drivers, I have to have the zip, jar, or extracted package in the same location that the application is in.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic