driver =oracle.jdbc.OracleDriver
url =jdbc:oracle:thin:@localhost:1521:orcl?useUnicode=true&characterEncoding=utf8
username =jsd1303
password =jsd1303
为什么加上?useUnicode=true&characterEncoding=utf8就会报错啊,不加上我就能获取到,还有就是,原先没用这个命令时MYEclipse 打印con时,是那种乱七八糟的东西,好像是unicode吧,
今天加上这个虽然报错,可是我再删除?useUnicode=true&characterEncoding=utf8后
再 打印 con 竟然是正常的那种字符
jdbc:oracle:thin:@localhost:1521:orcl, UserName=JSD1302, Oracle JDBC driver
好奇怪,为什么啊
=========================
下面是报错的信息(加上?useUnicode=true&characterEncoding=utf8
),不加不报错
Exception in thread "main" org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (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:orcl?useUnicode=true&characterEncoding=utf8
)