Error on creating first Hello world application using Spring mvc

前端 未结 2 1942
执笔经年
执笔经年 2021-01-12 11:55

First of all, I want to apologize for maybe duplicate topic but I couldn\'t find the answer to my question.

I started today with spring mvc and i have some issues wi

相关标签:
2条回答
  • 2021-01-12 12:18

    I ran into the same problem using the sample project from https://github.com/cheptsov/SpringMVCApp and changed the Spring Framework version to

    <spring.version>4.1.1.RELEASE</spring.version>
    

    in the pom.xml.

    0 讨论(0)
  • 2021-01-12 12:26

    The ClassReader class constructor shown in your stack trace has a piece of code commented in version 4+ (in other words, it's there in version 3)

    // checks the class version
    /* SPRING PATCH: REMOVED FOR JDK 1.8 BYTECODE COMPATIBILITY
    if (readShort(off + 6) > Opcodes.V1_7) {
        throw new IllegalArgumentException();
    }
    */
    

    Basically, you can't use Java 8 with Spring 3 (there is no Spring 3.5.0). Upgrade to Spring 4 or downgrade to Java 7.

    0 讨论(0)
提交回复
热议问题