Redian新闻
>
请教:为什么死活连部上数据库?!
avatar
请教:为什么死活连部上数据库?!# Database - 数据库
w*l
1
下面是这段程序,运行时报的错误:
Io exception: Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO
DE=12505)(EMFI=4))))
断点跟踪,进入getConnection()语句,发现带入的参数都是空。为什么呢?是不是我设
的别的参数什么有问题:向Config library之类的,我加了
zip:///[C%|/oracle/ora92/jdbc/lib/classes111_g.jar]
zip:///[C%|/oracle/ora92/jdbc/lib/classes111.jar]
zip:///[C%|/oracle/ora92/jdbc/lib/classes12_g.jar]
zip:///[C%|/oracle/ora92/jdbc/lib/classes12.jar]
zip:///[C%|/oracle/ora92/jdbc/lib/classes12dms_g.jar]
zip:///[C%|/oracle/or
avatar
n*a
2
Your connection string seems to be missing port number 1521.
Try this as a start.
jdbc:oracle:thin:@xxx.xxx.x.xx:1521:ipoll

refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO

好像只要class12.jar就可以了,可是如果我只加这个,去掉别的,他就说找不到oracle.
oracle.jdbc.driver.OracleDriver(););

【在 w*******l 的大作中提到】
: 下面是这段程序,运行时报的错误:
: Io exception: Connection
: refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO
: DE=12505)(EMFI=4))))
: 断点跟踪,进入getConnection()语句,发现带入的参数都是空。为什么呢?是不是我设
: 的别的参数什么有问题:向Config library之类的,我加了
: zip:///[C%|/oracle/ora92/jdbc/lib/classes111_g.jar]
: zip:///[C%|/oracle/ora92/jdbc/lib/classes111.jar]
: zip:///[C%|/oracle/ora92/jdbc/lib/classes12_g.jar]
: zip:///[C%|/oracle/ora92/jdbc/lib/classes12.jar]

avatar
j*i
3
the return error code is 12505, right?

refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO

好像只要class12.jar就可以了,可是如果我只加这个,去掉别的,他就说找不到oracle.

【在 n********a 的大作中提到】
: Your connection string seems to be missing port number 1521.
: Try this as a start.
: jdbc:oracle:thin:@xxx.xxx.x.xx:1521:ipoll
:
: refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO
: 设
: 好像只要class12.jar就可以了,可是如果我只加这个,去掉别的,他就说找不到oracle.
: oracle.jdbc.driver.OracleDriver(););

avatar
w*l
4
Sorry that I miss 1521 when I put the code here. But actually I have it in my
program.

refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO

好像只要class12.jar就可以了,可是如果我只加这个,去掉别的,他就说找不到oracle.

【在 n********a 的大作中提到】
: Your connection string seems to be missing port number 1521.
: Try this as a start.
: jdbc:oracle:thin:@xxx.xxx.x.xx:1521:ipoll
:
: refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO
: 设
: 好像只要class12.jar就可以了,可是如果我只加这个,去掉别的,他就说找不到oracle.
: oracle.jdbc.driver.OracleDriver(););

avatar
w*l
5
sorry, what is the return error code?
is it the folling lines:
Io exception: Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO
DE=12505)(EMFI=4))))

refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO

好像只要class12.jar就可以了,可是如果我只加这个,去掉别的,他就说找不到oracle.

【在 j**i 的大作中提到】
: the return error code is 12505, right?
:
: refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO
: 我
: 好像只要class12.jar就可以了,可是如果我只加这个,去掉别的,他就说找不到oracle.

avatar
n*a
6
Ok, then check your network settings.
1. Is your listener running?
2. It seems that you are on Oracle 9i up, thus no need
to config listener.ora. Listener will detect instances
automatically. If this is not true, check listener.ora
first.
3. Can you connect with sqlplus @ipoll?
If not, check tnsnames.ora
4. If you are using advanced features like connection
manager or name servers instead of local naming, check
up the documentation to see if you have them configured
properly.

my
refused(DESCRIP

【在 w*******l 的大作中提到】
: Sorry that I miss 1521 when I put the code here. But actually I have it in my
: program.
:
: refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO
: 我
: 好像只要class12.jar就可以了,可是如果我只加这个,去掉别的,他就说找不到oracle.

avatar
j*i
7
I guess your are:
ORA-12505: TNS: listener could not resolve
SID given in connection description.
Though I don't know JDBC much.

refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CO

好像只要class12.jar就可以了,可是如果我只加这个,去掉别的,他就说找不到oracle.

【在 n********a 的大作中提到】
: Ok, then check your network settings.
: 1. Is your listener running?
: 2. It seems that you are on Oracle 9i up, thus no need
: to config listener.ora. Listener will detect instances
: automatically. If this is not true, check listener.ora
: first.
: 3. Can you connect with sqlplus @ipoll?
: If not, check tnsnames.ora
: 4. If you are using advanced features like connection
: manager or name servers instead of local naming, check

avatar
w*l
8
I think the listener is running. at least I can access database using SQL+.
It seems that I have to reconfigure the JDBC setup for Oracle 9i, differenct
from oracle 8. I downloaded the new driver and set up, but still errors
occured. Faint!!
PS: here is the listener.ora. Is there some error? Thanks a LOT!!
# LISTENER.ORA Network Configuration File:
C:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDR

【在 n********a 的大作中提到】
: Ok, then check your network settings.
: 1. Is your listener running?
: 2. It seems that you are on Oracle 9i up, thus no need
: to config listener.ora. Listener will detect instances
: automatically. If this is not true, check listener.ora
: first.
: 3. Can you connect with sqlplus @ipoll?
: If not, check tnsnames.ora
: 4. If you are using advanced features like connection
: manager or name servers instead of local naming, check

avatar
s*c
9
Connecting through SQLPlus does not mean listener is definitely up. Start the
listener specifically and see whether it works.

【在 w*******l 的大作中提到】
: I think the listener is running. at least I can access database using SQL+.
: It seems that I have to reconfigure the JDBC setup for Oracle 9i, differenct
: from oracle 8. I downloaded the new driver and set up, but still errors
: occured. Faint!!
: PS: here is the listener.ora. Is there some error? Thanks a LOT!!
: # LISTENER.ORA Network Configuration File:
: C:\oracle\ora92\network\admin\listener.ora
: # Generated by Oracle configuration tools.
: LISTENER =
: (DESCRIPTION_LIST =

avatar
j*i
10
try lsnrctl start to see?

the
SQL+.
differenct

【在 s*****c 的大作中提到】
: Connecting through SQLPlus does not mean listener is definitely up. Start the
: listener specifically and see whether it works.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。