Caucho Forums

Caucho Forums (
-   Hessian (
-   -   java.sql.Date/Timestamp/Time fields choke on null (

dirichs 01-05-2012 09:49 AM

java.sql.Date/Timestamp/Time fields choke on null
using Hessian 4.0.7, I just noticed that fields of type java.sql.Date, java.sql.Timestamp and java.sql.Time are handled specially during Deserialization. However, the implementation does not handle null values gracefully:

com.caucho.hessian.client.HessianRuntimeException: dynaserv.domain.Route.lastModifield: java.sql.Timestamp cannot be assigned from null
at com.caucho.hessian.client.HessianProxy.invoke(Hess
at $Proxy3.route(Unknown Source)
at ava:53)
at org.eclipse.jface.action.Action.runWithEvent(Actio
at org.eclipse.jface.action.ActionContributionItem.ha ndleWidgetSelection( 4)
at cess$2(
at org.eclipse.jface.action.ActionContributionItem$6. handleEvent(
at org.eclipse.swt.widgets.EventTable.sendEvent(Event
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.ja va:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(
at org.eclipse.swt.widgets.Display.readAndDispatch(Di
at org.eclipse.ui.internal.Workbench.runEventLoop(Wor
at org.eclipse.ui.internal.Workbench.runUI(Workbench. java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workben
at org.eclipse.ui.internal.Workbench$ java:671)
at org.eclipse.core.databinding.observable.Realm.runW ithDefault(
at org.eclipse.ui.internal.Workbench.createAndRunWork bench(
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Pl
at dynaclient.Application.start(
at run(
at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.runApplication( 110)
at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.start(
at n(
at n(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
at java.lang.reflect.Method.invoke(
at org.eclipse.equinox.launcher.Main.invokeFramework(
at org.eclipse.equinox.launcher.Main.basicRun(Main.ja va:574)
at 07)
at org.eclipse.equinox.launcher.Main.main( 383)
Caused by: dynaserv.domain.Route.lastModifield: java.sql.Timestamp cannot be assigned from null
at alizeError(
at$SqlTimest ampFieldDeserializer.deserialize(UnsafeDeserialize
at t(
at t(
at ance(
at$ObjectFie ldDeserializer.deserialize( :417)
at t(
at t(
at ance(
at com.caucho.hessian.client.HessianProxy.invoke(Hess
... 31 more
Caused by: java.lang.NullPointerException
at$SqlTimest ampFieldDeserializer.deserialize(UnsafeDeserialize
... 44 more

I suspect that this in an error of the Deserialization implementation of these fields. Or is there a deeper reason to not allow null values in these fields?

ssinha 10-07-2012 03:52 PM

Facing same Issue of timestamp while deserializing from Hessian 4.0.7
Hey, Even I am facing this issue when I am trying to deserialize my object containing a Timestamp field which is null while using Hessian 4.0.7. It fails. I have to choose a solution for serializing and deserializing my java objects for my live product. Can the admin from Hessian tell me as when they are going to fix this issue which has been here for quite long I suppose. Its URGENT !! Anticipating for your reply...Thanks.. @SS

All times are GMT. The time now is 02:20 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.