2 Replies Latest reply on May 15, 2014 1:44 PM by van.halbert

    Registering marshallers on the SerializationContext

    van.halbert

      Trying to register the marshallers from a client, but getting this error:

       

      java.lang.IllegalArgumentException: Message descriptor not found : quickstart.Person.PhoneNumber

        at org.infinispan.protostream.impl.SerializationContextImpl.getMessageDescriptor(SerializationContextImpl.java:104)

        at org.infinispan.protostream.impl.SerializationContextImpl.registerMarshaller(SerializationContextImpl.java:124)

        at org.teiid.resource.adapter.infinispan.dsl.InfinispanConnectionImpl.registerMarshallers(InfinispanConnectionImpl.java:180)

       

       

      I've got the JDG 6.2 server running, with the remote-query quick start  executed to load some initial data.

       

      My client app is trying to register the marshallers, the ones defined in remote-query quick start.  I've tried both methods of registration:

       

      ctx.registerMarshaller(clzz, baseMashaller);


      and

      ctx.registerMarshaller(baseMashaller);


      and both produce the same problem.

       

      Since the AddressBookManager performed the registerProtofile, is that good for all clients, or does every client need to so that too?

       

      I only assumed the client needed to to register the marshallers with the cacheManager in use. 

       

      Not sure what I'm missing here. 

       

      Your help would be appreciated.

       

      Van

        • 1. Re: Registering marshallers on the SerializationContext
          van.halbert

          And to confirm, the protofile is being registered just prior to the above:

           

            ctx.registerProtofile(InfinispanManagedConnectionFactory.class

            .getClassLoader().getResourceAsStream(

            config.getProtobinFile()));

          • 2. Re: Registering marshallers on the SerializationContext
            van.halbert

            Kinda strange, but I got it to work.  For what ever reason, the registering of the protofile by calling the above InputStream wasn't working, but no exception was being thrown.    Not until I changed it to the correct class (InfinispanConnectionImpl) did it read it correctly and the marshallers were able to register.

             

              ctx.registerProtofile(InfinispanConnectionImpl.class

              .getClassLoader().getResourceAsStream(

              config.getProtobinFile()));

             

            Sorry to waist your time.