Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sun.jdbc.odbc.JdbcOdbcDriver

 
Vernon Gibson
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I posted this question under JSP's and responded to my own question prematurely.
I've developed a jsp with the java code embeded in the HTML document. This page has no problem finding class sun.jdbc.odbc.JdbcOdbcDriver.
I then ported the java code to a Bean, and when it executes I get a ClassNotFound exception trying to find sun.jdbc.odbc.JdbcOdbcDriver.
Both modules were run in the same environment: NT, IIS, JRun, MySQL.
Anyone got any ideas?
Thanks
Vernon.
 
Monty Ireland
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to put your JDBC DRIVER into your CLASSPATH...
Depending on which container you are using... you may need to define you driver to your server.
Hope this helps... I'm a few weeks behind you on this one...


------------------
Multi-Platform Database Developer
 
Vernon Gibson
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Monty,
But it seems that the class was not being found because of a problem with my properties files. When I hardcoded the driver string and url the program works fine.
Now to debug my properties logic.....
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using a properties file, you need to make sure that the properties file is accessible. I'm not sure what directory JRun searches in if you don't specify a path. Try putting it in various directories in the JRun direcory structure until you get a hit.
 
Vernon Gibson
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tom,
Your suggestion was right on the button. Since I'm deploying my application on the default server, my properties file needed to be in the default folder, versus the jrun/lib folder where all of the other properties files are found.
Thanks,
Vernon
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic