geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MarWestermann <>
Subject Exception in using: @OneToMany with mappedBy
Date Tue, 07 Oct 2008 21:42:34 GMT


I have a question and I can't find the answer.
geronimo: 2.1.3
Java: 1.5.07 SE

I have some entities, where all the annotations are defined before the
getter-method. Some of the entities have a one-to-many relationship. But
when I use the mappedBy option, I get the following exception:

<openjpa-1.0.3-r420667:677674 nonfatal user error>
org.apache.openjpa.util.UserException: Type
"org.intersales.qsactive.helpdesk.ebeans.Supportcase" attempts to use both
field and property access. Only one access method is permitted.

Here comes an example:
First the class wich throws the exception:

public class Supportcase implements Serializable {

private int key;
private Collection<Customer>;
public int getKey() ...

public Collection<Customer> getCustomer()...

now the Customer-Class
public class Customer implements Serializable {

private int key;
private Supportcase supportcase;

public int getKey()...

public Supportcase getSupportCase()...

I think the problem is, that I use a field-access due to the mappedBy-Option
while the other settings are all made on the getter-methods. When I delete
the mappedBy-keywords, I don't get any exceptions (but for every relation
there is a mapping-table created)

Any advices?

Thanks Marco
View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message