I have next code, and I cant access the Object TipoPago, Can you help me??
o.setDescripcion(asiento.getDescripcion().trim());
if( asiento.getIdTipoPago() != null)
[b]o.setTipoPago(new TipoPago(asiento.getIdTipoPago()) );[/b]
in above snip of code was error.
@MappedSuperclass
public abstract class AbstractDefPoliza implements java.io.Serializable {
// Fields
@Id
@Column(name = "id_def_poliza", unique = true, nullable = false, insertable = false, updatable = true)
@GeneratedValue (strategy=GenerationType.IDENTITY)
private Integer idDefPoliza;
.....
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, mappedBy = "defPoliza")
private Set<AsientosContables> asientosContableses = new HashSet<AsientosContables>(
0);
@MappedSuperclass
public abstract class AbstractAsientosContables implements java.io.Serializable {
// Fields
@EmbeddedId
private AsientosContablesId id;
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "id_def_poliza", unique = false, nullable = false, insertable = true, updatable = false)
private DefPoliza defPoliza;
[b]@ManyToOne(cascade = {}, fetch = FetchType.EAGER)
@JoinColumn(name = "id_tipo_pago", unique = false, nullable = true, insertable = true, updatable = true)
private TipoPago tipoPago;[/b]
[#|2008-08-07T17:50:23.250-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=17;_ThreadName=httpSSLWorkerThread-1388-0;_RequestID=900659ce-df3c-4efd-8b93-ffe89f4feb37;|StandardWrapperValve[default]: PWC1406: Servlet.service() for servlet default threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: java.lang.NoSuchMethodError: com.telcel.gscrm.dssc.ecajas.ejb.entity.abstractBase.AbstractAsientosContables._toplink_settipoPago(Lcom/telcel/gscrm/dssc/ecajas/ejb/entity/TipoPago;)V
at com.telcel.gscrm.dssc.ecajas.ejb.entity.abstractBase.AbstractAsientosContables.setTipoPago(AbstractAsientosContables.java:115)
at com.telcel.gscrm.dssc.ecajas.business.serviciocontabilizador.DefinicionPolizaBusinessDelegateImpl.createEntity(DefinicionPolizaBusinessDelegateImpl.java:248)
at com.telcel.gscrm.dssc.ecajas.business.serviciocontabilizador.DefinicionPolizaBusinessDelegateImpl.insert(DefinicionPolizaBusinessDelegateImpl.java:49)
at com.telcel.gscrm.dssc.ecajas.action.serviciocontabilizador.DefinicionPolizaAction.saveDefPoliza(DefinicionPolizaAction.java:207)
... 127 more
[Message sent by forum member 'ing_filihc' (ing_filihc)]
http://forums.java.net/jive/thread.jspa?messageID=292215