views:

229

answers:

1

Recently I wanted to play a bit with Eclipse and JPA. Thus I wanted to create a JPA project.

I got stuck when specifying the database connection, as editing the "Connection URL" (shown on the image) is not possible and I want to enter a (good, working) connection string to an Oracle RAC server which looks more or less like that:

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS= (PROTOCOL=TCP) (HOST=...

Am I doing something obviously wrong? Or is it a "feature" of the Data Source Explorer?

Screenshot from Eclipse

A: 

See Oracle's FAQ for syntax of the database connection string.

Eli Acherkan
It is not the problem of the JDBC syntax (well to some point it is, as Eclipse forces me to stick with the @:: format).As I have said I have a good connection string in a given format and would like to use it with Eclipse DataSource.
Anonymous
If Eclipse doesn't allow you to edit the Connection URL field, why not specify the SID/Host/Port number/User name/Password fields separately? If I understand correctly, you should be able to extract those parameters from your good connection string.
Eli Acherkan
No, I cannot, this will not work for RAC (at least in my setup).
Anonymous
Found a blog comment that suggests the following syntax: `jdbc:oracle:thin:@host1^host2:1521:service_name` (see http://www.jugpadova.it/articles/2007/04/11/jdbc-url-for-oracle-rac).Other than that, I'm out of ideas... Good luck!
Eli Acherkan
Answered proved to be pretty trivial. I have added the Oracle Thin driver as the 'Other Driver'. After that I was ably to put any connection string I wanted for the connection using this driver.
Anonymous