This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 74723 - [EE-33] Two apache derby drivers
Summary: [EE-33] Two apache derby drivers
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL: http://ui.netbeans.org/nonav/usabilit...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-10 15:40 UTC by jrojcek
Modified: 2007-03-01 09:49 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jrojcek 2006-04-10 15:40:05 UTC
Finding	
Participant wanted to connect to database but selected wrong driver Apache Derby (Embedded) instead of 
Apache Derby (Net). He filled in the URL, which resulted in error message he didn't understand.

Severity	
1 Participant didn't know how to proceed.

Recommendation	
Provide better name for drivers.
Tell the user he should use the other driver.
Something else???
Comment 1 Andrei Badea 2006-04-20 22:35:27 UTC
Any idea of better names? I can only think of renaming Net to Network. And I
don't think this would help an user who doesn't know about the difference
between the network and embedded driver in Derby to select the right one. What
could help such an user is not registering the embedded driver at all. But this
would cripple the IDE for users who know what they are doing...

Re telling the user to user another driver: I would suggest just adding a
generic message like "If you are using a network driver, check that the database
server is running and that you are using the right driver. If you are using an
embedded driver, try using the corresponding network driver (if any) instead."
to the error dialog box.
Comment 2 jrojcek 2006-04-27 13:28:49 UTC
Please explain what is the difference between them and I would try to come up with UI improvements. 
Thanks.
Comment 3 Andrei Badea 2006-05-03 12:21:36 UTC
(We renamed Derby to Java DB in NetBeans, I will use the latter name.)

Java DB (Embedded) is an embedded driver, that is, it connects to a database
inside the JVM the driver is running in. It doesn't connect to a network server.
Instead, the "server" is the driver itself (that's why no network connection is
needed). This is usually not what the user wants (at least not during
development), because the database can be accessed only from a single JVM. Thus
it can't be accessed e.g. from NetBeans and an application server at the same time.

Java DB (Net) is a network driver, that is, it connects to a network server
which is listening on some IP address and socket. Since the server manages the
database, the database can be accessed from multiple JVMs (even on remote
computers).
Comment 4 jrojcek 2006-05-04 17:50:27 UTC
After discussion with Andrei we suggest to:

- make a small change in the name of the driver to "Java DB (Network)"
- make this driver initially selected in the New Connection Database dialog instead of JDBC-ODBC 
bridge. I believe this would fix the original finding in the study. The question is whether it is the right 
step as probably the JDBC-ODBC driver is more commonly used.

Pavle, Petre do you have a strong opinion about it?

BTW, Andrei please change the name of the action on Databases node from "Add Connection..." to "New 
Connection...". We're consistently using New Connection on other places and the dialog title bar is "New 
Database Connection". Thanks.
Comment 5 Pavel Buzek 2006-05-04 18:00:57 UTC
ok with me
Comment 6 Andrei Badea 2006-05-05 07:00:39 UTC
Re. "Add Connection..." -> "New Connection...". "Add" is consistent with "Add
Driver/Table/Column/Index" on other DB Explorer nodes. Should these action be
renamed too?
Comment 7 jrojcek 2006-05-05 15:11:04 UTC
Re. Should these action be renamed too?

Maybe yes. The guideline we're using for distinguishing Add and New is something like:
- Use Add if adding from existing set of values. Typically from a file chooser, or a list of values. When 
using Add, use Remove as the opposite action.
- Use New when creating something new - specifying it's values like name, content, etc. When using New, 
use Delete as the opposite action.

Sometimes it's a bit hard to make choose the right one. I think for connection, the user is creating new 
connection more than adding from existing connections.
Comment 8 Andrei Badea 2006-05-09 13:52:49 UTC
Re. actions rename: OK. I reopened issue 74713.
Comment 9 Andrei Badea 2006-07-10 15:05:39 UTC
Fixed.

Checking in derby/src/org/netbeans/modules/derby/DerbyOptions.java;
/cvs/db/derby/src/org/netbeans/modules/derby/DerbyOptions.java,v  <-- 
DerbyOptions.java
new revision: 1.5.2.2.2.7; previous revision: 1.5.2.2.2.6
done
Checking in
src/org/netbeans/modules/db/explorer/actions/ConnectUsingDriverAction.java;
/cvs/db/src/org/netbeans/modules/db/explorer/actions/ConnectUsingDriverAction.java,v
 <--  ConnectUsingDriverAction.javanew revision: 1.28.2.1.2.3; previous
revision: 1.28.2.1.2.2
done
Checking in src/org/netbeans/modules/db/util/DriverListUtil.java;
/cvs/db/src/org/netbeans/modules/db/util/DriverListUtil.java,v  <-- 
DriverListUtil.java
new revision: 1.9.2.2.2.4; previous revision: 1.9.2.2.2.3
done
Comment 10 Lukasz Grela 2007-03-01 09:49:08 UTC
v.