Hi,

i am trying to switch to James3 in Eclipse, and there are errors reported by 
eclipse inside the JPA mailbox project.

"The Java class for mapped type "MailboxMessage" must define a non-private 
zero-argument constructor"
"The Java class for mapped type 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMailboxMessage" 
must define a non-private zero-argument constructor"

The JPA JSR states:
The entity class must have a no-arg constructor. The entity class may have 
other constructors as well. The no-arg constructor must be public or protected.
http://download.oracle.com/otndocs/jcp/persistence-2_1-fr-spec/index.html
JSR -338 Final, Release 2.1, Page 23.
So the JPA standard is very strict on this.

This no-arg constructor may not be used directly by your implementation, but 
may be used by e.g. copying objects between remote processes, as I understand.
This may not be true for "openjpa", I don't know.

See also: 
http://stackoverflow.com/questions/2808747/why-does-jpa-require-a-no-arg-constructor-for-domain-objects

Is the maintainer of the project able to define "no-arg" constructors?


Project: apache-james-mailbox-jpa
Package: org.apache.james.mailbox.jpa.mail.model.openjpa

Greetings
Bernd.


Reply via email to