title: Unable to connect to oracle database.It says "Unable to determine jdbc url from datasource"
body: <p>I have used spring boot in my project and I have the few properties of my oracle database that needs to be specified.They are:</p>
  
  <pre><code>Schema Name=OWNER
  Password=OWNER
  Database Name=DCGCDB
  </code></pre>
  
  <p>It is located in my server so the IP to connect is 192.168.1.5 and the Port Number is 1521.</p>
  
  <p>So in my <code>application.properties</code> file i have made some settings to connect database and here it is:</p>
  
  <pre><code># Oracle settings
  spring.datasource.url=jdbc:oracle:thin:192.168.1.5:1521:DCGCDB
  spring.datasource.username=OWNER
  spring.datasource.password=OWNER
  spring.datasource.driver.class=oracle.jdbc.driver.OracleDriver
  
  ## Hibernate Properties
  # The SQL dialect makes Hibernate generate better SQL for the chosen database
  spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
  
  # Hibernate ddl auto (create, create-drop, validate, update)
  spring.jpa.hibernate.ddl-auto = update
  
  spring.jpa.show-sql=true
  
  # logging
  logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{36} - %msg%n
  logging.level.org.hibernate.SQL=debug
  #logging.level.org.hibernate.type.descriptor.sql=trace
  #logging.level.=debug
  </code></pre>
  
  <p>But when building the project I am getting error like:</p>
  
  <pre><code>o.s.b.a.orm.jpa.DatabaseLookup - Unable to determine jdbc url from
  datasource org.springframework.jdbc.support.MetaDataAccessException:
  Could not get Connection for extracting meta-data; nested exception is
  org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to
  obtain JDBC Connection; nested exception is
  java.sql.SQLRecoverableException: IO Error: The Network Adapter could
  not establish the connection    at
  org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:328)
  </code></pre>
  
  <p>I have added the oracle jar file in pom.xml </p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.oracle&lt;/groupId&gt;
      &lt;artifactId&gt;ojdbc6&lt;/artifactId&gt;
      &lt;version&gt;11.2.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>And also executed the statement <code>mvn install:install-file -Dfile=oracle-ojdbc6-11.2.0.3.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar</code> to install the oracle jar file.</p>