aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Failed to marshal exception problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Failed to marshal exception problem" Watch "Failed to marshal exception problem" New topic
Author

Failed to marshal exception problem

Vikas Kumar Sahu
Ranch Hand

Joined: Dec 02, 2003
Posts: 59
Hi All,

I am saving one xml dom object at the server and during the saving the marshalling exception is comming.
Could any body tell me why this exception is comming ?
Exceptions are

java.rmi.MarshalException: failed to marshal saveWorkflowInXml(Lcom.sisl.snms.client.cm.workflow.jaxb.Workflow;Ljava.lang.St ring ; nested exception is:
java.io.NotSerializableException: com.sun.java.swing.plaf.windows.XPStyle

at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:86)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:27 8)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:24 4)

at com.sisl.snms.server.cm.wmservices.WorkflowXmlManipulator_ypo9h8_EOImpl_813_WLS tub.saveWorkflowInXml(Unknown Source)

at com.sisl.snms.client.cm.workflow.gui.WorkflowWizardDialog.saveWorkflowAtTheServ er(WorkflowWizardDialog.java:2528)

at com.sisl.snms.client.cm.workflow.gui.WorkflowWizardDialog.performSaveAction(Wor kflowWizardDialog.java:923)

at com.sisl.snms.client.cm.workflow.gui.WorkflowWizardDialog.performAction(Workflo wWizardDialog.java:778)

at com.sisl.snms.client.cm.workflow.gui.WorkflowWizardDialog$5.actionPerformed(Wor kflowWizardDialog.java:521)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.j ava:1839)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.ja va:245)

at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)

at java.awt.Component.processMouseEvent(Component.java:5100)

at java.awt.Component.processEvent(Component.java:4897)

at java.awt.Container.processEvent(Container.java:1569)

at java.awt.Component.dispatchEventImpl(Component.java:3615)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

at java.awt.Container.dispatchEventImpl(Container.java:1613)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:15 1)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Caused by: java.io.NotSerializableException: com.sun.java.swing.plaf.windows.XPStyle

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)

at javax.swing.JComponent.writeObject(JComponent.java:5128)

at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)

at java.awt.Container.writeObject(Container.java:2798)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)

at java.awt.Container.writeObject(Container.java:2798)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)

at java.awt.Container.writeObject(Container.java:2798)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)

at java.awt.Container.writeObject(Container.java:2798)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)

at java.awt.Container.writeObject(Container.java:2798)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)

at java.awt.Container.writeObject(Container.java:2798)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)

at java.util.Vector.writeObject(Vector.java:1017)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)

at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOut putStream.java:120)

at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:93)

at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:36)

at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:82)

... 31 more

Vikas
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


NotSerializableException

The object you are trying to use is not Serializable. You can't use un-serializable objects in a distributed architecture.
com.sisl.snms.client.cm.workflow.jaxb.Workflow (whatever that is) appears not to implement Serializable.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Vikas Kumar Sahu
Ranch Hand

Joined: Dec 02, 2003
Posts: 59
I already Implented Serializable interface
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

My apologies, I read your stack trace too quickly. The problem class is com.sun.java.swing.plaf.windows.XPStyle. That's the classs which doesn't implement Serializable.
Vikas Kumar Sahu
Ranch Hand

Joined: Dec 02, 2003
Posts: 59
but it is sun's java file

com.sun.java.swing.plaf.windows.XPStyle
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Doesn't mean it will be Serializable though.
Vikas Kumar Sahu
Ranch Hand

Joined: Dec 02, 2003
Posts: 59
now one strange thing my saving functionality is working at client end means saving of xml at client is working. Now I am reading it and then saving this dom object at server is working fine.
The diff is only earlier i was saving xml directly at server that is not working but when i am saving it client then reading dom and saving dom internally at server is working fine.

I am not able to understand this strange problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Failed to marshal exception problem