[appengine-java] Re: Problem with JSF 2.0

2010-11-07 Thread vaninh0
Oh my god!
I had implemented a serialization of the managed bean, but had not
seen that the exception had changed to another class to serialize
(EmpresaMBean first, and Empresa the entity after), serialize all
requested now and it worked.

Thank you.

On 7 nov, 20:19, Daniel  wrote:
> Try adding  implements Serializable to the problematic bean
> (br.com.controlecartao.web.managed.EmpresaMBean)
>
> and add the private static final long serialVersionUID .. variable
> as eclipse suggests
>
> also make sure you got this entry in appengine-web.xml :  enabled>true
>
> this should solve the issue
>
> Regards
>
> Daniel
>
> On Nov 5, 9:12 pm, vaninh0  wrote:
>
> > Hello,
>
> > I have an application running on EclipsePlugin (JSF2.0), but when I
> > deploy it got the following error:
> > (it's started when I used the templates)
>
> > Anyone can help me?
>
> > java.lang.RuntimeException: java.io.NotSerializableException:
> > br.com.controlecartao.web.managed.EmpresaMBean
> >         at
> > com.google.apphosting.runtime.jetty.SessionManager.serialize(SessionManager.java:
> > 387)
> >         at
> > com.google.apphosting.runtime.jetty.SessionManager.createEntityForSession(SessionManager.java:
> > 364)
> >         at com.google.apphosting.runtime.jetty.SessionManager
> > $AppEngineSession.save(SessionManager.java:164)
> >         at
> > com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
> > 41)
> >         at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter(ServletHandler.java:1157)
> >         at
> > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
> > 43)
> >         at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter(ServletHandler.java:1157)
> >         at
> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> > 388)
> >         at
> > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> > 216)
> >         at
> > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> > 182)
> >         at
> > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> > 765)
> >         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> > 418)
> >         at
> > com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
> > 238)
> >         at
> > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> > 152)
> >         at org.mortbay.jetty.Server.handle(Server.java:326)
> >         at 
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> > 542)
> >         at org.mortbay.jetty.HttpConnection
> > $RequestHandler.headerComplete(HttpConnection.java:923)
> >         at
> > com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
> > 76)
> >         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> >         at
> > com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
> > 135)
> >         at
> > com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
> > 261)
> >         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> > $6.handleBlockingRequest(RuntimePb.java:8486)
> >         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> > $6.handleBlockingRequest(RuntimePb.java:8484)
> >         at
> > com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
> > 24)
> >         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> > 418)
> >         at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
> > 572)
> >         at com.google.tracing.TraceContext$TraceContextRunnable
> > $1.run(TraceContext.java:448)
> >         at com.google.tracing.TraceContext.runInContext(TraceContext.java:
> > 688)
> >         at com.google.tracing.TraceContext
> > $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
> > 326)
> >         at com.google.tracing.TraceContext
> > $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
> > 318)
> >         at com.google.tracing.TraceContext
> > $TraceContextRunnable.run(TraceContext.java:446)
> >         at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
> > 1110)
> >         at java.util.concurrent.ThreadPoolExecutor
> > $Worker.run(ThreadPoolExecutor.java:603)
> >         at java.lang.Thread.run(Thread.java:636)
> > Caused by: java.io.NotSerializableException:
> > br.com.controlecartao.web.managed.EmpresaMBean
> >         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> > 1173)
> >         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
> > 343)
> >         at java.util.HashMap.writeObject(HashMap.java:1018)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.refl

[appengine-java] Re: Problem with JSF 2.0

2010-11-07 Thread Daniel
Try adding  implements Serializable to the problematic bean
(br.com.controlecartao.web.managed.EmpresaMBean)

and add the private static final long serialVersionUID .. variable
as eclipse suggests

also make sure you got this entry in appengine-web.xml : true


this should solve the issue


Regards


Daniel

On Nov 5, 9:12 pm, vaninh0  wrote:
> Hello,
>
> I have an application running on EclipsePlugin (JSF2.0), but when I
> deploy it got the following error:
> (it's started when I used the templates)
>
> Anyone can help me?
>
> java.lang.RuntimeException: java.io.NotSerializableException:
> br.com.controlecartao.web.managed.EmpresaMBean
>         at
> com.google.apphosting.runtime.jetty.SessionManager.serialize(SessionManager.java:
> 387)
>         at
> com.google.apphosting.runtime.jetty.SessionManager.createEntityForSession(SessionManager.java:
> 364)
>         at com.google.apphosting.runtime.jetty.SessionManager
> $AppEngineSession.save(SessionManager.java:164)
>         at
> com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
> 41)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
> 43)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 388)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> 216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> 182)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> 765)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 418)
>         at
> com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
> 238)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 542)
>         at org.mortbay.jetty.HttpConnection
> $RequestHandler.headerComplete(HttpConnection.java:923)
>         at
> com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
> 76)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
> 135)
>         at
> com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
> 261)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:8486)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:8484)
>         at
> com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
> 24)
>         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> 418)
>         at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
> 572)
>         at com.google.tracing.TraceContext$TraceContextRunnable
> $1.run(TraceContext.java:448)
>         at com.google.tracing.TraceContext.runInContext(TraceContext.java:
> 688)
>         at com.google.tracing.TraceContext
> $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
> 326)
>         at com.google.tracing.TraceContext
> $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
> 318)
>         at com.google.tracing.TraceContext
> $TraceContextRunnable.run(TraceContext.java:446)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
> 1110)
>         at java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
> Caused by: java.io.NotSerializableException:
> br.com.controlecartao.web.managed.EmpresaMBean
>         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1173)
>         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
> 343)
>         at java.util.HashMap.writeObject(HashMap.java:1018)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:
> 962)
>         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> 1478)
>         at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1409)
>