Hibernate NoSuchFieldError INSTANCE but only with Struts 1?

前端 未结 3 758
野性不改
野性不改 2021-01-07 19:10

I\'m new to Java and Hibernate (being a Rails and C# developer). Anyway, I have a test program that works fine with Hibernate but my actual web app (Struts 1) crashes with:

3条回答
  •  执笔经年
    2021-01-07 19:34

    @axtavt says right. I know you already solved the problem, I post my comments as it might be helpful to other people.

    If you are using maven dependencies, say you already have your own hibernate dependency. And later, another dependency (like org.codehaus.jackson or drools-spring) is added to the pom. It might cause this error because org.codehaus.jackson and drools-spring have their own dependency on a different version hibernate. exclude hibernate when you add org.codehaus.jackson or drools-spring would solve the prob.

提交回复
热议问题