From a0fc0a42e235fbdf25289a0ce5c4c838b0257939 Mon Sep 17 00:00:00 2001 From: Leonard <Leonard@Leonard.Leo> Date: Mon, 15 Jun 2020 01:44:58 +0300 Subject: [PATCH] add exceptions --- exceptions.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/exceptions.md b/exceptions.md index 65fc8a09..553715e0 100644 --- a/exceptions.md +++ b/exceptions.md @@ -1,7 +1,13 @@ -# Persistence: +# Exceptions and Solutions + +## Persistence: ### Exception: java.lang.ClassCastException * stack trace: class org.hibernate.mapping.SingleTableSubclass cannot be cast to class org.hibernate.mapping.RootClass * Possible Solution: Remove @Id Tags from Subclasses. -### +### Exception: Unmapped class +* Solution: Add class to persistence mapping in META-INF/persistence.xml + +### Exception: Primary key violation +* Solution: an entity with this key already exists you idiot, change it! -- GitLab