You'll want to make sure the application is not trying to serialize a class 
w/out a no-args constructor.

Dennis Byrne

>-----Original Message-----
>From: Yasushi Okubo [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, May 3, 2006 01:36 PM
>To: 'MyFaces Discussion'
>Subject: Re: NotSerializableException from PoolingDataSource
>
>Dennis Byrne wrote:
>
>>Don't serialize a data sources ;)
>>
>>Use the "transient" key word.
>>
>>Dennis Byrne
>>
>>  
>>
>Thanks for the tip Dennis, but I started seeing another error after 
>adding transient before DataSource:
>java.io.InvalidClassException: org.nesg.plims.QueryBean; no valid 
>constructor
>
>I am not sure why it is saying no valid constructor, am I using 
>transient properly ?
>private transient DataSource ds;
>
>Thanks,
>yasushi
>
>>>-----Original Message-----
>>>From: Yasushi Okubo [mailto:[EMAIL PROTECTED]
>>>Sent: Wednesday, May 3, 2006 11:55 AM
>>>To: 'MyFaces Discussion'
>>>Subject: NotSerializableException from PoolingDataSource
>>>
>>>
>>>Hi, experts
>>>
>>>My backing bean needs to connect to database through connection 
>>>pool/DataSource  on  tomcat (v5.5.16).   Now  I changed my backing beans 
>>>    
>>>
>>>from session to request scope trying to use t:savestate tag, then I made 
>>  
>>
>>>them serializable, but it started  giving exceptions 
>>>[NotSerializableException for 
>>>PoolingDataSource$PoolGuardConnectionWrapper}.  So,  Are there any other 
>>>options or work around  or am I doing something wrong ?
>>>
>>>Thanks for your help,
>>>yasushi
>>>
>>>Servlet.service() for servlet Faces Servlet threw exception
>>>javax.faces.FacesException: java.io.NotSerializableException: 
>>>org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
>>>       at 
>>>org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
>>>       at 
>>>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)
>>>       at 
>>>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)
>>>       at 
>>>org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
>>>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
>>>       at 
>>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>>       at 
>>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>>       at 
>>>org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
>>>       at 
>>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>>>       at 
>>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>>       at 
>>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>>       at 
>>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>>>       at 
>>>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>>>       at 
>>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>>>       at 
>>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>>>       at 
>>>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>>>       at 
>>>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>>>       at 
>>>org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>>>       at 
>>>org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>>>       at 
>>>org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>>>       at 
>>>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>>>       at java.lang.Thread.run(Thread.java:595)
>>>Caused by: org.apache.jasper.JasperException: 
>>>java.io.NotSerializableException: 
>>>org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
>>>       at 
>>>org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
>>>       at 
>>>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
>>>       at 
>>>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>>>       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>>       at 
>>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>>       at 
>>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>>       at 
>>>org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
>>>       at 
>>>org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
>>>       at 
>>>org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
>>>       at 
>>>org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>>>       at 
>>>org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
>>>       ... 21 more
>>>
>>>
>>>    
>>>
>>
>>
>>  
>>
>
>


Reply via email to