0

i tried to perform connection test on netbeans as by creating new connection from databases node.

i am trying to connect with ojdbc6.jar driver and my sid of databse is orcl (oracle personal edition).

while creating new connection i did locate the oracle thin driver, used port 1521, i am using hr user which i have unlocked previously, the connection string of my connection is jdbc:oracle:thin:@localhost:1521:orcl but when i perform testing it throws message

Cannot establish a connection to jdbc:oracle:thin:@localhost:1521:orcl using oracle.jdbc.OracleDriver (IO Error: The Network Adapter could not establish the connection),

need help ,thanks in advance !

a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843
dip
  • 3,508
  • 3
  • 21
  • 35

2 Answers2

0

You first need to make sure that the Oracle service is running, next I think you need to try ojdbc14.

Stanley Mungai
  • 3,906
  • 29
  • 96
  • 163
  • yes server is running ! and it connects on manual code ! but when i try to connect with making new connection from database node of #netbeans service tab ! it throws `java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01882: timezone region not found` @Stanley – dip Feb 03 '14 at 06:35
  • Like I said you may need to change the OJDBC jar to match with your Oracle Version. See this Answer for more Information http://stackoverflow.com/questions/9156379/ora-01882-timezone-region-not-found – Stanley Mungai Feb 03 '14 at 06:42
  • yes i did used another driver still it is throwing the same mgs ! @Stanley – dip Feb 03 '14 at 07:46
0

it was easy ! just do not forgot to conform your database connection string.

as in figure , if u filled fields like HOST , PORT , SID then ti will change the connection string that is generated automatically,

it was my simple mistake which bother me for one week ! thanks lot for everyone who guided me and specially for @Stanley!

dip
  • 3,508
  • 3
  • 21
  • 35