# Error cloning object through serialization

**URL:** <https://forum.inductiveautomation.com/t/error-cloning-object-through-serialization/66229>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [November 8, 2022, 2:08pm UTC](https://forum.inductiveautomation.com/t/error-cloning-object-through-serialization/66229 "2022-11-08T14:08:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhananjay\_vichare](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dhananjay_vichare/32/74712_2.png) [@dhananjay\_vichare](https://forum.inductiveautomation.com/u/dhananjay_vichare)\
**Post date:** [November 8, 2022, 2:08pm UTC](https://forum.inductiveautomation.com/t/error-cloning-object-through-serialization/66229/1 "2022-11-08T14:08:50Z")

</div>

Hello,

We have created tags using scripting function.  
However, when we try to export tags to json, we are getting below error. We are not able to identify the issue. Could you please review and let me know what is wrong?

_java.io.IOException: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: java.lang.RuntimeException: Error cloning object through serialization._

- at com.inductiveautomation.ignition.designer.tags.frame.actions.TagExporterTask.writeToFile(ImportExportActions.kt:570)\*
- at com.inductiveautomation.ignition.client.script.ClientFileUtilities$CharFileWritingTask.writeToFile(ClientFileUtilities.java:84)\*
- at com.inductiveautomation.ignition.designer.util.FileUtil.saveToFile(FileUtil.java:110)\*
- at com.inductiveautomation.ignition.designer.tags.frame.actions.ExportAction.actionPerformed(ImportExportActions.kt:340)\*
- at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)\*
- at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)\*
- at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)\*
- at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)\*
- at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)\*
- at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)\*
- at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)\*
- at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)\*
- at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)\*
- at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)\*
- at java.desktop/java.awt.Component.processEvent(Unknown Source)\*
- at java.desktop/java.awt.Container.processEvent(Unknown Source)\*
- at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)\*
- at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)\*
- at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)\*
- at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)\*
- at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)\*
- at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)\*
- at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)\*
- at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)\*
- at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)\*
- at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)\*
- at java.desktop/java.awt.EventQueue$4.run(Unknown Source)\*
- at java.desktop/java.awt.EventQueue$4.run(Unknown Source)\*
- at java.base/java.security.AccessController.doPrivileged(Native Method)\*
- at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)\*
- at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)\*
- at java.desktop/java.awt.EventQueue$5.run(Unknown Source)\*
- at java.desktop/java.awt.EventQueue$5.run(Unknown Source)\*
- at java.base/java.security.AccessController.doPrivileged(Native Method)\*
- at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)\*
- at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)\*
- at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)\*
- at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)\*
- at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)\*
- at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)\*
- at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)\*
- at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)\*  
_Caused by: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: java.lang.RuntimeException: Error cloning object through serialization._
- at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.newGatewayException(GatewayInterface.java:351)\*
- at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:325)\*
- at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:278)\*
- at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.invoke(GatewayInterface.java:954)\*
- at com.inductiveautomation.ignition.designer.tags.frame.actions.ExportTaskFactory.createWritingTask$lambda-2(ImportExportActions.kt:532)\*
- at com.inductiveautomation.ignition.designer.tags.frame.actions.TagExporterTask.writeToFile(ImportExportActions.kt:568)\*
- ... 41 more\*  
_Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Error cloning object through serialization._
- at java.util.concurrent.CompletableFuture.reportGet(null)\*
- at java.util.concurrent.CompletableFuture.get(null)\*
- at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.TagProviderRpc.getTagExport(TagProviderRpc.java:734)\*
- at jdk.internal.reflect.GeneratedMethodAccessor70.invoke(null)\*
- at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(null)\*
- at java.lang.reflect.Method.invoke(null)\*
- at com.inductiveautomation.ignition.gateway.servlets.gateway.AbstractGatewayFunction.invoke(AbstractGatewayFunction.java:228)\*
- at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:431)\*
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)\*
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\*
- at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:86)\*
- at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1450)\*
- at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)\*
- at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)\*
- at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)\*
- at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\*
- at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)\*
- at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\*
- at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)\*
- at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)\*
- at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\*
- at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)\*
- at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\*
- at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)\*
- at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)\*
- at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\*
- at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)\*
- at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\*
- at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\*
- at com.inductiveautomation.catapult.handlers.RemoteHostNameLookupHandler.handle(RemoteHostNameLookupHandler.java:121)\*
- at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\*
- at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)\*
- at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)\*
- at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)\*
- at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\*
- at org.eclipse.jetty.server.Server.handle(Server.java:516)\*
- at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)\*
- at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)\*
- at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)\*
- at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)\*
- at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)\*
- at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)\*
- at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)\*
- at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)\*
- at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)\*
- at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)\*
- at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)\*
- at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)\*
- at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)\*
- at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)\*
- at java.lang.Thread.run(null)\*

_Ignition v8.1.22 (b2022110109)_  
_Java: Azul Systems, Inc. 11.0.16.1_

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [November 8, 2022, 3:16pm UTC](https://forum.inductiveautomation.com/t/error-cloning-object-through-serialization/66229/2 "2022-11-08T15:16:04Z")

</div>

Please share your code as well.
