zoukankan      html  css  js  c++  java
  • mybatis 错误CGLIB is not available

    ### Error querying database. Cause: java.lang.IllegalStateException: Cannot enable lazy loading because CGLIB is not available. Add CGLIB to your classpath.
    ### The error may exist in letv/bdp/mapper/meta/IDbTableMapper.java (best guess)
    ### The error may involve letv.bdp.mapper.meta.IDbTableMapper.queryColsByTable-Inline
    ### The error occurred while setting parameters
    ### SQL: select * from bdp_data_relation_table_column rtc where rtc.table_id=?
    ### Cause: java.lang.IllegalStateException: Cannot enable lazy loading because CGLIB is not available. Add CGLIB to your classpath.

    今天用mybatis时出现的问题  使用到One注解 可能要动态反射吧

    出现问题的原因:1.未添加cglib包 2.未添加asm包 3.版本冲突 这两个包需要用以下对应版本配合 Spring 3.1.2   否则会引发:java.lang.IncompatibleClassChangeError: class net.sf.cglib.core.DebuggingClassWriter has interface org.objectweb.asm.ClassVisitor as super class

    修改pom文件

    <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib</artifactId>
                <version>2.2</version>
            </dependency>
    <dependency>
                <groupId>asm</groupId>
                <artifactId>asm</artifactId>
                <version>3.3.1</version>
            </dependency>
  • 相关阅读:
    爬取 qq,酷我,千千VIP音乐下
    window10虚拟机安装
    爬取qq,酷我,千千VIP音乐 上
    BEAUTIFUL SOUP
    多线程爬取与存储基础
    CODEFORCE ROUND #625 DIV2
    【POJ
    【POJ
    【POJ
    【POJ
  • 原文地址:https://www.cnblogs.com/Dhouse/p/5896826.html
Copyright © 2011-2022 走看看