f.haeder.net

DayOfWeek not persisted without some work ...

I currently get this when I try to deploy my project:
org.eclipse.persistence.exceptions.ValidationException Exception Description: The type [class java.time.DayOfWeek] for the attribute [endDay]on the entity class [class org.mxchange.jcontactsbusiness.opening_times.BusinessOpeningTimes] is not a valid type for an enumerated mapping. The attribute must be defined as a Java enum.. Please see server.log for more details.

I'm trying to fix this by writing a AttributeConverter<DayOfWeek, String>.
converter dayofweek jpa persistince
I have found in on #thoughts-on-java.org (I don't like to link there, credits (based on hint): Thorben Janssen

Thank you.
No, that was not working (somewhy). So I had to write an "own" #enumeration DayOfTheWeek based on StackOverflow user's work Lombo:

[url]http://http://stackoverflow.com/questions/2243730/jpa-hibernate-embedded-and-enum[/url]
Oh, getting these:
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /common/applications/uploadFrame.jsf.

Reason: Error reading from remote server
If you have renamed your EJB's names don't forget to do a "Clean+Build" in your IDE and not just "Build" as this may leave some old stuff behind causing deployment problems.
Ah, the link didn't make it in: http://stackoverflow.com/questions/2243730/jpa-hibernate-embedded-and-enum
It is about #Hibernate and I use #EclipseLink here but still the enumeration can be used in #JPA to persist DayOfWeek "compatible" stamps.
newer older