Skip to content

Common Issues and Troubleshooting

Devender Yadav edited this page Aug 31, 2017 · 3 revisions

Some common Exception:

1. persistence.xml not in the classpath

com.impetus.kundera.loader.PersistenceLoaderException: com.impetus.kundera.utils.InvalidConfigurationException: Could not find any META-INF/persistence.xml file in the classpath

Solution: Make sure you have META-INF/persistence.xml in your application classpath.

2. @Id is missing in Entity

com.impetus.kundera.validation.rules.RuleValidationException: com.impetus.kundera.entities.Person must have an @Id field.

Solution: Make sure you have @Id column in your entity.

3. Multiple @Id present in the Entity

com.impetus.kundera.validation.rules.RuleValidationException: com.impetus.kundera.entities.Person can only have 1 @Id field.

Solution: Make sure you have only 1 @Id column in your entity.

4. @Entity is missing in the Entity

Caused by: java.lang.IllegalArgumentException: Entity object is invalid, operation failed. Please check previous log message for details at com.impetus.kundera.validation.rules.NullOrInvalidEntityRule.validate(NullOrInvalidEntityRule.java:52)

Solution: Make sure you have added @javax.persistence.Entity in your entity.

5. No persistence unit found

javax.persistence.PersistenceException: No Persistence provider for EntityManager named xxxx at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:85)

Solution: Make sure persistence unit (which you used to create EntityManagerFactory) present in persistence.xml.

6. Cassandra Java version issue

java.lang.UnsupportedClassVersionError: org/apache/cassandra/thrift/InvalidRequestException : Unsupported major.minor version 52.0

Solution: Make sure you are using Java 8 with Kundera 3.5+ and Cassandra 3.x


For any other issues feel free to chat with us. Join the chat at https://gitter.im/impetus-opensource/Kundera

Clone this wiki locally