NoSuchMethod - sufix _vh [message #655199] |
Fri, 18 February 2011 15:51 |
Mauro Flores Messages: 84 Registered: September 2009 Location: Brasil |
Member |
|
|
I have the folowing onetoone relationship: OcorrenciaED - OcorrenciaVinculoED. It works fine with FetchType.EAGER. When I change to LAZY and run a select over OcorrenciaED I get:
NoSuchMethodException: teste.ed.OcorrenciaED._persistence_getocorrenciaVinculoED_vh ()
The method getOcorrenciaVinculoED exists, but the one with suffix 'vh' doesn't.
Thaks for some hint.
Excerpt of the entity
@Entity
@Table(name = "KICC66D")
@IdClass(OcorrenciaPK.class)
public class OcorrenciaED {
...
@OneToOne(fetch=FetchType.LAZY)
@JoinColumns( { @JoinColumn(name = "K66_ORG_REG", referencedColumnName = "K74_ORG_REG", insertable = false, updatable = false), @JoinColumn(name = "K66_AA_REGISTRO", referencedColumnName = "K74_AA_REGISTRO", insertable = false, updatable = false), @JoinColumn(name = "K66_NRO_INT", referencedColumnName = "K74_NRO_INT", insertable = false, updatable = false) })
private OcorrenciaVinculoED ocorrenciaVinculoED;
..
}
Complete Exception
Caused by: org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions:
---------------------------------------------------------
Exception [EclipseLink-60] (Eclipse Persistence Services - 1.2.0.v20091016-r5565): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The method [_persistence_setocorrenciaVinculoED_vh] or [_persistence_getocorrenciaVinculoED_vh] is not defined in the object [teste.ed.OcorrenciaED].
Internal Exception: java.lang.NoSuchMethodException: teste.ed.OcorrenciaED._persistence_getocorrenciaVinculoED_vh ()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[ocorrenciaV inculoED]
Descriptor: RelationalDescriptor(teste.ed.OcorrenciaED --> [DatabaseTable(KICC66D)])
Runtime Exceptions:
---------------------------------------------------------
java.lang.NullPointerException
at org.eclipse.persistence.internal.sessions.DatabaseSessionImp l.initializeDescriptors(DatabaseSessionImpl.java:478)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImp l.initializeDescriptors(DatabaseSessionImpl.java:406)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImp l.postConnectDatasource(DatabaseSessionImpl.java:671)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImp l.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryPro vider.login(EntityManagerFactoryProvider.java:231)
... (12 lines)
at weblogic.deployment.TransactionalEntityManagerProxyImpl$Quer yImpl.getResultList(TransactionalEntityManagerProxyImpl.java :224)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03084 seconds