zoukankan      html  css  js  c++  java
  • idea 中web项目 用自带tomcat启动问题,

    严重: Exception sending context initialized event to listener instance of class com.zenointel.logserver.util.WebAppContextListener
    org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
    --- The error occurred in com/zenointel/logserver/dao/configdb/ConfigDB.xml.
    --- The error occurred while executing query.
    --- Check the select * from ltsservice.serviceconfig where id>1 .
    --- Check the SQL Statement (preparation failed).
    --- Cause: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
    --- The error occurred in com/zenointel/logserver/dao/configdb/ConfigDB.xml.
    --- The error occurred while executing query.
    --- Check the select * from ltsservice.serviceconfig where id>1 .
    --- Check the SQL Statement (preparation failed).
    --- Cause: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
    at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:124)
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
    at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212)
    at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:249)
    at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:296)
    at com.zenointel.logserver.dao.configdb.ConfigDBDaoImp.getServicesInfo(ConfigDBDaoImp.java:55)
    at com.zenointel.logserver.dao.configdb.ConfigDBDaoImp.initDB(ConfigDBDaoImp.java:179)
    at com.zenointel.logserver.util.WebAppContextListener.contextInitialized(WebAppContextListener.java:27)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1763)

    Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

    原因:自己推测,用idea 启动web项目时,会生成 一个artifacts 文件,此文件中也有一个web.xml ,而idea会去部署这个artifacts,就会导致这个错误;

    解决方法:删除artifacts 中的web.xml ,就解决了这个问题;

    很多事情不是看到希望才去坚持,而是坚持了才会看到希望
  • 相关阅读:
    JavaScript 的 Promise
    MacOS copy图标shell脚本
    ExtJS 修改load paging时的参数
    JSONP
    8种跨域解决方案
    Ext Store Proxy Ajax
    ExtJS 自定义组件
    MacOS Apache配置
    xshell 上传 下载文件
    shell 内网主机存活探测器
  • 原文地址:https://www.cnblogs.com/isisbenben/p/6553438.html
Copyright © 2011-2022 走看看