Salut,

J'obtiens cette erreur lors de la génération de mon EAR:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
Reason: org.hibernate.AnnotationException: @OneToOne or @ManyToOne on ejb.product.ProductBean.store references an unknown entity: ejb.store.Store
Si je supprime la classe ProductBean (avec Product), tout se passe bien, et les Stores fonctionnent.

Voici le code de cette classe :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@Entity
public class ProductBean implements Product, Serializable {
 
    private static final long serialVersionUID = 1L;
 
    @Id
    @GeneratedValue
    private int id;
 
    private String name;
    private int price;
    @ManyToOne
    private Store store;
    private String description;
 
    public ProductBean() {}
 
    public ProductBean(String name, int price, Store store, String description) {
        this.name = name;
        this.price = price;
        this.store = store;
        this.description = description;
    }
 
    public String getDescription() {
        return description;
    }
 
    public String getName() {
        return name;
    }
 
    public int getPrice() {
        return price;
    }
 
    public int getId() {
        return id;
    }
 
    public Store getStore() {
        return store;
    }
 
    public void setDescription(String description) {
        this.description = description;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public void setPrice(int price) {
        this.price = price;
    }
 
    public void setStore(Store store) {
        this.store = store;
    }
 
}
Si je vire @OneToMany, j'ai un MappingException...