请问高手!一个有关JDBC的问题

candy
03-07-15 2 338

我想用JB7编写一个Entity Bean,在import schema from database时遇到一个问题.如下:在Database Schema Provider中是这样:
Driver:Oracle.jdbc.driver.OracleDriver,URL:jdbc:oracle:thin:@本机IP地址:1521:ORCL,然后是用户名,密码
我想知道这里的用户名和密码是否是指登陆Oracle数据库的用户名和密码呢?
我自认为是这样,所以用户名为system,密码为manager,但是结果却连不上,报这样的错:
See com.borland.dx.dataset.DataSetException error code: BASE+66

com.borland.dx.dataset.DataSetException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

at com.borland.dx.dataset.DataSetException.a(Unknown Source)
at com.borland.dx.dataset.DataSetException.throwException(Unknown Source)

at com.borland.dx.dataset.DataSetException.SQLException(Unknown Source)

at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)

at com.borland.jdbcx.metadata.DatabaseInfo.openConnection(Unknown Source)

at com.borland.jdbcx.metadata.e.run(Unknown Source)

Chained exception:

java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)

at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:263)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)

at java.sql.DriverManager.getConnection(DriverManager.java:517)

at java.sql.DriverManager.getConnection(DriverManager.java:177)

at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)

at com.borland.jdbcx.metadata.DatabaseInfo.openConnection(Unknown Source)

at com.borland.jdbcx.metadata.e.run(Unknown Source)

java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)

at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:263)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)

at java.sql.DriverManager.getConnection(DriverManager.java:517)

at java.sql.DriverManager.getConnection(DriverManager.java:177)

at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)

at com.borland.jdbcx.metadata.DatabaseInfo.openConnection(Unknown Source)

at com.borland.jdbcx.metadata.e.run(Unknown Source)
请问有哪位知道错在什么地方?谢谢

ah_cai
2003-07-15 15:37

SID是否正确?

candy
2003-07-15 16:31

谢谢您的提示,我已经解决问题啦!:)