For whatever reason, I'm unable to supress this exception in the
storefront application (where I really need it.)  I've tried wrapping
a try/catch around the assignment and retrieval of the SFSB stub in
the custom Session class...I can't pull the bean data up w/o the
exception occuring, it would seem.

So again, is there a way to turn logging debugging off so the test
doesn't happen at all...so I can quit trying to find work-arounds?
Even if my error supression did work, it's not a very elegant solution
- it might be better if the serialization wasn't being tested at all.

On 7/6/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> Excellent, I'll move forward then and see how it goes...thanks!
>
> On 7/6/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > that it just works is logical. It is just a test we try to serialize it so
> > that you get a warning if that is not possible because of a non
> > serializeable object.
> >
> >
> >
> >
> > On 7/6/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > OK, I've created a small test-app in Netbeans where I'm using a Wicket
> > > page and have overridden ISessionFactory in the app class to create a
> > > session.  I have a page where I call the stateful bean, create it and
> > > store it in session if it's non-existent, and supply a link to clear
> > > the bean from session.
> > >
> > > When first calling the page - when the stub is first stored in
> > > session, the page fails.  If I re-visit the page the values have
> > > actually been stored...amazingly enough...and the page does not fail
> > > but displays the values in session.  I can click the link, clear it,
> > > and start the whole process over again and it is consistent.
> > >
> > > So that begs the question - would I be safe supressing the exception
> > > in the custom session class where I'm storing the bean stub?  Or, is
> > > it possible that I'm not getting the correct reference to the bean due
> > > to the serialization failure?
> > >
> > > If someone wants a copy of my little test app - I'd be happy to send it
> > along.
> > >
> > > On 7/6/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > > > Well, this was the first app I've ever built w/ EJB technology of
> > > > *any* version...it's sort of a pilot app for future in-house
> > > > efforts....so far it's worked out great.
> > > >
> > > > So, correct me if I'm wrong but it's my understanding that if I do not
> > > > store the stub to the interface of the stateful bean in an HTTP
> > > > session - I may lose the reference to that bean the next time I call
> > > > it.
> > > >
> > > > So, I'm calling the stateful bean and storing a reference to it in
> > > > http session so I can recall that exact instance back from the server
> > > > later.  This is how it was done in the app that is currently running
> > > > in production on JBoss.
> > > >
> > > > On 7/6/06, Matej Knopp <[EMAIL PROTECTED]> wrote:
> > > > > Anyway, I don't really understand, why is the ejb object actually
> > being
> > > > > serialized. Do you store your service objects in session?
> > > > >
> > > > > -Matej
> > > > >
> > > > > Igor Vaynberg wrote:
> > > > > > well, the problem might be that it is serialized by wicket itself.
> > > > > > this is done because you have the logger set to debug to help
> > identify
> > > > > > things you put into session that might not be serializable. maybe
> > the
> > > > > > container doesnt serialize the same way so when the container does
> > it
> > > > > > its not a problem, but when wicket does it it is a problem.
> > > > > >
> > > > > > -Igor
> > > > > >
> > > > > >
> > > > > > On 7/5/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > > > > >> 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
> > > > > >>> Wicket-user@lists.sourceforge.net
> > > > > >>>
> > 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
> > > > > >>> Wicket-user@lists.sourceforge.net
> > > > > >>>
> > 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
> > > > > >> Wicket-user@lists.sourceforge.net
> > > > > >>
> > 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
> > > > > > Wicket-user@lists.sourceforge.net
> > > > > >
> > 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
> > > > > Wicket-user@lists.sourceforge.net
> > > > >
> > 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
> > > Wicket-user@lists.sourceforge.net
> > > 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
> > Wicket-user@lists.sourceforge.net
> > 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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to