Caused by: java.lang.ClassNotFoundException: org.dom4j.io.STAXEventReader

后端 未结 5 1917
别跟我提以往
别跟我提以往 2020-12-11 12:59

I am developing a web service application but sessionFactory bean is not creating because of below error. I can\'t see duplicate or conflict version of dom4j jar. I tried va

5条回答
  •  隐瞒了意图╮
    2020-12-11 13:48

    Thanks to Hohenheim to point out the version issue.

    Hibernate core 5.1.0.Final include dom4j-1.6.1 jar which throws this error. To fix this, need to exclude dom4j-1.6.1 from hibernate-core and include dom4j-1.6 in your pom.

    I am not able find the exact reason why this is happening.

    This is how I excluded dom4j from pom in hibernate dependency.

    
        org.hibernate
        hibernate-core
        5.1.0.Final
        
            
                jta
                javax.transaction
            
            
            
                org.slf4j
                slf4j-api
            
            
            
                dom4j
                dom4j
            
        
    
    

提交回复
热议问题