flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Metzger <rmetz...@apache.org>
Subject Re: NotSerializableException: jdk.nashorn.api.scripting.NashornScriptEngine
Date Fri, 05 Jun 2015 09:38:15 GMT
That should not happen. Which function (map, join, ..) are you using?
Are you using the the batch or the streaming API?
Which version of Flink are you using?

On Fri, Jun 5, 2015 at 11:35 AM, Ashutosh Kumar <ashutosh.discuss@gmail.com>
wrote:

> Thanks Robert.I tried this . It does not throw NotSerializableException
> exception.But the open method is not getting called.
>
> On Fri, Jun 5, 2015 at 1:58 PM, Robert Metzger <rmetzger@apache.org>
> wrote:
>
>> Hi,
>>
>> I guess you have a user function with a field for the scripting engine.
>> Can you change your user function into a Rich* function, initialize the
>> scripting engine in the open() method and make the field transient?
>>
>> That should resolve it.
>>
>> On Fri, Jun 5, 2015 at 10:25 AM, Ashutosh Kumar <
>> ashutosh.discuss@gmail.com> wrote:
>>
>>> I am trying to use java script engine to execute some rules on data set.
>>> But it is throwing
>>>
>>> NotSerializableException
>>> for jdk.nashorn.api.scripting.NashornScriptEngine.Not sure how to resolve
>>> this.
>>>
>>> Thanks
>>>
>>> Caused by: java.io.NotSerializableException:
>>> jdk.nashorn.api.scripting.NashornScriptEngine
>>> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
>>> at
>>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
>>> at
>>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
>>> at
>>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
>>> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
>>> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
>>> at
>>> org.apache.flink.util.InstantiationUtil.serializeObject(InstantiationUtil.java:314)
>>> at
>>> org.apache.flink.api.java.ClosureCleaner.ensureSerializable(ClosureCleaner.java:95)
>>>
>>
>>
>

Mime
View raw message