我正在尝试通过在context.xml中声明Resources来将Tomcat设置为Oracle TCPS数据库连接。 我按照oracle文件 http://www.oracle.com/technetwork/topics/wp-oracle-jdbc-thin-ssl-130128.pdf
案例#2:使用SSL进行加密和服务器身份验证
<Resource auth="Container" maxIdle="30"
testOnBorrow="true"
validationQuery="select 1 from dual"
driverClassName="oracle.jdbc.OracleDriver"
password="tiger"
url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCPS)(HOST=host)(PORT=123)))(CONNECT_DATA=(SERVICE_NAME=sid)))"
removeAbandonedTimeout="60"
maxTotal="100"
username="scott"
logAbandoned="true" name="jdbc/myJNDI"
maxWaitMillis="1000"
javax.net.ssl.trustStore="/keystore.jks"
javax.net.ssl.trustStoreType="JKS"
javax.net.ssl.trustStorePassword="mykeystorepass"
removeAbandoned="true"
type="javax.sql.DataSource" />
当我开始时,我收到以下警告消息,而tomcat DBCP2完全忽略了与密钥库相关的属性。
有人遇到过类似的问题吗?或者我在这里做错了什么?
INFO: Name = myJNDI Ignoring unknown property: value of "/keystore.jks" for "javax.net.ssl.trustStore" property
org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance INFO: Name = myJNDI Ignoring unknown property: value of "JKS" for "javax.net.ssl.trustStoreType" property
org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance INFO: Name = myJNDI Ignoring unknown property: value of "mykeystorepass" for "javax.net.ssl.trustStorePassword" property
org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance INFO: Name = myJNDI Ignoring unknown property: value of "/keystore.jks" for "javax.net.ssl.trustStore" property