java web连接Oracle12c 报 没有匹配的身份验证协议

之前连接本地11g的数据库没问题,连接12c报错信息如下:
ERROR [com.njry.util.DBHelper:294]- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-28040: No matching authentication protocol
)
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-28040: No matching authentication protocol
)
1
2
ERROR [com.njry.util.DBHelper:294]- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-28040: No matching authentication protocol
)
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-28040: No matching authentication protocol
)

配置:jdk 1.6 tomcat7
首先,数据库是远程库,我动不了
然后根据网上的提示,找到了如下方法:
1.ojdbc14.jar替换成 ojdbc6.jar;
2.把数据库12c下的jar包替换到Java里,然后把Java项目里的sqljdbc.jar删掉
但是都没法用。

所以请教一下,麻烦描述的详细一下。

修改文件即可解决:

$ORACLE_HOME/network/admin/sqlnet.ora

加入如下:
SQLNET.ALLOWED_LOGON_VERSION=8

jdk 1.6版本低吧,建议换成1.7,https://download.csdn.net/download/xcgh/10577150,使用这个驱动。