Hi! I have tried delete my local_db and the problem persist.
The exception is in the next code, in the call of the build method
"RegFechaUsuario":

ControladorFecha cF = new ControladorFecha();
                System.out.println("nombre " + nuevaFecha.getNombre());
                System.out.println("fecha ini " + fechaOriginal.getFechaIni());
                System.out.println("fecha fin " + fechaOriginal.getFechaFin());
                System.out.println("idUsuario " + idUsuario);
                System.out.println("idFecha " + fechaOriginal.getId().getId());
                System.out.println("partidos " + nuevaFecha.getPartidos());
/*Here print in console:
na fecha 4
us id 7
nombre f1
fecha ini Fri Jan 01 00:00:00 UTC 2010
fecha fin Fri Jan 01 00:00:00 UTC 2010
idUsuario 7
idFecha 4
partidos [model.part...@973678]*/
                RegFechaUsuario regFechaUsuario = new
RegFechaUsuario(nuevaFecha.getNombre(),fechaOriginal.getFechaIni(),fechaOriginal.getFechaFin(),idUsuario,fechaOriginal.getId().getId(),nuevaFecha.getPartidos());
                cF.crearRegFechaUsuario(regFechaUsuario);

.....

The code of method:

public void crearRegFechaUsuario(RegFechaUsuario regFechaUsuario) {

                Transaction tx = pm.currentTransaction();
                try {
                        tx.begin();
                        //here is exception
                        pm.makePersistentAll(regFechaUsuario);
                        tx.commit();
                } finally {
                        // pm.close();
                        if (tx.isActive()) {
                                tx.rollback();
                        }
                }

        }

Regards and thanks-

On 25 sep, 18:35, andy stevko <[email protected]> wrote:
> Hi Lisandro,
> Perhaps you didn't understand my last line of reasoning re: is your
> datastore empty...
> I suspect that the schema for your classes has migrated - i.e. a member that
> was Long and is now String or vice-versa
>
> A close read of the datastore docs 
> says:http://code.google.com/appengine/docs/java/datastore/dataclasses.html
>
> If an entity has a property whose value is of a different type than the
> corresponding field in the object, JDO attempts to cast the value to the
> field type. If the value cannot be cast to the field type, JDO throws a
> ClassCastException. In the case of numbers (long integers and double-width
> floats), the value is converted, not cast. If the numeric property value is
> larger than the field type, the conversion overflows without throwing an
> exception.
>
> --Andy
>
> On Sat, Sep 25, 2010 at 1:40 PM, lisandrodc <[email protected]> wrote:
> > Hi! Andy I can't change the type of a member from String to Long
> > becasue
> > it is an internal error of datanucleus in google apps, I I do not find
> > way of solving it.
> > All the exception is:
>
> > Problem accessing /Prode/JugarFecha.action. Reason:
>
> >    java.lang.Long cannot be cast to java.lang.String
>
> > Caused by:
>
> > java.lang.ClassCastException: java.lang.Long cannot be cast to
> > java.lang.String
> >        at
>
> > org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:
> > 202)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to