dimanche 21 décembre 2014

java reflection. Can not set java.lang.Long field model.vo.Student.name to java.lang.Class

why the following code:



Field idField = t.getDeclaredField("id");
idField.setAccessible(true);

Long o= (Long)idField.get(t);


has the problem Caused by: java.lang.IllegalArgumentException: Can not set java.lang.Long field model.vo.Student.name to java.lang.Class


and the id is the Long type






Aucun commentaire:

Enregistrer un commentaire