Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » ImageRegistry is not serializable
ImageRegistry is not serializable [message #901707] Tue, 14 August 2012 09:07 Go to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior Member
Hello,

Not an issue for me but during some tests with a RAP application in tomcat I noticed this in my logs "java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.eclipse.jface.resource.ImageRegistry" (stack trace bellow).

I guess ImageRegistry should be Serializable as it is a session scope class.
Having a look on the code all JFace registries seems to extend org.eclipse.jface.resource.ResourceRegistry except ImageRegistry.

Is it a bug or is it because of something related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=357769 ?

Best regards,
Arnaud

java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.eclipse.jface.resource.ImageRegistry
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1332)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1616)
at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1075)
at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:284)
at org.apache.catalina.session.StandardManager.load(StandardManager.java:204)
at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:470)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.NotSerializableException: org.eclipse.jface.resource.ImageRegistry
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at java.util.HashMap.writeObject(HashMap.java:1001)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1692)
at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1092)
at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:411)
at org.apache.catalina.session.StandardManager.unload(StandardManager.java:353)
at org.apache.catalina.session.StandardManager.stopInternal(StandardManager.java:497)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5449)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1530)
... 5 more
Re: ImageRegistry is not serializable [message #901711 is a reply to message #901707] Tue, 14 August 2012 09:27 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Arnaud,
the original JFace ImageRegistry class does not extend ResourceRegistry
too. I don't know why is that, but for me it makes sense to be
serializeable too.
Best,
Ivan

On 8/14/2012 12:07 PM, Arnaud MERGEY wrote:
> Hello,
>
> Not an issue for me but during some tests with a RAP application in
> tomcat I noticed this in my logs "java.io.WriteAbortedException:
> writing aborted; java.io.NotSerializableException:
> org.eclipse.jface.resource.ImageRegistry" (stack trace bellow).
>
> I guess ImageRegistry should be Serializable as it is a session scope
> class.
> Having a look on the code all JFace registries seems to extend
> org.eclipse.jface.resource.ResourceRegistry except ImageRegistry.
>
> Is it a bug or is it because of something related to
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=357769 ?
>
> Best regards,
> Arnaud
>
> java.io.WriteAbortedException: writing aborted;
> java.io.NotSerializableException:
> org.eclipse.jface.resource.ImageRegistry
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1332)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
> at java.util.HashMap.readObject(HashMap.java:1030)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969)
> at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
> at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
> at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
> at
> org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1616)
> at
> org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1075)
> at
> org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:284)
> at
> org.apache.catalina.session.StandardManager.load(StandardManager.java:204)
> at
> org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:470)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
> at
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.io.NotSerializableException:
> org.eclipse.jface.resource.ImageRegistry
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
> at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> at java.util.HashMap.writeObject(HashMap.java:1001)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
> at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
> at
> org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1692)
> at
> org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1092)
> at
> org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:411)
> at
> org.apache.catalina.session.StandardManager.unload(StandardManager.java:353)
> at
> org.apache.catalina.session.StandardManager.stopInternal(StandardManager.java:497)
> at
> org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
> at
> org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5449)
> at
> org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
> at
> org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1540)
> at
> org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1530)
> ... 5 more

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Dialog and Browser question
Next Topic:Multi line headers in table columns
Goto Forum:
  


Current Time: Mon Nov 29 23:46:11 GMT 2021

Powered by FUDForum. Page generated in 0.02239 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top