ClassNotFoundException: org.hibernate.service.jndi.JndiException

前端 未结 4 1759
轮回少年
轮回少年 2020-12-19 01:02

I\'m getting the following stack trace...

java.lang.ClassNotFoundException: org.hibernate.service.jndi.JndiException
    java.net.URLClassLoader$1.run(Unknow         


        
相关标签:
4条回答
  • 2020-12-19 01:05

    I would try to resolve the ClassNotFoundException first. The error message should give you a better idea about what's wrong.

    In order to do that check the version numbers of your hibernate-core lib and your hibernate-entitymanager lib. Also make sure your hibernate version is not conflicting with the jboss hibernate version.

    0 讨论(0)
  • 2020-12-19 01:07

    İf you are using hibernate-core & hibernate-entitymanager in your pom.xml, They must mu same version. I tried this and solved.

     <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>4.1.9.Final</version>
        </dependency>
    
    
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.1.9.Final</version>
        </dependency>
    
    0 讨论(0)
  • 2020-12-19 01:19

    I overwrote the version of hibernate-entitymanager to be the same as hibernate-core. fixed.

    0 讨论(0)
  • 2020-12-19 01:22

    There could be 2 reasons:

    1: an appropriate hibernate lib which contains the JNDIException is missing within the classpath

    2: There is a version conflict between duplicate hibernate.jars. This can happen if one tries to deploy an application within a JEEContainer (server) which already provides the same library but with a different version.

    When the JNDIException class can be resolved than your main problem becomes apparent within the error message.

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