For help with installation, bugs reports or feature requests, please head over to our new forums.
	
Genuitec Community on GitHub
- This topic has 6 replies, 2 voices, and was last updated 18 years, 10 months ago by Haris Peco. 
- 
		AuthorPosts
- 
		
			
				
 sukonyaMemberHi, I am facing issues while trying to establish a database connection through myeclipse.The database(oracle 9i) is installed in my local system where eclipse is installed.While installing the database I had mentioned the MTS port as 2030.The global database name was mentioned as nagsen during the installation.The SID mentioned was 24. Following are the steps used : A) configuring the driver. 1.Window > Preferences > MyEclipse > Database Explorer > Drivers>new. 
 2.created new driver with the following parameters.Driver Template :Oracle (Thin driver) 
 Driver name :Oracle (Thin driver)
 Connection URL: jdbc:oracle:thin:@localhost:1521:nagsen
 Driver jar : d:\classes12.jar
 java classpath : d:\eclipse3.1\startup.jar
 Driverclassname : oracle.jdbc.driver.OracleDriverB) creating connection profile: 1. Window > Open Perspective > Other > MyEclipse Database Explorer followed by OK 2.create conection profile with the following parameters. profile name : oracle_sukonya 
 Driver : oracle thin driver
 URL : jdbc:oracle:thin:@localhost:1521:nagsen
 User name : scott
 password: tigernext > finish C) Open connection 1. right click on oracle_sukonya in DB Browser 
 2.Click on open connection
 3.Check autocommit
 4.OkOn clicking on ok,I get the error ” error while trying ot log in to database.Io Exception:Connection refused(Description=(TMP=)(VSNNUM=153092352)(ERROR=12505)(ERROR_ I then changed the port numbers in both the driver and connection profile to 2030 and tried to open connection and got the following error. Io Exception:Network adapter could not establish connection. Oracle documentation on error 12505 says: Error 12505 is: 
 TNS-12505 TNS:listener could not resolve SID given in connect descriptor
 Cause: The SID in CONNECT_DATA was not found in the listener’s tables.
 Action: Check to make sure that the SID specified is correct. The SIDs that are
 currently registered with the listener can be obtained by typing “LSNRCTL
 SERVICES listener_name”. These SIDs correspond to SID_NAMEs inTNSNAMES.ORA, or DB_NAMES in the INIT.ORA file. Then i checked the contents of tnsnames.ora which is as follows. # TNSNAMES.ORA Network Configuration File: D:\oracle\network\admin\tnsnames.ora 
 # Generated by Oracle configuration tools.SUKONYA = 
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = suknag)(PORT = 1521))
 )
 (CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = sukonya)
 )
 )INST1_HTTP = 
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = suknag)(PORT = 1521))
 )
 (CONNECT_DATA =
 (SERVER = SHARED)
 (SERVICE_NAME = MODOSE)
 (PRESENTATION = http://HRService)
 )
 )EXTPROC_CONNECTION_DATA = 
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
 )
 (CONNECT_DATA =
 (SID = PLSExtProc)
 (PRESENTATION = RO)
 )
 )NAGSEN = 
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = suknag)(PORT = 1521))
 )
 (CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = nagsen)
 )
 )There was a previous oracle installation with db name sukonya which i had uninstalled before installing this instance.However since the home directory was same the entries were retained i suppose. i then changed connection URL to jdbc:oracle:thin:@suknag:1521:nagsen but got the same error Please let me know how to resolve the issue. Thanks in advance, 
 SUkonyaDecember 21, 2006 at 7:42 am #263728
 sukonyaMemberPlease help me with this December 22, 2006 at 12:05 am #263801
 Haris PecoMembersukonya, Could you try next : – install new MyEclipse 5.1.0 and eclipse 3.2.1 if you not install (it looks that you have eclipse 3.1) 
 – add ojdbc14.jar instead of classes12.jar (classes12.jar is old driver for java 1.2)
 – url jdbc:oracle:thin:@suknag:1521:nagsen looks correct, but you have to check listener.ora for correct port and SID/SERVICE_NAME.
 tnsnames.ora can contain some database (maybe remote or nonexisting), but listener.ora define your local database.
 – you have to check if your listener is started with (from command line)lsnrctl status and if it isn’t started call 
 lsnrctl start (or start lsnrctl service if you use Windows)Regards December 22, 2006 at 5:01 am #263807
 sukonyaMemberPeco, 
 The myeclipse here is licensed so upgrading wil require some formalities.We have other peopel using the same versions of database,jdk,eclipse,myeclipse who are having no issues.But the database is in a remote server.I have added ojdbc14.jar instead of classes12.jar.But still m facing the issue.Please bear with me if I am sounding novice in Oracle. following is the content in listener.ora ================================ 
 # LISTENER.ORA Network Configuration File: D:\oracle\network\admin\listener.ora
 # Generated by Oracle configuration tools.LISTENER = 
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
 )
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = suknag)(PORT = 1521))
 )
 )
 )SID_LIST_LISTENER = 
 (SID_LIST =
 (SID_DESC =
 (SID_NAME = PLSExtProc)
 (ORACLE_HOME = D:\oracle)
 (PROGRAM = extproc)
 )
 (SID_DESC =
 (GLOBAL_DBNAME = sukonya)
 (ORACLE_HOME = D:\oracle)
 (SID_NAME = sukonya)
 )
 (SID_DESC =
 (GLOBAL_DBNAME = nagsen)
 (ORACLE_HOME = D:\oracle)
 (SID_NAME = 24)
 )
 )=================================== and here’s the result of ================================== Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) 
 STATUS of the LISTENER
 ————————
 Alias LISTENER
 Version TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 – Produc
 tion
 Start Date 22-DEC-2006 12:47:59
 Uptime 0 days 3 hr. 34 min. 6 sec
 Trace Level off
 Security OFF
 SNMP OFF
 Listener Parameter File D:\oracle\network\admin\listener.ora
 Listener Log File D:\oracle\network\log\listener.log
 Listening Endpoints Summary…
 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=suknag)(PORT=1521)))
 Services Summary…
 Service “PLSExtProc” has 1 instance(s).
 Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
 Service “nagsen” has 1 instance(s).
 Instance “24”, status UNKNOWN, has 1 handler(s) for this service…
 Service “sukonya” has 1 instance(s).
 Instance “sukonya”, status UNKNOWN, has 1 handler(s) for this service…
 The command completed successfully====================================== following is the ouput of lsnrctl start when started from lsnrctl.exe direcory ================================================== 
 LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 – Production on 22-DEC-2006 16:25:
 08Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Welcome to LSNRCTL, type “help” for information. LSNRCTL> start lsnrctl 
 Starting tnslsnr: please wait…Failed to open service <Oracleora_homeTNSListenerlsnrctl>, error 1060. 
 TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 – Production
 System parameter file is D:\oracle\network\admin\listener.ora
 Log messages written to D:\oracle\network\log\lsnrctl.log
 TNS-01151: Missing listener name, lsnrctl, in LISTENER.ORAListener failed to start. See the error message(s) above… ========================================= following is the output when started from c :\ 
 ======================================C:\Documents and Settings\sukonya>lsnrctl start LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 – Production on 22-DEC-2006 16:27: 
 56Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Starting tnslsnr: please wait… Service Oracleora_homeTNSListener already running. 
 TNS-12560: TNS:protocol adapter error
 TNS-00530: Protocol adapter error
 32-bit Windows Error: 1056: Unknown error
 =================================================Thanks in advance, 
 SukonyaDecember 22, 2006 at 10:02 am #263821
 Haris PecoMembersukonya, You have some issues with your installation and lsistener is not started (probably because you haven’t uninstalled first database correctly).If you choose database nagsen and SID 24 then you can try change listener.ora to : 
 ================================
 # LISTENER.ORA Network Configuration File: D:\oracle\network\admin\listener.ora
 # Generated by Oracle configuration tools.LISTENER = 
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
 )
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = suknag)(PORT = 1521))
 )
 )
 )SID_LIST_LISTENER = 
 (SID_LIST =
 (SID_DESC =
 (SID_NAME = PLSExtProc)
 (ORACLE_HOME = D:\oracle)
 (PROGRAM = extproc)
 )(SID_DESC = 
 (GLOBAL_DBNAME = nagsen)
 (ORACLE_HOME = D:\oracle)
 (SID_NAME = 24)
 )
 )and set URL to jdbc:oracle:thin:@suknag:1521:24 
 If it doesn’t work you can uninstall database, remove directory D:\oracle and install again.You have to set SID in URL (SID_NAME or SERVICE_NAME from listener.ora), not database name.Regards, December 22, 2006 at 10:24 am #263825
 sukonyaMemberPeco, I set URL to jdbc:oracle:thin:@localhost:1521:24 and it seems to be connecting now.will let you know if there are further issues.will certainly vote for myeclipse support. thanks again December 22, 2006 at 1:34 pm #263840
 Haris PecoMembersukonya, I’m glad for your success.Thank you! Regards, 
- 
		AuthorPosts

