简体   繁体   English

调用提交时出错:java.io.NotSerializableException

[英]Error calling a submit: java.io.NotSerializableException

There is a Web Panel from where a Call is made to a Procedure as a Submit. 有一个Web面板,可从该面板调用作为“提交”的过程。 The Submit is sent an empty String and a collection SDT as parameter. 向Submit发送一个空字符串和一个集合SDT作为参数。 When it is called, it fails with this error: java.io.NotSerializableException. 调用它时,它将失败并显示以下错误: java.io.NotSerializableException. How can I solve this? 我该如何解决?

The thrown exception is telling you what is the problem. 抛出的异常告诉您问题出在哪里。 You need to make the required object to be serializable. 您需要使所需的对象可序列化。
It can be done by implementing java.io.Serializable interface : 可以通过实现java.io.Serializable接口来完成:

class MySerializableClass implements Serializable {}

Now MySerializableClass is serializable and can be used as bean etc. 现在MySerializableClass是可序列化的,可以用作bean等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM