- This topic has 9 replies, 3 voices, and was last updated 15 years, 11 months ago by Derek Cook.
-
AuthorPosts
-
Derek CookParticipantHi.
Can you please advise me how to get MyEclipse 7M2 and its Database explorer working with Derby 10.4?
I have Pulse setup as well, so a way of keeping things setup via that would be great. But If I search the Pulse catalog for Derby then I can’t find anything.
Loyal WaterMemberDerek,
You can refer to this quickstart doc and follow the same steps to setup Derby.
http://www.myeclipseide.com/documentation/quickstarts/dbexplorer/
Derek CookParticipantThanks, I’ll take a look at that as soon as I can (got to rush out now).
I forgot to mention (sorry I wasn’t specific enough on the first post, I was also in a rush then!) that I had the DB explorer setup for Derby under MyEclipse 6 and it worked fine. But either because of the upgrade to MyEclipse 7M1 or 7M2 and/or maybe because I upgraded Derby from 10.2 to 10.4 recently, it’s stopped working.
When I try and use the database explorer to connect to a database (using a profile I created under MyEclipse 6 that I know worked) I now get an error message saying that a connection can’t be made because the database having been created in Derby 10.4.
Loyal WaterMemberDerek,
Can you paste the exact error message here for me.Also, if you switch to a new workspace and setup derby again, does it work without issues?
Derek CookParticipantHi,
Sorry for the delay, but I’m only working on this part time. Here is a screenshot of the error I get when I try and open the existing database.
My Java application that accesses the database is working fine and can read the database, so it must be a MyEclipse configuration issue?
As requested, I tried this in a new workspace and I get the same problem.
Derek CookParticipantAnd for completeness, this is how I’ve setup the driver
I have pointed it to the latest Derby 10.4 driver Jar. Is this the right thing to do?
Riyad KallaMemberDerek,
You did exactly the right thing, the error you posted above (thanks for doing that) is coming back to the DB Explorer directly from the Derby Driver – so it’s specifically the derby client that you have configured that doesn’t like connecting to this database for whatever reason.Out of curiosity, does your running application have a *slightly* different configuration? Maybe a different JAR or making using a slightly different connection string or specific driver that understands the 10.4 Derby format?
Derek CookParticipantHi, Sorry for the delay in replying, but I’ve been away for a week.
I spent a bit of time this morning looking at this problem.
To be sure I am using the latest version I re-downloaded and installed the derby 10.4.2.0 package before checking it out again. I also deleted the database in question and allowed my application to recreate it.
The database is created using the org.apache.derby.jdbc.EmbeddedDriver contained within the derby.jar file.
I have pointed the MyEclipse database driver to exactly the same derby.jar file used by the application to create and access the database.
If I use this jar file and select the EmbeddedDriver within the MyEclipse “Edit Database Connection Driver” dialog, I get an error dialog that says “Error Whilst Performing Database login with the ex.factory driver. Unable to create the connection. Check your URL.”
If I use the derbyclient.jar file from the 10.4.2.0 download then I get the error messages reported in my previous post. I tried all the available drivers.
As I have a different “home directory” for the database (set in the MyEclipse Derby preferences), I have copied the “classic cars” sample database to this directory, and I can open and read that in MyEclipse using the “MyEclipse Derby” driver.
Looking at the connection URL passed to DriverManager.getConnection(), the application is using “jdbc:derby:ex.factory” whereas my MyEclipse driver for the database is using “jdbc:derby://localhost:1527/ex.factory”
If I use the same URL as being used by the application in a driver (that I created and called “Test”), I now get a different error “Error whilst performing database login with the Test driver. Database ‘ex.factory’ not found.
The Database properties that I send to DriverManager.getConnection() are created from the following source
dbProperties.put(“user”,”xfactory”);
dbProperties.put(“password”,”xfactory”);
dbProperties.put(“derby.driver”,”org.apache.derby.jdbc.EmbeddedDriver”);
dbProperties.put(“derby.url”,”jdbc:derby:”);
Riyad KallaMemberDerek,
We are right in the middle of prepping 7.0, sorry for the delay in responding. Everything you did sounds exactly right, I’m not sure what’s going on here but I’ve filed a note with our dev team to investigate it.
Derek CookParticipant@support-rkalla wrote:
Derek,
We are right in the middle of prepping 7.0, sorry for the delay in responding. Everything you did sounds exactly right, I’m not sure what’s going on here but I’ve filed a note with our dev team to investigate it.
Hi, no problem. It’s not a show stopper for me, but it would be nice to get to the bottom of it!
-
AuthorPosts