V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
recordnow
V2EX  ›  Java

项目升级 jdk 后启动报错求支招

  •  
  •   recordnow · Sep 29, 2017 · 4484 views
    This topic created in 3133 days ago, the information mentioned may be changed or developed.

    原项目: jdk1.5+spring2.5.6+ibatis2.3.0,用到 aop,使用的 aspectjweaver 为 1.5.2,运行在 weblogic10.3.6。

    现有需求必须要把项目的 jdk 升级到 1.8,同时 ibatis 要继续能用,项目有点大了,转成其他是不现实的。

    首先解决了 jdk1.8 与 spring2.5.6 的兼容问题,修改 org.springframework.core.JdkVersion 增加了 jdk1.8 的支持。

    然后在 tomcat8 或 weblogic12 中启动报错:

    error at ::0 can't find referenced pointcut pointcut

    升级 aspectjweaver 到最新的 1.8.10 ,依然报这个错,当然也尝试过 aspectjweaver 的 1.6.x,1.7.x 版本问题依旧。

    升级 spring 到 3.x 版本,还是这个错。

    升级 spring 到 4.x 版本,但 spring-orm 这个 jar 包要保留为 2.5.6 或者 3.x 版本,因为 4.x 版本移除了对 ibatis 的支持。但也是报同样的错。

    求支招,看如何把项目的 jdk 升级到 1.8 ?先谢谢大家了!

    8 replies    2017-11-16 08:44:13 +08:00
    wintersun
        1
    wintersun  
       Sep 29, 2017
    我本领不够,看不出问题要如何解决。

    建议:清空业务代码,保留项目框架(能运行,有界面,能读写数据库),上传到 github 一类的公开平台,让帮助者下载运行和调试,毕竟与环境依赖高度相关!
    paradoxs
        2
    paradoxs  
       Sep 29, 2017
    这些东西 很难调的..
    cxzl25
        3
    cxzl25  
       Sep 29, 2017   ❤️ 1
    The Mybatis 'ibatis-spring' module is a copy from spring 3.2.x as a shaded module in order to allow users using ibatis to freely upgrade to spring4 without having a hard dependency on upgrading ibatis in the process.

    https://github.com/mybatis/ibatis-spring

    <dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis-2-spring</artifactId>
    <version>1.0.3</version>
    </dependency>


    https://stackoverflow.com/questions/32353286/no-support-for-ibatis-in-spring4-2-0
    hqtc
        4
    hqtc  
       Sep 29, 2017
    spring 2,我觉得匹配 jdk8 可能性不大。。。 赶紧升 4 ~
    hqtc
        5
    hqtc  
       Sep 29, 2017
    哦,还有 ibatis 啊。。。没看到不好意思。楼上上方法看样子靠谱
    yidinghe
        6
    yidinghe  
       Sep 29, 2017 via Android
    这时候通常会重新做一套吧。
    winglight2016
        7
    winglight2016  
       Sep 30, 2017
    @yidinghe 是啊,这种情况是无解的,所以我从不考虑使用 spring
    recordnow
        8
    recordnow  
    OP
       Nov 16, 2017
    @cxzl25 万份感谢,这个完美解决了 spring3.x 及 spring4.x 兼容 ibatis 的问题。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5988 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 02:16 · PVG 10:16 · LAX 19:16 · JFK 22:16
    ♥ Do have faith in what you're doing.