tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <tapestry-...@jakarta.apache.org>
Subject [jira] Assigned: (TAPESTRY-650) ClassNotFoundException thrown when deserializing an object from a client persistent property
Date Sat, 01 Oct 2005 17:20:48 GMT
     [ http://issues.apache.org/jira/browse/TAPESTRY-650?page=all ]

Howard M. Lewis Ship reassigned TAPESTRY-650:
---------------------------------------------

    Assign To: Howard M. Lewis Ship

> ClassNotFoundException thrown when deserializing an object from a client persistent property
> --------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-650
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-650
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: Windows XP
>     Reporter: Kent Tong
>     Assignee: Howard M. Lewis Ship

>
> An object of a class defined in a web-app can be serialized to be stored as a client
persistent property, but when it is deserialized, a ClassNotFoundException is thrown. It works
fine if a session persistent property is used instead. The Tapestry and Hivemind jar files
are put into c:\tomcat\shared\lib. A test case is shown below.
> P1.html is:
> <html>
> value is: <span jwcid="@Insert" value="ognl:foo.n"/>
> <form jwcid="form">
> 	<input type="submit" value="OK"/>
> </form>
> </html>
> P1.page is:
> <?xml version="1.0"?>
> <!DOCTYPE page-specification PUBLIC
>   "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
>   "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> <page-specification>
> 	<component id="form" type="Form">
> 		<binding name="listener" value="listener:onSubmit"/>
> 	</component>
> </page-specification>
> P1.java is:
> public abstract class P1 extends BasePage implements PageBeginRenderListener {
> 	@Persist("client")
> 	public abstract Foo getFoo();
> 	public abstract void setFoo(Foo foo);
> 	public void pageBeginRender(PageEvent event) {
> 		if (getFoo() == null) {
> 			setFoo(new Foo());
> 		}
> 	}
> 	public void onSubmit() {
> 		getFoo().n++;
> 	}
> }
> Foo.java is:
> public class Foo implements Serializable {
> 	private static final long serialVersionUID = 8812267940530652652L;
> 	public int n = 0;
> 	
> 	public int getN() {
> 		return n;
> 	}
> }
> The stack trace is:
> org.apache.hivemind.ApplicationRuntimeException: An exception occured decoding the MIME
data stream: com.ttdev.customerCRUD.Foo
> java.lang.ClassNotFoundException: com.ttdev.customerCRUD.Foo
> # java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> # java.security.AccessController.doPrivileged(Native Method)
> # java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> # java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> # java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> # java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> # java.lang.Class.forName0(Native Method)
> # java.lang.Class.forName(Class.java:242)
> # java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:574)
> # java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
> # java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
> # java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
> # java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
> # java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
> # org.apache.tapestry.record.PersistentPropertyDataEncoderImpl.readChangesFromStream(PersistentPropertyDataEncoderImpl.java:176)
> # org.apache.tapestry.record.PersistentPropertyDataEncoderImpl.decodePageChanges(PersistentPropertyDataEncoderImpl.java:129)
> # org.apache.tapestry.record.PersistentPropertyData.getPageChanges(PersistentPropertyData.java:68)
> # org.apache.tapestry.record.ClientPropertyPersistenceStrategy.getStoredChanges(ClientPropertyPersistenceStrategy.java:113)
> # $PropertyPersistenceStrategy_1066d1ad022.getStoredChanges($PropertyPersistenceStrategy_1066d1ad022.java)
> # $PropertyPersistenceStrategy_1066d1ad023.getStoredChanges($PropertyPersistenceStrategy_1066d1ad023.java)
> # org.apache.tapestry.record.PropertyPersistenceStrategySourceImpl.getAllStoredChanges(PropertyPersistenceStrategySourceImpl.java:73)
> # $PropertyPersistenceStrategySource_1066d1acf92.getAllStoredChanges($PropertyPersistenceStrategySource_1066d1acf92.java)
> # org.apache.tapestry.record.PageRecorderImpl.getChanges(PageRecorderImpl.java:68)
> # org.apache.tapestry.record.PageRecorderImpl.rollback(PageRecorderImpl.java:73)
> # org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:276)
> # org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:248)
> # org.apache.tapestry.engine.DirectService.service(DirectService.java:95)
> # $IEngineService_1066d1acfa0.service($IEngineService_1066d1acfa0.java)
> # org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:65)
> # org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)
> # org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
> # $WebRequestServicer_1066d1acf7d.service($WebRequestServicer_1066d1acf7d.java)
> # org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:48)
> # $WebRequestServicerFilter_1066d1acf7f.service($WebRequestServicerFilter_1066d1acf7f.java)
> # $WebRequestServicer_1066d1acf81.service($WebRequestServicer_1066d1acf81.java)
> # $WebRequestServicer_1066d1acf79.service($WebRequestServicer_1066d1acf79.java)
> # org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
> # $ServletRequestServicer_1066d1acf5d.service($ServletRequestServicer_1066d1acf5d.java)
> # org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
> # $ServletRequestServicerFilter_1066d1acf59.service($ServletRequestServicerFilter_1066d1acf59.java)
> # $ServletRequestServicer_1066d1acf5f.service($ServletRequestServicer_1066d1acf5f.java)
> # org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
> # $ServletRequestServicerFilter_1066d1acf57.service($ServletRequestServicerFilter_1066d1acf57.java)
> # $ServletRequestServicer_1066d1acf5f.service($ServletRequestServicer_1066d1acf5f.java)
> # org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
> # $ServletRequestServicerFilter_1066d1acf5b.service($ServletRequestServicerFilter_1066d1acf5b.java)
> # $ServletRequestServicer_1066d1acf5f.service($ServletRequestServicer_1066d1acf5f.java)
> # $ServletRequestServicer_1066d1acb11.service($ServletRequestServicer_1066d1acb11.java)
> # org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:141)
> # org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:186)
> # javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> # javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> # org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> # org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> # org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> # org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> # org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> # org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> # org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> # org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> # org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
> # org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
> # org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
> # org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> # org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> # java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message