Oliver Watkins
Oliver Watkins

Reputation: 13519

Can't get Oracle Connection in Glassfish

I am trying to get a JDBC connection happening in my Glassfish 4, but it is complaining that the URL is incorrect when I ping it.

So far I have copied my ojdbc6.jar and ojdbc7.jar files into the Glassfish 4 > domain1 > lib directory.

My General settings look like this :

screenshot 1

And my additional attributes look like this :

enter image description here

In my Oracle Devloper my settings look like this :

enter image description here

Any idea what I am doing wrong? Am I missing a slash or something?

Upvotes: 0

Views: 922

Answers (2)

unwichtich
unwichtich

Reputation: 13857

It looks like you have to setup the server-url in the additional settings of the JDBC connection pool. In case of Oracle datasources the database server hostname is not sufficient.

  1. Remove all properties except username and password.
  2. Add the property url to your JDBC connection pool.
  3. The url has to be in the following format: jdbc:oracle:thin:@<host>:<port>:<sid>

<sid> is the service-id/service-name

Upvotes: 1

Oliver Watkins
Oliver Watkins

Reputation: 13519

enter image description here

Fixed it. This works.

I think it ignores everything except PASWORD and URL . So this setup seems to work

Upvotes: 0

Related Questions