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.
When creating new connection to DB it is not possible to explicitly set Database Url. In Netbeans 6.1 it was possible to set database url explicitly. Now in Netbeans 6.5 it is imposible - I have to set host, port, database, etc. We have jdbc connection string which is not able to fit into this fields - it uses two hosts: jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=czdb03-vip.devlab.ad) (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=czdb04-vip.devlab.ad)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=devel))(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5)))
If you check the Show JDBC URL checkbox, you should be able to edit the URL. If the entry field for the URL doesn't show up or is not editable then please reopen.
That is true, but fields host and database are mandatory, so they cannot be empty - there is no need to be mandatory when jdbc url is already filled in. And it is not obvious what should be filled in in the field 'host', when there are more than one hosts (as in example).
If the URL you've entered has, for example, a proper host it will be added to the Host field. The URL gets parsed and the appropriate fields populated. However, that doesn't happen until focus is moved away from the URL entry field. So if you enter your URL and then change focus to another field, you should see this happen. This should also work if you simply click OK. If that's not true, that would be a bug. I don't know what to expect if there are multiple hosts. Maybe the URL parsing doesn't handle that?
I have never tested with two hosts - and the URL below looks very very different from the URL template I got from the Oracle documentation. It looks like you're stuck - you can't connect to the database with the URL specified below. If that's true, then I think this is a P1 - you have no workaround. I think what we need is a checkbox that lets you override the parsing of the URL and just let you specify the URL and have done with it. Rob, can you take this one please?
Sure thing.
From the discussion, its not clear to me why host and password are mandatory. I am curious as to why it changed it 6.5. That also seems like a simpler change than adding the check box.
I don't think that really addresses the issue. The problem here is that there are valid URLs that we are not parsing correctly. The required fields are called out because the failure to parse means we don't know how to fill in those fields. So, it seems there are two approaches: 1) allow the user to override the parsing if they believe the URL is, in fact, correct. 2) rewrite the URL parser. 2 is not an option right now IMO. And I'm not sure we'd want to spend time writing URL parsers for every RDBMS. We take a simple approach right now. Is this worth doing? If anyone has another idea on how to deal with this please jump in.
We should allow a manual override, IMHO. I am sure there are other cases lurking out there that don't fit into the mold of our URL parser, and we don't want to prevent users from being able to establish connections just because we don't handle their URL.
I think something slightly different than overriding would work better. Either at the very top of the dialog, or just under the driver combo box, we can provide 2 radio buttons. One for using the field entry mode (this is what we've got now, and this will be the default). The other one is to use direct URL entry. In this mode, the individual fields are not shown; only the URL entry field is shown. It will not be parsed or validated. It's up to the user to get it right. We'll also need to keep track of whether the connection is using direct url mode or not. And we'll need to do the right thing when the user chooses to modify the connection using the property editor. This seems like a substantial "fix" at this point. I also don't think this is a P1. Maybe the following workaround, albeit klunky, is enough until this enhancement can be made in the next release? The workaround is to use the current input fields as is. Don't worry that it's not the correct JDBC URL. Then use the property editor to modify the URL to your liking. Would that be sufficient (and sufficiently annoying) for now?
I'll add this information to the existing help topic
James, I hope to have this completed and committed today. Let me know if you need me to give you a description before then (it's somewhat different and simpler than the original description). I'd like to give someone (David?) a chance to look at it as well.
> The workaround is to use the current input fields as is. Don't worry that it's not the correct JDBC URL. Then use the > property editor to modify the URL to your liking. Would that be sufficient (and sufficiently annoying) for now? The workaround seems not working well - I need an existing connection to modify for the workaround. But I have no connection and I cannot create any, because the mandatory fields have to be filled with true values otherwise it tells me "Unable to add connection. Cannot establlish a connection to ...". Thatswhy I cannot create fake connection, which I could be able to modify afterwards. Thatswhy I whould probably need another existing Oracle database to create the connection to which I can connect just with mandatory fields. Well, maybe it would a possibility to install locally Oracle XE, connect to it and afterwards modify the URL, but ... huh.. it is kind of complicated..
Yes, you're right about the work around. It's not right. In any case, the fix is almost done. You'll be able to enter the full url directly.
6ba7b619779c
Integrated into 'main-golden', will be available in build *200810010201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6ba7b619779c User: Rob Englander <mindstream@netbeans.org> Log: #148492 NewConnection dialog now supports the option to enter the complete JDBC URL directly without using field validation.
Verified with build 081001. petrsmid, can you verify with latest build that the fix is good for you. Thanks.
Yes, that works fine. Thank You guys.
I have added information about this to the existing Help topic.