項目啟動後sqlSessionFactory獲取不到創建數據庫連接失敗
阿新 • • 發佈:2019-05-07
web app 修改 常識 stack create druid see ESS oracl
解決方式是訪問的公司內部的測試數據庫必須內網訪問,修改了下properties文件中的jdbcUrl就OK了
1、老規矩獻上報錯(數據庫鏈接地址已經用****表示)
信息: Illegal access: this web application instance has been stopped already. Could not load oracle.net.mesg.Message. The eventual following stack trace is caused by an error thrown for debugging purposes as well asto attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2566) at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1436) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1400) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1354) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1354) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1354) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1354) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1296) at java.util.ResourceBundle.getBundle(ResourceBundle.java:721) at oracle.net.ns.Message11.getMessage(Unknown Source) at oracle.net.ns.NetException.getMessage(Unknown Source) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:865) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:268) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:148) at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:211) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:142) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1410) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1464) at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1969) 五月 07, 2019 9:54:24 上午 org.apache.catalina.loader.WebappClassLoader findResourceInternal 信息: Illegal access: this web application instance has been stopped already. Could not load oracle/net/mesg/Message.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. 五月 07, 2019 9:54:24 上午 org.apache.catalina.loader.WebappClassLoader loadClass
息: Illegal access: this web application instance has been stopped already. Could not load oracle/net/mesg/Message_zh_CN.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. 五月 2019-05-07 09:54:24,112 ERROR [com.alibaba.druid.pool.DruidDataSource] - create connection error, url: jdbc:oracle:thin:@***.**.**2:1522/orcl, errorCode 17002, state null java.sql.SQLException: Io 異常: Message file ‘oracle.net.mesg.Message‘ is missing. at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:148) at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:211) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:142) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1410) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1464) at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1969) 07, 2019 9:54:24 上午 org.apache.catalina.loader.WebappClassLoader loadClass
2、修改properties文件
jdbc.url=jdbc:oracle:thin:@192.168.2.9:1521/orcl
常識性錯誤,寫個筆記記錄下
項目啟動後sqlSessionFactory獲取不到創建數據庫連接失敗