How to force use of new JDBC MySQL Driver?

Hi Everyone,
In my local JDK(1.6)
I have : "..\jdk\jre\lib\ext\mysql-connector-java-5.0.6-bin.jar" in my classpath.
Under Netbeans, I have added Version 5.1.6 to my libraries, and added the library to my project.
When running the preject locally with the code:
DatabaseMetaData meta = con.getMetaData();
String s1 = meta.getDriverVersion();It returns: mysql-connector-java-5.0.6
So it's using the MySQL connector from the JDK rather than the new one I have specified.
This problem is also reflected on the server, using the same project it retruns:
mysql-connector-java-3.1.12.
This is causing me really large problems, I need both the local and remote servers to be running the same version of the MySQL connector, preferably version 5.1.6.
How can I force them to use the version I specify and not the default version from the JDK.
Edited by: 3Pc on Mar 22, 2008 10:50 AM
Edited by: 3Pc on Mar 22, 2008 11:00 AM

jschell wrote:
Per the other thread the source of the problem was a hosting company, so there isn't really a way to fix that in the VM except by asking or finding another company.
Other than that one might be able to use a custom class loader to circumvent the normal class loading. It need to not call to the parent. Doing that with a JDBC driver would not be easy but it should be possible.True, but generally not worth the trouble though. If you have to go through that much work to use a hosting site, your far better off finding another hosting site.
They seem to have problems understanding what they're doing anyway, if they are placing it in the ext directory. Web and Application containers have their own common lib directories for this sort of thing (if they want to provide a "common" driver) without messing around with the JDK itself (and I know you know this as well, I'm not saying this for your benefit, but rather for the OP's ;-) ).
You really have to wonder what else they might have placed there. ;-)

Similar Messages

  • How do I use my new External Hard Drive on my Macbook?!?

    I recently bought an external hard drive for my PC/Macbooks and have run into a little problem. To make a long story short, I reformatted the external hard drive in Window's XP (NFIT Format, not FAT) because that's the only way it would recognize the drive. After doing so, i tried hooking up the drive to my macbook. The macbook recognizes it, however, it won't allow me to modify the drive at all (add or remove files to/from the macbook). Does anybody know how I can use the harddrive on my macbook?!?! Any help is appreciated.

    You need to use FAT or install this driver on the MacBook.
    (41717)

  • How do i use a new computer with my ipod?

    how do i use a new computer with my ipod?

    See this apple support communities user tip…
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • I lived in the US for a few years, spent a fortune on iTunes [my then local Apple ID account].  Now I live in South Africa and want to use Match.  I have a local credit card but how do I use my new / 2nd Apple ID and gain access to all my US music??

    I lived in the US for a few years, spent a fortune on iTunes [my then local Apple ID account].  Now I live in South Africa and want to use Match.  I have a local credit card but how do I use my new / 2nd Apple ID and gain access to all my US music??

    You have to be in a country to use its store - you will need to be in the US and have a US billing address on your account to be able to use the US store (that applies to buying and redownloading).
    You can use iTunes Match in South Africa, do you not have a backup copy of all of your US iTunes purchases so that you can subscribe to it and upload those that aren't in the South African store to it ?

  • How can I use a new computer without deleting everything on iPod?

    Hey Guys
    I need a bit of help.
    My old computer died, it was running Windows XP. I've got myself a new computer running Windows 7.
    I have a copy of my iTunes folders from my old computer (taken 2 days before it died)
    How can I use a new computer without deleting everything on iPod touch?
    I've imported all the folders (music, apps etc) into the new computer's iTunes, but when I sync my iPod
    I receive a window asking if i want to sync i need to erase and replace with the iTunes library on the computer.
    I particularly don't want to do this.
    My wife also uses my iTunes for her iPhone.
    Any help would be appreciated. Thank you

    Make a backup of the iPod by connecting the iPod to the computer and right clicking on the iPod under Devices in iTunes and selecting Backup. Then restore the iPod from that backup and sync as necessary.

  • I have a ipod shuffle synced to a desktop (ver 9), I have a new laptop and downloaded itunes (ver 10.7).  When i plug the ipod in the new laptop it wants to delete my songs. How do i use my new alptop and ipod together?

    I have a ipod shuffle synced to a desktop (ver 9), I have a new laptop and downloaded itunes (ver 10.7).  When i plug the ipod in the new laptop it wants to delete my songs. How do i use my new alptop and ipod together?

    Your iPod is designed to sync with only one iTunes library at a time.  It will recognize the iTunes library on the PC as a new library.  If you sync the iPod with this new library, all content will be erased from the iPod and replaced with what is in the new library.  So what you will want to do is copy everything from the iPod to your new iTunes library on your PC first.
    See this excellent user tip from another forum member turingtest2 outlining the different methods and software available to help you copy content from your iPod back to your PC and into iTunes.
    Recovering your iTunes library from your iPod or iOS device
    B-rock

  • How do I use a new AppleID to access same iTunes Library?

    How do I use a new AppleID to access same iTunes Library?
    I would like to use my Family's AppleID (already created) to login to my iTunes Library on my iMac.
    This is the first step, then I will build that account, and then sync my family's iPad with this account (currently synced with my personal iTunes account.
    Can anyone please help me with the exact steps I should follow to "logout" and then logback in to iTunes using a different AppleID but access my current library(primarily music and Apps) (move library from my personal AppleID to new Family AppleID)?

    See Here  >  http://support.apple.com/kb/HT1751
    And Here...
    https://discussions.apple.com/thread/4083591?tstart=0

  • How do I use a new account to download a new trial???

    How do I use a new account to download a new trial???

    The account plays no role in downloading a trial.  Just download the trial.  If you mean you are trying to download a second copy of a trial on the same system that you previously ran the trial on then that will not work - one trial per system is the limit.

  • How i can use the new Trailers (iPhone, iPad) on my mac?

    Hello, sorry for my bad english.
    With the new version on the app Imovie on Iphone and Ipad with 5.1 sync there are a few of new trailers. but on Imovie (Mac) tere are the old traditionel trailers.
    How i can use this new trailers on my mac?

    Does iTunes see the iPod?
    Is the computer authorized for the account that purchased the items?
    iTunes Store: Authorize or deauthorize your Mac or PC

  • Strange behaviour of jdbc-mysql driver

    I am trying to store japanese characters in mysql and display also after reading from the database using JSP. I am using the following code.
    <%@ page contentType="text/html; charset=UTF-8"%>
    ....... some code ......
    <%
    Class.forName( "org.gjt.mm.mysql.Driver" );
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/DB?useUnicode=true&characterEncoding=UTF-8", "user", "pass" );
    Statement st = con.createStatement();
    st.executeUpdate( "insert into test values('" + request.getParameter( "imgname" ) + "')" );
    ResultSet rs = st.executeQuery( "select * from test" );
    while( rs.next() ) {
    %> DB Value: <%= rs.getString( "imgname" ) %>
    <% } %>
    I found one strange behaviour. I have to change the DriverManger.getConnection line to the following, to write the data correctly in the database.
    DriverManager.getConnection("jdbc:mysql://localhost:3306/DB","user","pass")
    If I read from the database using the same parameters as above, I am getting garbled data.
    To retrieve the data correctly from the database I have to use the following line instead of the previous one.
    DriverManager.getConnection("jdbc:mysql://localhost:3306/DB?useUnicode=true&characterEncoding=UTF-8", "user", "pass" );
    In short, I have to pass different parameters to DriverManager.getConnection() for writing and reading from the database. But it is not possible practically. I am using mm.mysql-2.0.8 jdbc-mysql driver, mysql is 3.23.47 and english windows 2000.
    I have tried the string.getBytes("UTF-8") and new String( getBytes(string), "UTF-8") methods, but not getting the correct data.
    Can anybody guide me how can I store and display the japanese character correctly?
    Thanks to all,
    gaurang.

    I downloaded the latese driver from sourceforge, but still the same thing is happening. Is there any other thing which I should do?
    Thanks
    gaurang.

  • HT201250 Hi, I hope this question won't seem too basic but if I want to use a new larger external drive for my time machine backups, will it do a new full backup the first time I plug it in and if so, do I really need all the old backups on my smaller ext

    Hi, I hope this question won't seem too basic but if I want to use a new larger external drive for my time machine backups, will it do a new full backup the first time I plug it in and if so, do I really need all the old backups on my smaller external drive?

    50maz wrote:
    Hi, I hope this question won't seem too basic but if I want to use a new larger external drive for my time machine backups, will it do a new full backup the first time I plug it in
    Yes, it will do a full backup.
    and if so, do I really need all the old backups on my smaller external drive?
    Only if you want to be able to go back in time to those previous Time Machine backups.  When you plug in the new larger external drive, you will only be able to go back as far as the first day you plugged it in and ran the first Time Machine backup on it.

  • How to properly use the new Lenovo touchpads

    I'll admit to hating Lenovo's new touchpads at first (I purchased a Thinkpad T540p for myself and a relative got an IdeaPad). It felt impossible to click with any accuracy and I was close to returning my laptop largely because of the touchpad. Then I discovered I was using it completely wrong.
    Most of us are accustomed to having dedicated physical buttons for left/middle/right clicking below the touchpad. With physical buttons, we usually had a finger on the touchpad and a thumb on the buttons. Because I was used to this style of doing things, I was trying to do that with the new touchpads: I would have my index finger sweeping around on the touchpad while my thumb was at the bottom for clicking. This led to all sorts of inaccuracies because the movement of my thumb and index finger would conflict with each other. Worse yet, when I clicked with my thumb this conflict would sometimes lead the cursor to move off of the item I was trying to click on.
    Sound familiar? After I changed how I used my touchpad, I had a much more pleasant experience.
    The thing to understand is that the new touchpads are basically a giant button. In other words, the entire touchpad surface can be used for clicking. You can press down anywhere on the touchpad and it will register as a click. Instead of keeping your thumb at the bottom of the touchpad for clicking, just use a your index finger to navigate around. When your cursor is over something you want to click, don't use your thumb! Just leave your index finger where it is and press down on the touchpad. "Click!" You don't have to use the bottom of the touchpad for clicking; the entire touchpad is one big button!
    The next logical question: how do I right-click accurately? Yes, you could use the bottom right corner for right-clicking, but there's an easier way: place two fingers (e.g. your index and middle finger on the touchpad) and then press down. "Click!" Two fingers pressed down anywhere on the surface of the touchpad (aside from the corners which have already been assigned specific functions) will register as a right click.
    Basically: just use your index finger to navigate to where you want the cursor to be, then use your index finger to press down to left-click or your index + middle finger to press down to right-click. DON'T use your thumb! It takes a little getting used to but now I completely enjoy Lenovo's new touchpad.
    Alternatively: you can also gently tap with one or two fingers on the touchpad to left and right-click respectively. A "tap" is when you touch the touchpad and lift your finger(s) without pushing the touchpad down; a "click" is when you press down on the touchpad with your finger(s) with enough force to actually move the touchpad down and make an audible "click".
    Hope this helps somebody!

    Apologies for the double post, but I've made a video demonstration of how to use the new-style touchpads for those who are visual learners: https://www.youtube.com/watch?v=vH3lpHDHaPw
    Hope it helps somebody!

  • How to force using the adobe reader to view the PDF by javascript / PHP / HTML?

    I use the standard way to embed a pdf to my website, however, when I open it the browser will choose the default pdf viewer instead of the adobe reader. I can change it manually by looking at the browser option but it would not be nice if the website visitor need to do this manually. So I would like to know how to force the browser to open the PDF in adobe by using some HTML header / javascript / php or any parameter in object tag. Thanks.
    <object id = 'zoomPage' type='application/pdf' data= '" + sourceFolder + "SingTao/2013/08/17/0/0/A/Content/pdf/pdf_" + currZoomPageNo + ".pdf#toolbar=1&navpanes=0&statusbar=0&messages=0&pagemode=read'><p>The PDF can not display</p></object>

    I know this problem related to the browser behaviour so I would target only :Chrome firefox and IE 9+ (it is ideal if IE8 can also adopt the solution) thanks

  • Lost my remote, now how do I use a new one?

    I lost my Apple TV remote. I have another remote from my Mac Mini. How can I use the Mac Mini remote on ATV? What is the procedure?
    1. Do I need to unpair it from the Mac Mini first? The ATV and the Mac mini are in different rooms at opposite ends of the house.
    2. My ATV is now in screen saver mode and without a paired remote I cannot go to the menu. So, how can I unpair the original remote before I try pairing the new one?
    3. To pair the remote, do I just press the Menu+Next/FFW buttons together for 6 secs until I see the linked icon on the screen?

    You don't need to unpair it from the mac mini, just unpair the old Appletv remote using the mini's one.
    See:
    http://support.apple.com/kb/HT1555

  • How can i use embbed version of mysql in java?

    Hi all,
    How can i create embedded version of mysql in my java application? is it possible to do it in java if yes then how please little hint required thanks in advance

    this is technically possible but may be rather difficult.
    why exactly do you want to embed the database in your application?
    have you considered using a pure java embedded database?
    i think there is probably a better and easier solution to this.
    if you MUST do it this way then look at this http://dev.mysql.com/doc/mysql/en/libmysqld_overview.html
    and then have fun with JNI http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html
    essentially you will have to have the mysql embedded server which is in C++ and connect to them from Java with JNI.
    this is why I strongly suggest you consider the first two questions i asked because this seems like a lot of work to probably solve a simple problem.

Maybe you are looking for

  • Need help to parse a blob

    I'm trying to write an app to parse unified patch files. I've got a table to hold a set of patches from a single patch file and a table to hold each individual patch within the patch file (a single patch file can patch multiple source files). I'm cur

  • The Concurrent Program Error (Report)

    Hi, I am new to apps. Here i have created the sample report, the query is very simple select h.Segment1, h.creation_date, h.vendor_id, h.currency_code, s.vendor_name, l.line_num, l.item_id , l.item_description, l.unit_meas_lookup_code, l.quantity, l.

  • OS Migration from AIX to SUSE Linux

    Hi All, We are having a scenario in which we want to change our OS. First we have AIX with oracle 10.2.0.4 and SAP ECC 6.00 which we want to change into new hardware with SUSE Linux with same Oracle and ECC 6.00 So we are planning to do Oracle Offlin

  • Open window in another form

    Hi, let's say I'm workin on a form an when I press a button another window should open. The problem is that this window is part of another form. my question: How can I open that specific window? If I use call_form it opens the complete form and not t

  • Problem uninstalling SDK 5.0

    When trying to uninstall Java SDK 5.0, I get the following error message (translated from Swedish "Ogiltig enhet: X:\"). "Invalid unit: X:\" I really have to uninstall this SDK since it affects other installations that use Java too. What can I do to