java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context

前端 未结 4 1238
故里飘歌
故里飘歌 2020-12-31 05:03

I\'m using maven_spring 3.1.M2 + hibernate 3.5. Once I put the line in my applicationcontex xml file, the follwoing error will oc

相关标签:
4条回答
  • 2020-12-31 05:47

    I had the same issue, And solution is the Spring jars Now it depends on person to person which spring jar his project is using and actually which one is missing. For me it happened 3-4 times when I created project. Sometime I had all Spring jar but not the Spring.jar Next time Spring Aspect jar was missing. while some other time I had make sure of all but missed security. But I always fixed it by carefully placing the Spring jars. No need to look for any other reason.

    Hope that help and focus on only Spring jars and not others. Happy Coding guys!!

    0 讨论(0)
  • 2020-12-31 05:54

    I faced this issue when using both jersey-spring3 and spring-core. The jersey-spring3.jar, uses its own version for Spring libraries, so to use the ones you want, you need to exclude these libraries manually.

    <dependency>
            <groupId>org.glassfish.jersey.ext</groupId>
            <artifactId>jersey-spring3</artifactId>
            <version>2.22.1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-web</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-beans</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>bean-validator</artifactId>
                    <groupId>org.glassfish.hk2.external</groupId>
                </exclusion>
            </exclusions>
        </dependency>
    
    0 讨论(0)
  • 2020-12-31 05:56

    Do you have AspectJ in your pom.xml or in your lib-directory?

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>3.1.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
        <version>${aspectj.version}</version>
    </dependency>
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjweaver</artifactId>
        <version>${aspectj.version}</version>
    </dependency>
    

    I had the same error and this solved my problem.

    0 讨论(0)
  • 2020-12-31 06:00

    resolve conflict version the spring dependencies in pom.xml , may be in various version change class name or add feature that in other dependencies has incompatibility.

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