Home » Newcomers » Newcomers » No valid JDBC drivers
|
Re: No valid JDBC drivers [message #517397 is a reply to message #517373] |
Sat, 27 February 2010 14:16 |
|
On 2/27/2010 3:29 AM, Glenn Schworak wrote:
> :?
> I am rather new to using Eclipse and I am having a heck of a time just
> getting started. Figuring out how to get plug-ins installed has been
> touch enough, but to have none of the JDBC stuff work is driving me crazy.
>
> As I am so new, describing the issue will be tough too so let me give it
> a shot. I am trying to simply get started using SQL Exploer and creating
> a new Connection Profile.
>
> I click the new Connection Profile icon and get a pop-up where I can
> type in the name, select the driver, enter the URL (what is that?) and
> so on... There are no drivers to choose from so I click the Add/Edit
> Driver button.
>
> The re is a tree view on the left and it has SQL Explorer as the main
> item and JDBC Drivers as the only subitem. So I select that one and a
> list appears on the right with various drivers, all with red X marks on
> them. I am assuming this means they are broken because if I pick any of
> them (MySQL is the only one I want) and press OK, I return to the
> previous box and there are still no drivers to pick from.
>
> If I go another route and try to create a new Connection Profile by
> selecting FILE/NEW/OTHER I can get to a screen where it shows the
> various MySQL drivers that should be available. They all give me the
> message saying the JAR/zip is unavailable. Here is an example...
>
> "Unable to locate JAR/zip in file system as specified by the driver
> definition: mysql-connector-java-5.1.0-bin.jar."
>
> Now the funny thing is, I searched the web and was able to download the
> newer version of the driver "mysql-connector-java-5.1.12.tar.gz" but I
> have no idea how to get that into Eclipse. I tried putting it in the
> plugin folder but that did nothing so I removed it.
>
> About my system...
> Eclipse Build: 20100218-1602
> Linux Ubuntu: 9.10 64 bit
>
I have two URLs for you to consider:
http://www.windofkeltia.com/j2ee where you can find a (rather old, but
still useful) tutorial on the question you ask (MySQL JDBC driver
insertion into or consumption of by Eclipse). Scroll down to "Syllabus."
http://www.windofkeltia.com/j2ee/dtp-tutorial.html where you can find
companion notes to a good tutorial on using Eclipse Data Tools Platform,
although the example is using Derby instead of MySQL.
Best of luck,
Russ Bateman
|
|
|
Re: No valid JDBC drivers [message #517414 is a reply to message #517397] |
Sat, 27 February 2010 16:09 |
Glenn Schworak Messages: 10 Registered: February 2010 |
Junior Member |
|
|
Russell Bateman wrote on Sat, 27 February 2010 09:16 | On 2/27/2010 3:29 AM, Glenn Schworak wrote:
I have two URLs for you to consider:
http://www.windofkeltia.com/j2ee where you can find a (rather old, but
still useful) tutorial on the question you ask (MySQL JDBC driver
insertion into or consumption of by Eclipse). Scroll down to "Syllabus."
http://www.windofkeltia.com/j2ee/dtp-tutorial.html where you can find
companion notes to a good tutorial on using Eclipse Data Tools Platform,
although the example is using Derby instead of MySQL.
Best of luck,
Russ Bateman
|
Without reading every word on every link from both of those sites, I was able to find a couple sections on installing the "Eclipse Data Tools Platform" which I had found before on other sites. I followed the steps just to be safe and sure enough, I already have all the required parts installed.
This is so very frustrating! It shouldn't be this hard to do such a basic setup but there is no information on where to put the driver tar file. And just having the newest 5.1.2 tar file is no good because Eclipse (as currently configured) only knows about 5.1.0 so how do I tell it about the new tar?
I do appreciate the help, I am just getting really frustrated and it is quite clear why Windows is winning the race on software. What takes a couple mouse clicks in Windows is like pulling teeth under Linux. Although it is much improved over the past couple years. This time I am going to stick it out and learn it.
So, any one have a SIMPLE and short HOW-TO for installing the MySQL driver into Eclipse? And if nothing else, where the heck is Eclipse trying to look when it looks for the tar files? I have tried to trick it by renaming the 5.1.2 tar to match the 5.1.0 that it wants and point to it but no joy there.
Thanks again. More help needed for this newbie to Linux and Eclipse.
|
|
|
Re: No valid JDBC drivers [message #517419 is a reply to message #517414] |
Sat, 27 February 2010 17:07 |
|
On 2/27/2010 9:09 AM, Glenn Schworak wrote:
> Russell Bateman wrote on Sat, 27 February 2010 09:16
>> On 2/27/2010 3:29 AM, Glenn Schworak wrote:
>>
>> I have two URLs for you to consider:
>>
>> http://www.windofkeltia.com/j2ee where you can find a (rather old, but
>> still useful) tutorial on the question you ask (MySQL JDBC driver
>> insertion into or consumption of by Eclipse). Scroll down to "Syllabus."
>>
>> http://www.windofkeltia.com/j2ee/dtp-tutorial.html where you can find
>> companion notes to a good tutorial on using Eclipse Data Tools
>> Platform, although the example is using Derby instead of MySQL.
>>
>> Best of luck,
>>
>> Russ Bateman
>
>
>
>
> Without reading every word on every link from both of those sites, I was
> able to find a couple sections on installing the "Eclipse Data Tools
> Platform" which I had found before on other sites. I followed the steps
> just to be safe and sure enough, I already have all the required parts
> installed.
>
> This is so very frustrating! It shouldn't be this hard to do such a
> basic setup but there is no information on where to put the driver tar
> file. And just having the newest 5.1.2 tar file is no good because
> Eclipse (as currently configured) only knows about 5.1.0 so how do I
> tell it about the new tar?
>
> I do appreciate the help, I am just getting really frustrated and it is
> quite clear why Windows is winning the race on software. What takes a
> couple mouse clicks in Windows is like pulling teeth under Linux.
> Although it is much improved over the past couple years. This time I am
> going to stick it out and learn it.
>
>
> So, any one have a SIMPLE and short HOW-TO for installing the MySQL
> driver into Eclipse? And if nothing else, where the heck is Eclipse
> trying to look when it looks for the tar files? I have tried to trick it
> by renaming the 5.1.2 tar to match the 5.1.0 that it wants and point to
> it but no joy there.
>
> Thanks again. More help needed for this newbie to Linux and Eclipse.
Yeah, it's big and bewildering. Been there, done that. Writing tutorials
and answering select questions in the forum is how I give back.
A good way to make sure the JDBC driver library,
mysql-connector-java-x.y.z-bin.jar*, is in the right place (read: you
can find it next time you go to look) is to put it in your
jdk/jre/lib/ext directory, on Windows, that's something like c:\Program
Files\java\jdk1.6.0_18\jre\lib\ext.
Actually, that's probably not where I'd put it today, but it's where I
put it 5 years ago when I helped write this syllabus. It works. Just put
it somewhere you like; it's the next step that gets it into Eclipse:
Right-click your Eclipse project, choose Build Path, then click the
Libraries tab and finally Add External JARs. Navigate to where you put
the driver.
* Look for the driver at
http://dev.mysql.com/downloads/connector/j/3.1.html
Russ
|
|
| |
Re: No valid JDBC drivers [message #517515 is a reply to message #517432] |
Mon, 01 March 2010 04:40 |
|
On 2/27/2010 2:46 PM, Glenn Schworak wrote:
> Well, my frustration level is reaching its limits.
>
> I truly appreciate your patients and assistance. If you could take a
> look at some screenshots I have taken with a little more detailed
> description of what I am trying, perhaps you will spot the mistake I am
> making.
>
> If I have consumed too much of your time I understand but the help
> really is appreciated.
>
>
> http://schworak.com/big_pics/Help_Me_MySQL_Eclipse.pdf
>
I can probably help a bit. Sorry I didn't come back immediately, I was
doing some electrical work on my home yesterday and so didn't get back
to the forum until tonight.
So, my syllabus wasn't helpful. Perhaps the wiring is different now.
First, if you're working on Linux, and depending on the distro and
release, you probably know about this problem that can sometimes be at
the root of disabled OK buttons (though I don't really suspect it at
this point, but just in case...)
http://mou.me.uk/2009/10/31/fixing-eclipse-in-ubuntu-9-10-ka rmic-koala/
Second, well, I'm going to have to duplicate all of this in Galileo
since I haven't used this approach in about 4 years(last time was on
Europa). Moreover, yes, I was on Windows when I did that and I'm on
Windows again today, but for the last 4 years I mostly ran Eclipse on
Linux (openSuSE 10.3).
Third, I haven't looked to see where you might have got the files you
display. I would explode the tarball with the latest version (5.1.1.12?)
and use the .jar file you obtain doing that.
I'll try to get some time tomorrow to work through this and I'll know
more as I find those tarballs you listed.
In the meantime, if there's someone brighter who knows the answer out
there, don't hold back on my account.
Russ
|
|
| |
Re: No valid JDBC drivers [message #517670 is a reply to message #517432] |
Mon, 01 March 2010 16:16 |
|
On 2/27/2010 2:46 PM, Glenn Schworak wrote:
> Well, my frustration level is reaching its limits.
>
> I truly appreciate your patients and assistance. If you could take a
> look at some screenshots I have taken with a little more detailed
> description of what I am trying, perhaps you will spot the mistake I am
> making.
>
> If I have consumed too much of your time I understand but the help
> really is appreciated.
>
>
> http://schworak.com/big_pics/Help_Me_MySQL_Eclipse.pdf
>
Okay, Glenn, I have something for you...
0) On this copy of Karmic 32-bit I happen to have set up as a Sun
VirtualBox guest OS, this morning I installed:
- eclipse
- jdk1.6.0_18
- MySQL using Applications -> Ubuntu Software Center -> Get Free
Software (MySQL Server, MySQL Administrator and MySQL Client)
- eclipse Java Project (as shown, but a Dynamic Web Project would
work too)
- a package
1) Like you, I found that Build Path -> Add Library -> Connectivity
Driver Definition doesn't work. I don't know if it doesn't work on
Galileo for Windows, but I'm using Karmic just as you are and, yeah, no
matter what I do, I never get an OK button. (I would very much like
someone brighter than I to tell me what I've missed here.)
2) So I did an end run. Under Europa, I simply added the JDBC connector
as an external JAR. Indeed, when I did that in Galileo, my application
worked too.
3) I probably need to deepen this into a tutorial. As you see from this
illustration (in which I try to get everything more or less into one
snapshot so you can see where I went with this and what I did):
- I'm using Karmic
- I'm using Galileo
- I'm using the little sample class with main() from the tutorial
syllabus
- I've punched the connector in using Add External JARs
- Because I haven't taken the time yet to set up a dvdcat table in
MySQL, the application is throwing an exception; however, this still
proves that the connector wiring is working
I hope this helps. Don't hesitate to ask for clarification.
http://www.windofkeltia.com/j2ee/tut-images/mysql-jdbc-examp le.png
Best,
Russ
|
|
| |
Re: No valid JDBC drivers [message #517724 is a reply to message #517432] |
Mon, 01 March 2010 20:14 |
|
On 2/27/2010 2:46 PM, Glenn Schworak wrote:
> Well, my frustration level is reaching its limits.
>
> I truly appreciate your patients and assistance. If you could take a
> look at some screenshots I have taken with a little more detailed
> description of what I am trying, perhaps you will spot the mistake I am
> making.
>
> If I have consumed too much of your time I understand but the help
> really is appreciated.
>
>
> http://schworak.com/big_pics/Help_Me_MySQL_Eclipse.pdf
>
Glenn,
So, picking up on what Eric said (which I tried to do in the first place
just as you did), I figured out what was wrong. Of course, I did add my
connector to the JAR List tab, but couldn't (anymore than you) get an OK
button. I found out that you have to delete the bogus one that's already
there. Maybe it's a sort of placeholder.
Examine the following progressing of steps:
The New Driver Definition dialog; I select MySQL 5.1 since I know that's
the one I'm going to use.
http://www.windofkeltia.com/j2ee/tut-images/new-driver-defin ition.png
Then I click Add JAR/Zip and navigate to and select the connector I
downloaded:
http://www.windofkeltia.com/j2ee/tut-images/new-driver-defin ition-2.png
I still can't get the OK button even if I click the right one after
adding it. So, I select the one that was there and choose Remove JAR/Zip.
http://www.windofkeltia.com/j2ee/tut-images/new-driver-defin ition-3.png
Then, with only the driver I selected during navigation left, the OK
button becomes enabled.
http://www.windofkeltia.com/j2ee/tut-images/new-driver-defin ition-4.png
And I end up with:
http://www.windofkeltia.com/j2ee/tut-images/new-driver-defin ition-5.png
Last, this thing is not "sticky." If I go back in all over again, what I
did is lost--not under the Libraries tab of Build Path, but down in Add
Library -> Connectivity Driver Definition -> New Driver Definition, etc.
It's as if you're starting all over again. Not that you need too because
your definition is already there in Build Path -> Libraries. I just went
back in to do some more experimentation. So, no real bug, I'd just
expect the definition already to be known and that I'd have to delete it
if I wanted to find the connector JAR in some different place.
Russ
|
|
| |
Re: No valid JDBC drivers [message #518011 is a reply to message #517778] |
Tue, 02 March 2010 18:33 |
|
On 3/1/2010 7:06 PM, Glenn Schworak wrote:
> Is it possible that all my trouble is because I am running a 64 bit OS?
>
> I followed the exact same steps and still got no OK button.
>
> You do it and it works but I do it and nothing. Should I try fully
> un-installing yet again and start from scratch? I don't know that it
> would help but I will try just about anything at this point.
>
> I am running Ubuntu 9.10 64bit
>
> More screen shots: http://schworak.com/big_pics/JDBC_Troubles.pdf
>
> Glad you experienced at least part of what I have been seeing. That
> gives me hope.
Uh, yeah. The 64-bit story isn't down pat yet when it comes to Eclipse.
My recommendations are:
- Don't try to find and run a 64-bit Eclipse yet.
- Bring down the 32-bit JDK from Sun and place it locally in your
development area; fix eclipse.ini to run out of that.
There are responders in this forum that are down with the whole 64-bit
thing, but I think it's at least a headache if you can really get it to
work.
Russ
|
|
| | |
Re: No valid JDBC drivers [message #518290 is a reply to message #518206] |
Wed, 03 March 2010 17:02 |
|
On 3/3/2010 6:39 AM, Glenn Schworak wrote:
> This is the first time in many years when I have felt just plane stupid.
>
> [snip]
>
Lucky you. I feel this way permanently. Without technical forums, I
would have to mop bank and grocery store floors for a living.
;-)
|
|
| | | | | |
Goto Forum:
Current Time: Wed Sep 25 23:37:40 GMT 2024
Powered by FUDForum. Page generated in 0.10144 seconds
|