Hello,

I'm trying to understand the inner working of tapestry, and more precisely
the way the "t:formdata" hidden field is used. For this, i'm trying to
unserialize and instanciate a t:formdata field, saved from a simple form
validation, with the following code :

       try {   
                System.out.println("componentId : " + ois.readUTF());
                ComponentAction action = (ComponentAction) ois.readObject();

                } catch (ClassNotFoundException e)
                 {

                        e.printStackTrace();
                 }

         }

As a result, the ois.readUTF()  statement succeeds to complete, as the
println shows, but the readObject (or cast) fails with a
ClassNotFoundException :

componentId : Index:texte
java.lang.ClassNotFoundException:
org.apache.tapestry5.corelib.base.AbstractField$Setup
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at
java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:621)
        at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1592)
        at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749)
        at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
        at Decap.main(Decap.java:107)


The packages containing the AbstractField class is include,  though :

import org.apache.tapestry5.corelib.base.AbstractField;
import org.apache.tapestry5.ComponentAction;


Would anyone have an idea why the instanciation fails ?

Thanks !

For information, the form template is the following :


        
        
        



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t-formdata-readObject-and-instanciation-problem-tp4297644p4297644.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to