最近,我在使用jdbc连接oracle 据库时,发生如下错误:
TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
26-JAN-2013 15:04:10 * (CONNECT_DATA=(SID=xhhdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.102.67)(PORT=28230)) * establish * xhhdb * 12505
TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
26-JAN-2013 15:04:11 * (CONNECT_DATA=(SID=xhhdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.102.67)(PORT=28232)) * establish * xhhdb * 12505
TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
26-JAN-2013 15:04:11 * (CONNECT_DATA=(SID=xhhdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.102.67)(PORT=28233)) * establish * xhhdb * 12505
26-JAN-2013 15:04:10 * (CONNECT_DATA=(SID=xhhdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.102.67)(PORT=28230)) * establish * xhhdb * 12505
TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
26-JAN-2013 15:04:11 * (CONNECT_DATA=(SID=xhhdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.102.67)(PORT=28232)) * establish * xhhdb * 12505
TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
26-JAN-2013 15:04:11 * (CONNECT_DATA=(SID=xhhdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.102.67)(PORT=28233)) * establish * xhhdb * 12505
Jan 26, 2013 3:04:25 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jan 26, 2013 3:04:25 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [net.sf.ehcache.CacheManager@366aa95b] but has failed to stop it. This is very likely to create a memory leak.
Jan 26, 2013 3:04:25 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Store themeUriCache Spool Thread] but has failed to stop it. This is very likely to create a memory leak.
Jan 26, 2013 3:04:25 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Store goods_cat Spool Thread] but has failed to stop it. This is very likely to create a memory leak.
SEVERE: The web application [] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jan 26, 2013 3:04:25 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [net.sf.ehcache.CacheManager@366aa95b] but has failed to stop it. This is very likely to create a memory leak.
Jan 26, 2013 3:04:25 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Store themeUriCache Spool Thread] but has failed to stop it. This is very likely to create a memory leak.
Jan 26, 2013 3:04:25 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Store goods_cat Spool Thread] but has failed to stop it. This is very likely to create a memory leak.
----解决办法,经查找,以上的bbcd并不是sid_name,而是SERVICE_NAME
修改成sid_name后,程序正常。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8541492/viewspace-753378/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8541492/viewspace-753378/