Lukas and Knut, thank you for confirming! I will keep an eye on this github 
issue.

Thanks for your help and for building an amazing product!

On Monday, January 20, 2020 at 2:22:36 AM UTC-6, Lukas Eder wrote:
>
> Agreed, an oversight.
>
> On Mon, Jan 20, 2020 at 9:12 AM Knut Wannheden <knut.w...@gmail.com 
> <javascript:>> wrote:
>
>> Hi Max,
>>
>> Thank you for your message. Yes, I believe this is an oversight. I have 
>> reported a corresponding issue: https://github.com/jOOQ/jOOQ/issues/9747.
>>
>> Once the issue has been fixed (and backported to the 3.12 branch) you can 
>> build jOOQ from sources and use that until the next patch release is 
>> available.
>>
>> Best regards,
>> Knut
>>
>> On Saturday, January 18, 2020 at 5:54:24 PM UTC+1, Max Kremer wrote:
>>>
>>> After upgrading from version 3.10 to 3.12 we noticed that we had some 
>>> problem with the new JSON datatypes. Specifically we were seeing:
>>>
>>> java.io.NotSerializableException: org.jooq.JSONB
>>>
>>>
>>> We we use REDIS caching with all our queries in the form of a 
>>> MockDataProvider
>>>
>>> public class CachedDataProvider implements MockDataProvider 
>>>
>>> The exception above is throw when we try to serialize the *ResultSet*
>>>
>>>
>>> private MockResult[] cacheResult(byte[] key, Result<?> result) {
>>>  try {
>>>       cache.set(key, serializeResult(result), helper.getTTL());
>>>  } catch (Exception e) {
>>>       logger.error("Failed to cache SQL result", e);
>>>  }
>>>  return mockResult(result);
>>>  }
>>>
>>>
>>>
>>> private byte[] serializeResult(Result<?> object) {
>>>  try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream()) {
>>>        ObjectOutputStream objectStream = new ObjectOutputStream(
>>> byteStream);   
>>>        objectStream.writeObject(object);
>>>        objectStream.flush();
>>>  return byteStream.toByteArray();
>>>  } catch (IOException ex) {
>>>  logger.error("Error while serializing Result", ex);
>>>  }
>>>  return null;
>>>  }
>>>
>>> Enter code here...
>>>
>>>
>>> Trying to serialize the Result using objectStream.writeObject(object
>>> *); * is where the exception is thrown.
>>>
>>> Any advice on how to handle this? The only solution that comes to mind 
>>> is extending JOOQ's JSONB class and implementing serializable.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jooq...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jooq-user/6dc43c52-62cc-444d-84a6-cb6af0622558%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jooq-user/6dc43c52-62cc-444d-84a6-cb6af0622558%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/db1b4db1-6638-42ba-9171-b5b05b887d09%40googlegroups.com.

Reply via email to