The enum constant . reference cannot be qualified in a case label

That's a very strange error, since the solution is quiet simple : juste remove the enum class name!

As an example :

public enum DAYS {
MONDAY,
THURSDAT,
WEDNESDAT,
...;
}

When you want to use this enum as a switcher case values, like this :

switch (myValue) {
case DAYS.MONDAY :
break;
....
}
you got this error :

The enum constant DAYS.MONDAY reference cannot be qualified in a case label

Seems weird, but just remvoe "DAYS" and move on.

ERROR [STDERR] java.lang.IllegalStateException: Illegal to call this method from injected, managed EntityManager

Got this error while trying to create a new entity? just remove the use of transaction. em.persist doesn't need it.

em.getTransaction().begin();
em.persist(entity);
em.getTransaction().commit();