java.sql.SQLException: Listener refused the connection with the following error:

解决办法:

http://stackoverflow.com/questions/6805705/java-oracle-localhost-connection-error-ora-12505

When the database instance starts up, it will register itself with the TNS listener. However, if there's no listener to register with, it can't do this. When the listener starts up, it doesn't check to see whether the instances it knows about have started up.



解决要点:

1、conn /as sysdba
2、alter system  register


你可能感兴趣的:(oracle)