Error cloning object through serialization

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

Please share your code as well.