EJB (Enterprise Java Beans) - JDODataStoreException - Insert into casos

 
Vista:

JDODataStoreException - Insert into casos

Publicado por Angus (2 intervenciones) el 04/08/2005 14:54:15
Hola,
estoy desarrollando una aplicación con EJB y me está dando el siguiente error:

********************************************
Bean 'CasosBean' method ejbSelectLastId: problems running JDOQL query.com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:SQL statement<insert into casos(Descripcion, FechaComunicacion, FechaResolucion, Id_Caso, Solucion, Id_TipodeCaso, Id_Sistema, Id_Contacto_abre) values ( ?, ?, ?, ?, ?, ?, ?, ?)> with input values:java.lang.String:prueba, java.sql.Timestamp:2005-08-18 14:57:52.767, java.sql.Timestamp:2005-08-26 14:57:52.767, java.lang.Integer:0, java.lang.String:prueba, java.lang.Integer:1, java.lang.Integer:1, java.lang.Integer:1.Please examine the SQLException for more information.NestedException: java.sql.SQLException: Cannot add or update a child row: a foreign key constraint failsFailedObjectArray: [com.cgi.ejb.CasosBean_1291471271_JDOState@17dacb8]
..............
...............
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.execute(QueryImpl.java:479) at com.cgi.ejb.CasosBean_1291471271_ConcreteImpl.ejbSelectLastId(CasosBean_1291471271_ConcreteImpl.java:550) at com.cgi.ejb.CasosBean.ejbHomeLastId(CasosBean.java:145)
********************************************

El problema surge porque la consulta sql que lanza contra la BBDD no tiene un campo el cual es obligatorio.

Muchas gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder