java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
localhost:1521:XEcon = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "ty", "ty");
 
大伙帮帮忙 我用的事oracle xe