V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
recordnow
V2EX  ›  Java

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

  •  
  •   recordnow · 2017-09-29 17:51:51 +08:00 · 3375 次点击
    这是一个创建于 2371 天前的主题,其中的信息可能已经有所发展或是发生改变。

    原项目: 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 条回复    2017-11-16 08:44:13 +08:00
    wintersun
        1
    wintersun  
       2017-09-29 18:32:27 +08:00
    我本领不够,看不出问题要如何解决。

    建议:清空业务代码,保留项目框架(能运行,有界面,能读写数据库),上传到 github 一类的公开平台,让帮助者下载运行和调试,毕竟与环境依赖高度相关!
    paradoxs
        2
    paradoxs  
       2017-09-29 18:33:52 +08:00
    这些东西 很难调的..
    cxzl25
        3
    cxzl25  
       2017-09-29 18:58:45 +08:00   ❤️ 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  
       2017-09-29 20:38:23 +08:00
    spring 2,我觉得匹配 jdk8 可能性不大。。。 赶紧升 4 ~
    hqtc
        5
    hqtc  
       2017-09-29 20:39:42 +08:00
    哦,还有 ibatis 啊。。。没看到不好意思。楼上上方法看样子靠谱
    yidinghe
        6
    yidinghe  
       2017-09-29 21:32:34 +08:00 via Android
    这时候通常会重新做一套吧。
    winglight2016
        7
    winglight2016  
       2017-09-30 11:16:23 +08:00
    @yidinghe 是啊,这种情况是无解的,所以我从不考虑使用 spring
    recordnow
        8
    recordnow  
    OP
       2017-11-16 08:44:13 +08:00
    @cxzl25 万份感谢,这个完美解决了 spring3.x 及 spring4.x 兼容 ibatis 的问题。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5132 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:43 · PVG 17:43 · LAX 02:43 · JFK 05:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.