Re: SerializationException is lost
GWT gives you the opportunity to log exceptions the way you want them. For server side exceptions, just override the RemoteServiceServlet.doUnexpectedFailure() in your RPC Servlet and put appropriate loggers over there. For client side exceptions, call GWT.setUncaughtExceptionHandler() and register your error handler. When used together, you have the opportunity to log meaningful exceptions in any way you desire. --Sri 2009/10/9 Chris Ramsdale > I think it depends on just what is useful, which itself largely depends on > what problem you are trying to track down. In many cases where data isn't > being returned across the wire, the data returned in the GWT stack traces > can be helpful. In fact, in some cases it will even suggest resolution; > incorrect version numbers, missing serialization policy file, etc... > For the case at hand, it appears that the exception being thrown by the GWT > server side is masking the underlying Hibernate issue. Is your server side > coded in such a way that you can wrap the transactional pieces with their > own try/catch mechanisms? If so you would be able to catch the real issue > and log it before it bubbles up to the GWT RPC layer. As an added benefit > you could then, on a case by case basis, decide to throw a separate > exception that is understand by your client (e.g. InvocationException, > DBException, etc...) . > > - Chris > > On Fri, Oct 9, 2009 at 12:29 AM, Geoffrey Wiseman < > geoffrey.wise...@gmail.com> wrote: > >> >> On Oct 8, 6:56 pm, Sripathi Krishnan >> wrote: >> > Deliberate decision .. >> > >> > Few reasons that I know of -- >> >> I buy the not transmitting the errors to the client part; what I don't >> understand is why the server log doesn't seem to show anything useful >> in this case, at least, where it's come up for me. >> >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: SerializationException is lost
I think it depends on just what is useful, which itself largely depends on what problem you are trying to track down. In many cases where data isn't being returned across the wire, the data returned in the GWT stack traces can be helpful. In fact, in some cases it will even suggest resolution; incorrect version numbers, missing serialization policy file, etc... For the case at hand, it appears that the exception being thrown by the GWT server side is masking the underlying Hibernate issue. Is your server side coded in such a way that you can wrap the transactional pieces with their own try/catch mechanisms? If so you would be able to catch the real issue and log it before it bubbles up to the GWT RPC layer. As an added benefit you could then, on a case by case basis, decide to throw a separate exception that is understand by your client (e.g. InvocationException, DBException, etc...) . - Chris On Fri, Oct 9, 2009 at 12:29 AM, Geoffrey Wiseman < geoffrey.wise...@gmail.com> wrote: > > On Oct 8, 6:56 pm, Sripathi Krishnan > wrote: > > Deliberate decision .. > > > > Few reasons that I know of -- > > I buy the not transmitting the errors to the client part; what I don't > understand is why the server log doesn't seem to show anything useful > in this case, at least, where it's come up for me. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: SerializationException is lost
On Oct 8, 6:56 pm, Sripathi Krishnan wrote: > Deliberate decision .. > > Few reasons that I know of -- I buy the not transmitting the errors to the client part; what I don't understand is why the server log doesn't seem to show anything useful in this case, at least, where it's come up for me. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: SerializationException is lost
Deliberate decision .. Few reasons that I know of -- a) Server code is capable of generating exceptions which can't be translated to javascript. Things like HibernateException can't be translated to JS. b) From a security perspective, you don't want your server side stack traces to be available to end-users. c) Assuming GWT could throw the exception to JS, it would have to be capable of generating serialization/deserialization code for every exception object in the classpath. Imagine your RPC method is like this - public ResultDTO getSomeInformation(InputDTO obj) throws Exception; Now, your java code could throw any sub-class of Exception and GWT doesn't have a way to figure that out at compile time. So, it would have to convert every Exception sub-class into appropriate JS code -- which leads to a huge js file. Because of this, GWT requires that you explicitly declare any exceptions you want available in your javascript code in the throw clause of your RPC method. --Sri 2009/10/8 Geoffrey Wiseman > > On Sep 12, 7:39 am, Sripathi Krishnan > wrote: > > No - GWT doesn't propagate that exception/message to the client. > > Is this a bug, tracked somewhere, or a deliberate decision that > doesn't currently make sense to me? :) > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: SerializationException is lost
On Sep 12, 7:39 am, Sripathi Krishnan wrote: > No - GWT doesn't propagate that exception/message to the client. Is this a bug, tracked somewhere, or a deliberate decision that doesn't currently make sense to me? :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: SerializationException is lost
No - GWT doesn't propagate that exception/message to the client. --Sri 2009/9/12 Mohsen Saboorian > There is no way to obtain the exception thrown somewhere in the client > without overriding this class? > > > On Sat, Sep 12, 2009 at 2:58 PM, Sripathi Krishnan < > sripathi.krish...@gmail.com> wrote: > >> Just override the RemoteServiceServlet.doUnexpectedFailure() in your RPC >> Servlet and put appropriate loggers over there. >> >> >> --Sri >> >> >> 2009/9/12 Mohsen Saboorian >> >>> I know this. My problem is how to log the exception thrown. >>> >>> Mohsen >>> >>> >>> On Sat, Sep 12, 2009 at 2:39 PM, Sripathi Krishnan < >>> sripathi.krish...@gmail.com> wrote: >>> You cannot return hibernate classes in your RPC servlet - because GWT has no way of compiling that into javascript objects. In your case, org.hibernate.collection.PersistentBag cannot be a part of any object that is returned as part of RPC service call. --Sri 2009/9/12 Mohsen Saboorian Hi, > > When retrieving a Hibernate/JPA entity from server, I'm getting > SerializationException because of lazy issues. I know some ways to solve > this issue, but my current problem is that I cannot see the exception > anywhere when it happens. AsyncCallback.onFailure() is fired with: > StatusCodeException: 0: The call failed on the server; see server log > for details > and nothing is written to hosted mode console. I even could not see the > exception after adding throws SerializationException to my service > impl, async and interface (exception is not runtime, so I had to put a > try/catch at the client side) either in the client catch part or > AsyncCallback.onFailure(). > > I was able to track exception by putting breakpoint on > RemoteServiceServlet.doUnexpectedFailure(). > > Here is the last part of serialization exception I face: > Caused by: com.google.gwt.user.client.rpc.SerializationException: Type > 'org.hibernate.collection.PersistentBag' was not included in the set of > types which can be serialized by this SerializationPolicy or its Class > object could not be loaded. For security purposes, this type will not be > serialized. > at > com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize(StandardSerializationPolicy.java:83) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591) > at > com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:636) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:666) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593) > at > com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) > at > com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:43) > at > com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:36) > ... 34 more > > > Regards, > Mohsen > > > > >>> >>> >>> >> >> >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: SerializationException is lost
There is no way to obtain the exception thrown somewhere in the client without overriding this class? On Sat, Sep 12, 2009 at 2:58 PM, Sripathi Krishnan < sripathi.krish...@gmail.com> wrote: > Just override the RemoteServiceServlet.doUnexpectedFailure() in your RPC > Servlet and put appropriate loggers over there. > > > --Sri > > > 2009/9/12 Mohsen Saboorian > >> I know this. My problem is how to log the exception thrown. >> >> Mohsen >> >> >> On Sat, Sep 12, 2009 at 2:39 PM, Sripathi Krishnan < >> sripathi.krish...@gmail.com> wrote: >> >>> You cannot return hibernate classes in your RPC servlet - because GWT has >>> no way of compiling that into javascript objects. >>> >>> In your case, org.hibernate.collection.PersistentBag cannot be a part of >>> any object that is returned as part of RPC service call. >>> >>> --Sri >>> >>> >>> 2009/9/12 Mohsen Saboorian >>> >>> Hi, When retrieving a Hibernate/JPA entity from server, I'm getting SerializationException because of lazy issues. I know some ways to solve this issue, but my current problem is that I cannot see the exception anywhere when it happens. AsyncCallback.onFailure() is fired with: StatusCodeException: 0: The call failed on the server; see server log for details and nothing is written to hosted mode console. I even could not see the exception after adding throws SerializationException to my service impl, async and interface (exception is not runtime, so I had to put a try/catch at the client side) either in the client catch part or AsyncCallback.onFailure(). I was able to track exception by putting breakpoint on RemoteServiceServlet.doUnexpectedFailure(). Here is the last part of serialization exception I face: Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'org.hibernate.collection.PersistentBag' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize(StandardSerializationPolicy.java:83) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:636) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:666) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:43) at com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:36) ... 34 more Regards, Mohsen >>> >>> >>> >> >> >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: SerializationException is lost
Just override the RemoteServiceServlet.doUnexpectedFailure() in your RPC Servlet and put appropriate loggers over there. --Sri 2009/9/12 Mohsen Saboorian > I know this. My problem is how to log the exception thrown. > > Mohsen > > > On Sat, Sep 12, 2009 at 2:39 PM, Sripathi Krishnan < > sripathi.krish...@gmail.com> wrote: > >> You cannot return hibernate classes in your RPC servlet - because GWT has >> no way of compiling that into javascript objects. >> >> In your case, org.hibernate.collection.PersistentBag cannot be a part of >> any object that is returned as part of RPC service call. >> >> --Sri >> >> >> 2009/9/12 Mohsen Saboorian >> >> Hi, >>> >>> When retrieving a Hibernate/JPA entity from server, I'm getting >>> SerializationException because of lazy issues. I know some ways to solve >>> this issue, but my current problem is that I cannot see the exception >>> anywhere when it happens. AsyncCallback.onFailure() is fired with: >>> StatusCodeException: 0: The call failed on the server; see server log for >>> details >>> and nothing is written to hosted mode console. I even could not see the >>> exception after adding throws SerializationException to my service impl, >>> async and interface (exception is not runtime, so I had to put a try/catch >>> at the client side) either in the client catch part or >>> AsyncCallback.onFailure(). >>> >>> I was able to track exception by putting breakpoint on >>> RemoteServiceServlet.doUnexpectedFailure(). >>> >>> Here is the last part of serialization exception I face: >>> Caused by: com.google.gwt.user.client.rpc.SerializationException: Type >>> 'org.hibernate.collection.PersistentBag' was not included in the set of >>> types which can be serialized by this SerializationPolicy or its Class >>> object could not be loaded. For security purposes, this type will not be >>> serialized. >>> at >>> com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize(StandardSerializationPolicy.java:83) >>> at >>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591) >>> at >>> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) >>> at >>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146) >>> at >>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530) >>> at >>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:636) >>> at >>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:666) >>> at >>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593) >>> at >>> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) >>> at >>> com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:43) >>> at >>> com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:36) >>> ... 34 more >>> >>> >>> Regards, >>> Mohsen >>> >>> >>> >>> >> >> >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: SerializationException is lost
I know this. My problem is how to log the exception thrown. Mohsen On Sat, Sep 12, 2009 at 2:39 PM, Sripathi Krishnan < sripathi.krish...@gmail.com> wrote: > You cannot return hibernate classes in your RPC servlet - because GWT has > no way of compiling that into javascript objects. > > In your case, org.hibernate.collection.PersistentBag cannot be a part of > any object that is returned as part of RPC service call. > > --Sri > > > 2009/9/12 Mohsen Saboorian > > Hi, >> >> When retrieving a Hibernate/JPA entity from server, I'm getting >> SerializationException because of lazy issues. I know some ways to solve >> this issue, but my current problem is that I cannot see the exception >> anywhere when it happens. AsyncCallback.onFailure() is fired with: >> StatusCodeException: 0: The call failed on the server; see server log for >> details >> and nothing is written to hosted mode console. I even could not see the >> exception after adding throws SerializationException to my service impl, >> async and interface (exception is not runtime, so I had to put a try/catch >> at the client side) either in the client catch part or >> AsyncCallback.onFailure(). >> >> I was able to track exception by putting breakpoint on >> RemoteServiceServlet.doUnexpectedFailure(). >> >> Here is the last part of serialization exception I face: >> Caused by: com.google.gwt.user.client.rpc.SerializationException: Type >> 'org.hibernate.collection.PersistentBag' was not included in the set of >> types which can be serialized by this SerializationPolicy or its Class >> object could not be loaded. For security purposes, this type will not be >> serialized. >> at >> com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize(StandardSerializationPolicy.java:83) >> at >> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591) >> at >> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) >> at >> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146) >> at >> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530) >> at >> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:636) >> at >> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:666) >> at >> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593) >> at >> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) >> at >> com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:43) >> at >> com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:36) >> ... 34 more >> >> >> Regards, >> Mohsen >> >> >> >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: SerializationException is lost
You cannot return hibernate classes in your RPC servlet - because GWT has no way of compiling that into javascript objects. In your case, org.hibernate.collection.PersistentBag cannot be a part of any object that is returned as part of RPC service call. --Sri 2009/9/12 Mohsen Saboorian > Hi, > > When retrieving a Hibernate/JPA entity from server, I'm getting > SerializationException because of lazy issues. I know some ways to solve > this issue, but my current problem is that I cannot see the exception > anywhere when it happens. AsyncCallback.onFailure() is fired with: > StatusCodeException: 0: The call failed on the server; see server log for > details > and nothing is written to hosted mode console. I even could not see the > exception after adding throws SerializationException to my service impl, > async and interface (exception is not runtime, so I had to put a try/catch > at the client side) either in the client catch part or > AsyncCallback.onFailure(). > > I was able to track exception by putting breakpoint on > RemoteServiceServlet.doUnexpectedFailure(). > > Here is the last part of serialization exception I face: > Caused by: com.google.gwt.user.client.rpc.SerializationException: Type > 'org.hibernate.collection.PersistentBag' was not included in the set of > types which can be serialized by this SerializationPolicy or its Class > object could not be loaded. For security purposes, this type will not be > serialized. > at > com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize(StandardSerializationPolicy.java:83) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591) > at > com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:636) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:666) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593) > at > com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) > at > com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:43) > at > com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:36) > ... 34 more > > > Regards, > Mohsen > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
SerializationException is lost
Hi, When retrieving a Hibernate/JPA entity from server, I'm getting SerializationException because of lazy issues. I know some ways to solve this issue, but my current problem is that I cannot see the exception anywhere when it happens. AsyncCallback.onFailure() is fired with: StatusCodeException: 0: The call failed on the server; see server log for details and nothing is written to hosted mode console. I even could not see the exception after adding throws SerializationException to my service impl, async and interface (exception is not runtime, so I had to put a try/catch at the client side) either in the client catch part or AsyncCallback.onFailure(). I was able to track exception by putting breakpoint on RemoteServiceServlet.doUnexpectedFailure(). Here is the last part of serialization exception I face: Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'org.hibernate.collection.PersistentBag' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize(StandardSerializationPolicy.java:83) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:636) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:666) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:43) at com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:36) ... 34 more Regards, Mohsen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---