zoukankan      html  css  js  c++  java
  • 项目启动后sqlSessionFactory获取不到创建数据库连接失败

    解决方式是访问的公司内部的测试数据库必须内网访问,修改了下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 as to 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

    常识性错误,写个笔记记录下

  • 相关阅读:
    Java数据处理,Map中数据转double并取小数点后两位
    19年7月份面试7家公司,整理的java面试题(答案自行百度解决,也是个学习的过程)
    2019阿里云面试题,竟然现场敲代码,现在的企业越来越实在了
    解决win10状态栏的搜索框无法搜索本地应用或无反应
    sql,按照时间排序,取前N条
    List数组排序
    阿里云的maven仓库 地址
    hashcode相等两个类一定相等吗?equals呢?相反呢?
    杂记
    java排序
  • 原文地址:https://www.cnblogs.com/404code/p/10823967.html
Copyright © 2011-2022 走看看