org.hibernate.MappingException

tip

This might be an issue with the file location in the Spark submit command. Try it with "spark-submit --master spark://master:7077 hello_world_from_pyspark.py {file location}"

tip

Check if you've set a name in Application -> Run. If you didn't, the generated XML is gonna have missing information and then this exception will be thrown.

tip

You might've forgot to add a dependency or it's written wrong. Also, you might be using incompatible versions of Java and Hibernate. More on this here: https://goo.gl/SjSlRA

tip

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

tip

Check if you didn't forget to instantiate your topic in the kafka broker.

tip

NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.

tip

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

tip

jsp-api and servlet-api jars must NOT be deployed by your web app. They should be marked as provided but not deployed by your app.

tip

You need to add httpcore to your dependencies. Try adding version 4.3 or further.

tip

The server rejects all jars that already belong to the server runtime (such as tomcat-**.jar, servlet**.jar). Consider substituting the CORS filter you're using for this one: https://goo.gl/ctQ7Fs

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Old class name is hardcoded as an accessor for the field access type : org.hibernate.MappingException: could not find PropertyAccessor class: net.sf.hibernate.property.DirectPropertyAccessor at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:103) at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:128) at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:118) at org.hibernate.mapping.Property.getPropertyAccessor(Property.java:250) at org.hibernate.mapping.Property.getGetter(Property.java:240) at org.hibernate.tuple.PojoTuplizer.buildPropertyGetter(PojoTuplizer.java:231) at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:73) at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:53) at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:45) at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:208) at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:398) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:199) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1043) at org.jtopic.model.test.DBLessTestCase.setUp(DBLessTestCase.java:25) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186) Caused by: java.lang.ClassNotFoundException: net.sf.hibernate.property.DirectPropertyAccessor at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103) at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:100) ... 25 more
    via by Renat Zubairov,
  • Old class name is hardcoded as an accessor for the field access type : org.hibernate.MappingException: could not find PropertyAccessor class: net.sf.hibernate.property.DirectPropertyAccessor at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:103) at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:128) at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:118) at org.hibernate.mapping.Property.getPropertyAccessor(Property.java:250) at org.hibernate.mapping.Property.getGetter(Property.java:240) at org.hibernate.tuple.PojoTuplizer.buildPropertyGetter(PojoTuplizer.java:231) at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:73) at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:53) at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:45) at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:208) at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:398) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:199) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1043) at org.jtopic.model.test.DBLessTestCase.setUp(DBLessTestCase.java:25) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186) Caused by: java.lang.ClassNotFoundException: net.sf.hibernate.property.DirectPropertyAccessor at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103) at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:100) ... 25 more
    via by Renat Zubairov,
  • Problema classnotfound en Hibernate
    via by Jesus Calzado :),
  • Hibernate / Mailing Lists
    via by Unknown author,
  • Consider a simple orm.xml: <?xml version="1.0" encoding="UTF-8"?> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd" version="1.0"> <access>PROPERTY</access> <entity class="Foo"> <table name="FOO" /> </entity> </entity-mappings> The <access>PROPERTY</access> section appears to cause the following exception (JUnit part of the stack removed for clarity): javax.persistence.PersistenceException: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27) Caused by: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:107) at org.hibernate.property.PropertyAccessorFactory.getPojoPropertyAccessor(PropertyAccessorFactory.java:86) at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:53) at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:166) at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44) at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:114) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:418) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:223) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1213) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760) at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205) ... 19 more Caused by: java.lang.ClassNotFoundException: PROPERTY at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102) at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:104) ... 33 more
    via by Levi Purvis,
  • Consider a simple orm.xml: <?xml version="1.0" encoding="UTF-8"?> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd" version="1.0"> <access>PROPERTY</access> <entity class="Foo"> <table name="FOO" /> </entity> </entity-mappings> The <access>PROPERTY</access> section appears to cause the following exception (JUnit part of the stack removed for clarity): javax.persistence.PersistenceException: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27) Caused by: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:107) at org.hibernate.property.PropertyAccessorFactory.getPojoPropertyAccessor(PropertyAccessorFactory.java:86) at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:53) at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:166) at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44) at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:114) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:418) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:223) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1213) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760) at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205) ... 19 more Caused by: java.lang.ClassNotFoundException: PROPERTY at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102) at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:104) ... 33 more
    via by Levi Purvis,
  • Hibernate without J2EE server
    via by Marcelo Chong,
  • Hibernate without J2EE server
    via by lisa klag,
    • org.hibernate.MappingException: could not find PropertyAccessor class: net.sf.hibernate.property.DirectPropertyAccessor at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:103) at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:128) at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:118) at org.hibernate.mapping.Property.getPropertyAccessor(Property.java:250) at org.hibernate.mapping.Property.getGetter(Property.java:240) at org.hibernate.tuple.PojoTuplizer.buildPropertyGetter(PojoTuplizer.java:231) at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:73) at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:53) at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:45) at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:208) at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:398) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:199) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1043) at org.jtopic.model.test.DBLessTestCase.setUp(DBLessTestCase.java:25) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186) Caused by: java.lang.ClassNotFoundException: net.sf.hibernate.property.DirectPropertyAccessor at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103) at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:100) ... 25 more

    Users with the same issue

    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    zsamboki
    1 times, last one,
    Pilleo
    2 times, last one,
    kimihanif
    1 times, last one,
    1376 more bugmates