You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicvoidbasicUse() {
System.out.println("\n\n1. Demonstrating basic usage of Infinispan. This cache stores arbitrary Strings.");
Cache<String, ArrayList<Sensor>> cache = cacheManager.getCache("stockTickers", true);
cache.put("test", newArrayList<>(List.of(newSensor(1), newSensor(2), newSensor(3), newSensor(4))));
// this failsList<Sensor> test = cache.get("test");
}
yields in: Exception in thread "main" org.infinispan.commons.dataconversion.EncodingException: ISPN000495: ProtostreamTranscoder encountered error transcoding content because in this code, since in the example the array contains 4elements (4tags and 4 bytes arrays), the field count gives 8, throwing the error. If you only add one into the list the code works:
Hi
With the following cache definition e.g:
Cache<String, ArrayList<Sensor>>
, with Protobuf, the values are not being marshalled.To recreated this issue, you can create a new project:
added the latest lib in the pom.xml:
Edited the upd xml file:
A very simple POJO
This code:
yields in: Exception in thread "main" org.infinispan.commons.dataconversion.EncodingException: ISPN000495: ProtostreamTranscoder encountered error transcoding content because in this code, since in the example the array contains 4elements (4tags and 4 bytes arrays), the field count gives 8, throwing the error. If you only add one into the list the code works:
I've tried simple types, like a list of integers
Cache<String, ArrayList<Integer>>
and it works because of the break in the switchThe text was updated successfully, but these errors were encountered: