Hibernate version: Hibernate 3 (JBoss 4.2.2GA)
Full stack trace of any exception that occurs:
Quote:
13:41:02,490 WARN [ServiceController] Problem starting service persistence.units:ear=Projekt.ear,jar=ProjektEJB.jar,unitName=projekt03
org.hibernate.AnnotationException: Column name manrSuffix of xx.Mitarb not found in JoinColumns.referencedColumnName
at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:306)
at org.hibernate.cfg.FkSecondPass.doSecondPass(FkSecondPass.java:64)
at org.hibernate.cfg.AnnotationConfiguration.processFkSecondPassInOrder(AnnotationConfiguration.java:428)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:286)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1233)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:869)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:407)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
Name and version of the database you are using: Oracle8i
Can anybody point out whats wrong with my code? I dont get it, I've tried some many variants of the JoinColumn annotation now. Also I tried using EmbeddedId (my cfg files are empty, I'm just using annotations)
Code:
@Embeddable
public class MitarbPK implements Serializable {
@Column(name="MANR", insertable=false, updatable=false)
private Mitarbstamm manr;
@Column(name="MANR_SUFFIX")
// ich hab hier schon vieles als ausprobiert ...
private int manrSuffix;
Code:
@Entity
@IdClass(MitarbPK.class)
public class Mitarb implements Serializable {
@Id
@Column(name="MANR")
private Mitarbstamm manr;
@Id
@Column(name="MANR_SUFFIX")
private int manrSuffix;