Operating System - HP-UX
1752591 Members
3481 Online
108788 Solutions
New Discussion юеВ

Re: oracle jdbc No listner error12541

 
SOLVED
Go to solution
far
Occasional Advisor

oracle jdbc No listner error12541

this is the first time i try to connect oracle with java (jdbc) i have the correct url in my java code but still i can;t get connected, i checked the lsnrctl status:

tns-12541:tns:no listner
also protocol adaptor error
no listner
windows :61:unknow error

plz can anyone help me

15 REPLIES 15
Kenneth_19
Trusted Contributor
Solution

Re: oracle jdbc No listner error12541

Try checking the status of the listener on your database server:

$ORACLE_HOME/bin/lsnrctl status

If it is not running, start the listener:

$ORACLE_HOME/bin/lsnrctl start

If your instance is not yet configured in the listener file:

edit the $ORACLE_HOME/network/admin/listener.ora

Kenneth
Always take care of your dearest before it is too late
far
Occasional Advisor

Re: oracle jdbc No listner error12541

hi kenneth, i am glade u answered me so soon, can plz help me configure my lisnter file, by the way i am runing client and server on one machine, i am a student ,i have a project, java and database, i just need them get conected.
far
Occasional Advisor

Re: oracle jdbc No listner error12541

maybe this file can help
Sanjay Kumar Suri
Honored Contributor

Re: oracle jdbc No listner error12541

A sample file is listed below:

# LISTENER.ORA Network Configuration File: E:\oracle\ora90\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = HOST_NAME)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = E:\oracle\ora90)
(SID_NAME = orcl)
)
)

Change the values on the RHS of = and start the listener by command given in previous post.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
far
Occasional Advisor

Re: oracle jdbc No listner error12541

thanks sks,this is my file what should be changed?..waiting for ur reply..thanks again


# LISTENER.ORA Network Configuration File: D:\oracle\ora90\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = farlau)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\ora90)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = data)
(ORACLE_HOME = D:\oracle\ora90)
(SID_NAME = data)
)
)

Sanjay Kumar Suri
Honored Contributor

Re: oracle jdbc No listner error12541

You listener.ora file seems to be ok. Can you check

Start --> Settings --> Control Panel --> Administrative tools --> Services

And look for the Oracle Service like OracleOraHome90TNSLinstener and start/stop/start the same.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
far
Occasional Advisor

Re: oracle jdbc No listner error12541

i realy appreaciate that u are helping me.. i did what u told me, but windowsxp gave me an error, do u think i should reinstall oracle.. here is a snapshot of the error
Sanjay Kumar Suri
Honored Contributor

Re: oracle jdbc No listner error12541

Can you stop OracleServiceDATA before acting on my previous post?

Once Listener started, OracleServiceDATA can be started.

Check the status of Listener with

lsnrctl status

If all works:
set oracle_sid=DATA
(DATA seems to be the database name)

and then try to start the database.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
far
Occasional Advisor

Re: oracle jdbc No listner error12541

hi sks, it gave me the same error even though i stoped the OracleServiceDATA,so do u think if i reinstalled oracle it might work????
note:host=falau
and sid=data
i am workin on one machine,trying to make forte4j to work with oracle sql,i got the driver and the correct url but still can't get connected. it just seems that i cant get the OracleServiceDATA started..should i reinstall oracle???