zoukankan      html  css  js  c++  java
  • 常见错误分析-笔记

    常见错误分析-笔记

    案例1:

    案例2:

    案例3:

    案例4:


    Application Server was not connected before run configuration stop, reason: Unable to ping server at

    启动项目时报错:

    原因:tomcat的版本和Jdk的版本不匹配,尽量让jdk的版本和tomcat的版本一致!!


    案例5:

    Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependencyComparator()Ljava/util/Comparator;

    原因:使用maven搭建项目的时候pom.xml里面的包没有引用对,从新引入包!


    案例6:

    Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。

    1:出现上面的问题 :有可能是idea的编码格式不对:

        解决:idea中:file--》setting

     2:有可能你的xml文件没有消息头,或则消息头前面出现了空格:

     3:这个问题找了半天才发现:扫描mybatis的映射文件的时候没有具体到xml文件:

    错误的写法:

      

     正确的写法:


     案例7:

    Caused by: java.sql.SQLException: Access denied for user 'Administrator'@'localhost' (using password: YES)

    分析:

         使用maven搭建项目的时候:配置文件中加载数据库相关的资源的时候没有加载到;

    使用下面红框的方式加载就会出错,而使用下面我注释掉的就正确。

     加载数据代码:

     <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
            <property name="locations">
                <list>
                    <value>classpath*:jdbc.properties</value>
                </list>
            </property>
        </bean>

    案例八:

    使用maven搭建项目时:可能出现下面的问题:

    Artifact demo2:war exploded: Error during artifact deployment. See server log....................................

    在网上找了很久:发现下面的方法可以解决:

     

     

    执行: clean install -Dmaven.test.skip=true -Paliuat

     

     如果一次没有执行成功就多执行一下上面的方法,然后就可以了。


  • 相关阅读:
    函数的定义
    编码转换
    bytes类型
    用py操作文件(file类的功能)
    HASH哈希
    二进制、bit、 bytes
    POJ3225
    POJ1436
    HDU1394
    HDU1272
  • 原文地址:https://www.cnblogs.com/dw3306/p/9178994.html
Copyright © 2011-2022 走看看