1 Reply Latest reply: Aug 4, 2014 1:03 AM by user9028169 RSS

    Coherence unknown user type error

    5e3a0793-c53c-4bbd-8f19-3c1f22b6ecd2

      I am getting the following error while trying to set up coherence on a project

       

      {"message":"unknown user type: com.trgr.cobalt.webcontent.coherence.PortableProperties","stackTrace":"java.lang.IllegalArgumentException: unknown user type: com.trgr.cobalt.webcontent.coherence.PortableProperties\r\n\tat com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:399)\r\n\tat com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:388)\r\n\tat com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1432)\r\n\tat com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:337)\r\n\tat com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2525)\r\n\tat com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:206)\r\n\tat com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ConverterValueToBinary.convert(DistributedCache.CDB:3)\r\n\tat com.tangosol.util.ConverterCollections$ConverterMap.put(ConverterCollections.java:1566)\r\n\tat com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.put(DistributedCache.CDB:1)\r\n\tat com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)\r\n\tat ....

       

      I have the following pof-config.xml file in my project


      From properties file:

      tangosol.pof.config=webcontent-pof-config.xml

       

      XML:

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE pof-config SYSTEM "pof-config.dtd">

       

      <pof-config>

          <user-type-list>

              <include>coherence-pof-config.xml</include>

              <user-type>

                  <type-id>16001</type-id>

                  <class-name>com.trgr.cobalt.webcontent.coherence.PortableProperties</class-name>

              </user-type>

          </user-type-list>

      </pof-config>

       

      PortableProperties is a pretty simple class that we use to interact with the coherence cache. It simply uses a Map<String, Object>, and reads/writes the contents to the Pof. Here is the class signature for reference

      public class PortableProperties extends AbstractEvolvable implements PortableObject, Serializable

       

      From what I can tell, that is all the configuration you need. Does anyone have any clue what I am missing to make this work? Thanks.