-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
12.0.2.Final
-
None
-
Undefined
I have an application using Infinispan v11 that I'm trying to upgrade to v12.
On start up we preload all data from the JDBC string stores. This data has been marshalled with a number of custom ProtoStream user types registered using a SerializationContextInitializer.
This all works fine with v11, but on starting the application with v12 it appears that Infinispan is not using the user types when deserialising the data on preload.
From the logs I can see that it initially finds the user types (the proto file for this test is called "myproject.proto"):
2021-03-19 10:07:02.438 INFO 95825 — [ main] org.infinispan.CONTAINER : ISPN000128: Infinispan version: Infinispan 'Lockdown' 12.0.2.Final
2021-03-19 10:07:02.439 DEBUG 95825 — [ main] o.i.p.impl.SerializationContextImpl : Registering proto files : [myproject.proto]
2021-03-19 10:07:02.441 DEBUG 95825 — [ main] o.i.p.descriptors.FileDescriptor : Resolving dependencies of myproject.proto
2021-03-19 10:07:02.441 DEBUG 95825 — [ main] o.i.p.descriptors.ResolutionContext : File resolved successfully : myproject.proto
2021-03-19 10:07:02.455 DEBUG 95825 — [ main] o.i.p.impl.SerializationContextImpl : Registering proto files : [persistence.commons.proto]
2021-03-19 10:07:02.459 DEBUG 95825 — [ main] o.i.p.descriptors.FileDescriptor : Resolving dependencies of persistence.commons.proto
2021-03-19 10:07:02.459 DEBUG 95825 — [ main] o.i.p.descriptors.ResolutionContext : File resolved successfully : persistence.commons.proto
2021-03-19 10:07:02.460 DEBUG 95825 — [ main] o.i.p.impl.SerializationContextImpl : Registering proto files : [persistence.core.proto]
2021-03-19 10:07:02.461 DEBUG 95825 — [ main] o.i.p.descriptors.FileDescriptor : Resolving dependencies of persistence.core.proto
2021-03-19 10:07:02.462 DEBUG 95825 — [ main] o.i.p.descriptors.ResolutionContext : File resolved successfully : persistence.core.proto
2021-03-19 10:07:02.482 DEBUG 95825 — [ main] o.i.p.impl.SerializationContextImpl : Registering proto files : [global.commons.proto]
2021-03-19 10:07:02.482 DEBUG 95825 — [ main] o.i.p.descriptors.FileDescriptor : Resolving dependencies of global.commons.proto
2021-03-19 10:07:02.482 DEBUG 95825 — [ main] o.i.p.descriptors.ResolutionContext : File resolved successfully : global.commons.proto
2021-03-19 10:07:02.483 DEBUG 95825 — [ main] o.i.p.impl.SerializationContextImpl : Registering proto files : [persistence.commons.proto]
2021-03-19 10:07:02.484 DEBUG 95825 — [ main] o.i.p.descriptors.FileDescriptor : Resolving dependencies of persistence.commons.proto
2021-03-19 10:07:02.484 DEBUG 95825 — [ main] o.i.p.descriptors.ResolutionContext : File resolved successfully : persistence.commons.proto
2021-03-19 10:07:02.484 DEBUG 95825 — [ main] o.i.p.impl.SerializationContextImpl : Registering proto files : [persistence.core.proto]
2021-03-19 10:07:02.486 DEBUG 95825 — [ main] o.i.p.descriptors.FileDescriptor : Resolving dependencies of persistence.core.proto
2021-03-19 10:07:02.486 DEBUG 95825 — [ main] o.i.p.descriptors.ResolutionContext : File resolved successfully : persistence.core.proto
However when it then looks at the persistent store it seems to register proto files again, this time without the user types (this also occurs on a different thread):
2021-03-19 10:07:08.299 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.j.impl.table.TableManagerFactory : Guessing database version as '14.0'. If this is incorrect, please specify both the correct major and minor version of your database using the 'databaseMajorVersion' and 'databaseMinorVersion' attributes in your configuration.
2021-03-19 10:07:08.309 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.impl.SerializationContextImpl : Registering proto files : [persistence.commons.proto]
2021-03-19 10:07:08.310 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.descriptors.FileDescriptor : Resolving dependencies of persistence.commons.proto
2021-03-19 10:07:08.311 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.descriptors.ResolutionContext : File resolved successfully : persistence.commons.proto
2021-03-19 10:07:08.311 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.descriptors.FileDescriptor : Resolving dependencies of persistence.core.proto
2021-03-19 10:07:08.311 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.descriptors.ResolutionContext : File resolved successfully : persistence.core.proto
2021-03-19 10:07:08.312 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.impl.SerializationContextImpl : Registering proto files : [persistence.core.proto]
2021-03-19 10:07:08.313 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.descriptors.FileDescriptor : Resolving dependencies of persistence.core.proto
2021-03-19 10:07:08.313 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.descriptors.ResolutionContext : File resolved successfully : persistence.core.proto
2021-03-19 10:07:08.314 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.impl.SerializationContextImpl : Registering proto files : [persistence.jdbc.proto]
2021-03-19 10:07:08.314 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.descriptors.FileDescriptor : Resolving dependencies of persistence.jdbc.proto
2021-03-19 10:07:08.314 DEBUG 95825 — [68.1.148]-p3-t1] o.i.p.descriptors.ResolutionContext : File resolved successfully : persistence.jdbc.proto
The end result is a large number of exceptions such as:
...
Caused by: java.lang.IllegalArgumentException: No marshaller registered for Protobuf type myproject.CachedFilm
at org.infinispan.protostream.impl.SerializationContextImpl.getMarshallerDelegate(SerializationContextImpl.java:286)
at org.infinispan.protostream.WrappedMessage.readMessage(WrappedMessage.java:386)
at org.infinispan.protostream.ProtobufUtil.fromWrappedByteArray(ProtobufUtil.java:114)
at org.infinispan.marshall.protostream.impl.AbstractInternalProtoStreamMarshaller.objectFromByteBuffer(AbstractInternalProtoStreamMarshaller.java:97)
at org.infinispan.marshall.persistence.impl.MarshallableEntryImpl.unmarshall(MarshallableEntryImpl.java:246)
... 17 common frames omitted
Looking through the Git commits in 12 leads me to wonder if this is stemming from the changes introduced for the creation of the META tables - specifically https://github.com/infinispan/infinispan/pull/8620/commits/77f03135e4bd1b09d24cb94fc301b60bc472c575
- is related to
-
ISPN-13335 Sql Store with Server mode is not finding the protobuff schema
-
- Closed
-
-
ISPN-13336 The ___protobuf_metadata cache should register proto schemas with the user context
-
- Closed
-