无法将Oracle 10g XE连接到Eclipse [英] Not able to connect Oracle 10g XE to Eclipse

查看:88
本文介绍了无法将Oracle 10g XE连接到Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
Eclipse无法在Windows 7上连接oracle 10g XE

Possible Duplicate:
Eclipse cannot connect oracle 10g XE on windows 7

当我尝试测试连接时出现此错误.

I am getting this error when i try to test the connection..

java.sql.SQLException:Io异常:网络适配器无法建立连接"

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection"

现在该怎么办?我也从网站上下载了ojdbc14.jar,但仍然出现此错误.

What to do now? I have downloaded the ojdbc14.jar from site also but still i am getting this error.

推荐答案

执行以下步骤,首先使用Sql plus检查:

Do this Steps as below Check First with Sql plus :

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 29 08:51:27 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn system
Enter password:
Connected.
SQL> select instance_name from V$instance;
INSTANCE_NAME
----------------
xe
SQL>

Here is the listener status and services


C:\>lsnrctl services

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-JUL-2008 08:46:43
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1002 state:ready
DISPATCHER <machine: KIRANKUMAR-PC, pid: 3632>
(ADDRESS=(PROTOCOL=tcp)(HOST=KiranKumar-PC)(PORT=49160))
Service "XE_XPT" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully


C:\>lsnrctl status

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-JUL-2008 08:46:56
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 29-JUL-2008 08:39:27
Uptime 0 days 0 hr. 7 min. 29 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=KiranKumar-PC)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=KiranKumar-PC)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully

C:\>TNSPING xe
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-JUL-2008 08:49:28
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = KiranKumar-PC)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (250 msec)


C:\>tnsping localhost-pc<hostname>
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-JUL-2008 08:49:42
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
OK (170 msec)

请检查一下...让我知道解决方法.希望这对您有帮助!

Please check this... Let me know the solution.. Hope this helps!

这篇关于无法将Oracle 10g XE连接到Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆