1 Reply Latest reply on Oct 21, 2014 3:34 PM by Hernán Cussi

    Exception when starting HotrodServer

    Ray Douglass Newbie

      I get an exception when I start up my HotRodServer. I'm trying to setup a HotRodServer in the local JVM so I can use both an external HotRod client & the EmbeddedCacheManager locally (http://infinispan.org/docs/6.0.x/user_guide/user_guide.html#_interoperability_between_embedded_and_remote_server_endpoin…). Since I want to be able to query the HotRodServer remotely, I need to use the ProtoStreamMarshaller (http://infinispan.org/docs/6.0.x/user_guide/user_guide.html#_querying_via_the_java_hot_rod_client).

       

      See the code & exception below:

       

      import org.infinispan.configuration.cache.ConfigurationBuilder;
      import org.infinispan.manager.DefaultCacheManager;
      import org.infinispan.manager.EmbeddedCacheManager;
      import org.infinispan.server.hotrod.HotRodServer;
      import org.infinispan.server.hotrod.configuration.HotRodServerConfiguration;
      import org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder;
      
      public class EmbeddedInfinispan {
      
          public static void main(String[] args) throws Exception {
              EmbeddedCacheManager manager = new DefaultCacheManager(new ConfigurationBuilder().compatibility().enable()
                      .marshaller(new org.infinispan.client.hotrod.marshall.ProtoStreamMarshaller()).build());
              HotRodServer server = new HotRodServer();
              HotRodServerConfiguration config = new HotRodServerConfigurationBuilder().build();
              server.start(config, manager);
          }
      }
      

      And the Exception

       

      Exception in thread "main" org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Failed to initialise serialization context
          at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:241)
          at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:545)
          at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:516)
          at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:398)
          at org.infinispan.server.hotrod.HotRodServer.startDefaultCache(HotRodServer.scala:84)
          at org.infinispan.server.core.AbstractProtocolServer.startInternal(AbstractProtocolServer.scala:37)
          at org.infinispan.server.hotrod.HotRodServer.startInternal(HotRodServer.scala:59)
          at org.infinispan.server.hotrod.HotRodServer.startInternal(HotRodServer.scala:28)
          at org.infinispan.server.core.AbstractProtocolServer.start(AbstractProtocolServer.scala:44)
          at EmbeddedInfinispan.main(EmbeddedInfinispan.java:15)
      Caused by: org.infinispan.commons.CacheException: Failed to initialise serialization context
          at org.infinispan.query.remote.LifecycleManager.initProtobufMetadataManager(LifecycleManager.java:52)
          at org.infinispan.query.remote.LifecycleManager.cacheManagerStarted(LifecycleManager.java:70)
          at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:228)
          ... 9 more
      Caused by: com.google.protobuf.Descriptors$DescriptorValidationException: query.proto: Dependencies passed to FileDescriptor.buildFrom() don't match those listed in the FileDescriptorProto.
          at com.google.protobuf.Descriptors$FileDescriptor.buildFrom(Descriptors.java:240)
          at org.infinispan.protostream.impl.SerializationContextImpl.registerProtofile(SerializationContextImpl.java:63)
          at org.infinispan.query.remote.client.MarshallerRegistration.registerMarshallers(MarshallerRegistration.java:15)
          at org.infinispan.query.remote.LifecycleManager.initProtobufMetadataManager(LifecycleManager.java:48)
          ... 11 more
      

      For completeness sake, here are the dependencies I'm using:

       

      <dependency org="org.jgroups" name="jgroups" rev="3.4.4.Final" />
      <dependency org="org.infinispan" name="infinispan-core" rev="6.0.2.Final" />
      <dependency org="org.infinispan" name="infinispan-query-dsl" rev="6.0.2.Final" />
      <dependency org="org.infinispan" name="infinispan-query" rev="6.0.2.Final" />
      <dependency org="org.infinispan" name="infinispan-lucene-directory" rev="6.0.2.Final" />
      <dependency org="org.hibernate.hql" name="hibernate-hql-lucene" rev="1.0.0.CR1" />
      <dependency org="org.hibernate.hql" name="hibernate-hql-parser" rev="1.0.0.CR1" />
      <dependency org="org.hibernate" name="hibernate-search-infinispan" rev="4.5.1.Final" />
      <dependency org="org.hibernate" name="hibernate-search-engine" rev="4.5.1.Final" />
      <dependency org="org.apache.lucene" name="lucene-core" rev="3.6.2" />
      <dependency org="org.infinispan" name="infinispan-commons" rev="6.0.2.Final" />
      <dependency org="org.infinispan" name="infinispan-client-hotrod" rev="6.0.2.Final" />
      <dependency org="org.infinispan.protostream" name="protostream" rev="1.0.2.Final" />
      <dependency org="org.infinispan" name="infinispan-remote-query-client" rev="6.0.2.Final" />
      <dependency org="org.infinispan" name="infinispan-remote-query-server" rev="6.0.2.Final" />
      <dependency org="org.infinispan" name="infinispan-server-hotrod" rev="6.0.2.Final" />
      <dependency org="org.infinispan" name="infinispan-server-core" rev="6.0.2.Final" />
      <dependency org="org.scala-lang" name="scala-library" rev="2.11.1" />
      <dependency org="io.netty" name="netty" rev="3.9.2.Final" />
      <dependency org="gnu-getopt" name="getopt" rev="1.0.10" />
      <dependency org="org.jboss.marshalling" name="jboss-marshalling" rev="1.4.7.Final" />
      <dependency org="org.jboss.marshalling" name="jboss-marshalling-river" rev="1.4.7.Final" />
      <dependency org="org.apache.avro" name="avro" rev="1.7.1" />
      <dependency org="com.google.protobuf" name="protobuf-java" rev="2.5.0"/>
      

       

      Any ideas on what is causing the exception? Am I missing some configuration?