I don't know, I would believe that if I weren't able to make a
Stateful bean and use it exactly how I did in Wicket, outside of this
project.
I setup a test project and their stateful/stateless beans work
flawlessly when tested against JSP/Servlets....the problem arises w/
Wicket + SFSB on Glassfish.
On 7/5/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> Caused by: java.io.NotSerializableExcepti
> on:
> com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>
> looks like a bug in sun's impl of ejbs?
>
> -Igor
>
>
>
> On 7/5/06, Vincent Jenks <[EMAIL PROTECTED] > wrote:
> >
> I'm testing an app I just finished and is currently running on JBoss
> on Sun's Glassfish (SJAS 9.0) to test compatibility and see if it's a
> viable option going forward w/ our enterprise efforts.
>
> I seem to be having an issue w/ storing objects in session. Wicket
> runs fine until I utilize the overridden ISessionFactory to store
> objects - then I start getting exceptions like this:
>
> **********************************************************************
>
> StandardWrapperValve[ProductCatalogApp]: Servlet.service()
> for servlet
> ProductCatalogApp threw exception
> wicket.WicketRuntimeException: Internal error cloning object. Make
> sure all dependent objects implement Serializable. Class:
> com.myapp.ui.admin.UserSession
> at
> wicket.protocol.http.HttpSessionStore.setAttribute
> (HttpSessionStore.java:62)
> at wicket.Session.setAttribute(Session.java:914)
> at wicket.Session.update(Session.java:938)
> at
> wicket.protocol.http.WebSession.update(WebSession.java:116)
> at wicket.RequestCycle.detach(RequestCycle.java:818)
> at wicket.RequestCycle.steps(RequestCycle.java:1052)
> at wicket.RequestCycle.request(RequestCycle.java:453)
> at wicket.protocol.http.WicketServlet.doGet
> (WicketServlet.java:215)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.apache.catalina.core.ApplicationFilterChain.servletService
> (ApplicationFilterChain.java:397)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
> at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
> at
> org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:179)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
> at
> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
> at
> org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:182)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
> at
> com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke
> (StandardPipeline.java:566)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service
> (CoyoteAdapter.java:231)
> at
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
> at
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java
> :574)
> at
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
> at
> com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
> at
> com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
> at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
> at
> com.sun.enterprise.web.connector.grizzly.WorkerThread.run
> (WorkerThread.java:75)
> Caused by: java.io.NotSerializableException:
> com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
> at java.io.ObjectOutputStream.writeOrdinaryObject
> (ObjectOutputStream.java:1284)
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
> at java.io.ObjectOutputStream.writeSerialData
> (ObjectOutputStream.java:1341)
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> at java.io.ObjectOutputStream.writeObject
> (ObjectOutputStream.java:291)
> at
> wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java:56)
> ... 33 more
>
> **********************************************************************
>
> The ProductCatalogApp (my wicket application class) looks like this:
>
> public class ProductCatalogApp extends WebApplication
> {
> public void init()
> {
> //create external images resource
> getSharedResources().add("imageResource",
> new ImageResource());
>
> //start timer services
> TimerProxy.init();
> }
>
> public Class getHomePage()
> {
> return ProductCatalog.class;
> }
>
> public ISessionFactory getSessionFactory()
> {
> return new ISessionFactory()
> {
> public Session newSession()
> {
> return new
> UserSession(ProductCatalogApp.this);
> }
> };
> }
> }
>
> UserSession looks like this:
>
> public class UserSession extends WebSession
> {
> private User user;
> private ShoppingCart cart;
>
> public UserSession(WebApplication application)
> {
> super(application);
> }
>
> public User getUser()
> {
> return this.user;
> }
>
> public void setUser(User user)
> {
> this.user = user;
> dirty();
> }
>
> public boolean authenticated()
> {
> if (this.getUser() == null)
> return false;
> else
> return true;
> }
>
> public ShoppingCart getCart()
> {
> return this.cart;
> }
>
> public void setCart(ShoppingCart cart)
> {
> this.cart = cart;
> dirty();
> }
> }
>
> And all classes used in the UserSession class are serializable...I
> even made the stateful ShoppingCartBean serializable (the User entity
> already was) and it makes no difference. I'm fairly sure something
> goes wrong w/ the Stateful ShoppingCartBean as I can login and use the
> UserSession class (above) just fine - user authentication isn't
> affected. Once I add items to my cart I get the exception and from
> that point on - nothing session-based works and I get the exception if
> I try to login again...or do anything that accesses the UserSession
> class.
>
> Basically, I think Wicket + SFSB in Glassfish's EJB3 implementation
> aren't playing nice together somehow...and I thought I'd get your
> guys' opinions before I posted something on their forum.
>
> Thanks!
>
> -v
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user