Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unknown user type with POF serialization

John GreggSep 18 2013

Hi all,

I'm using 3.6 and am just starting to implement POF.  In general it has been pretty easy but I seem to have a problem with my near scheme and POF.  Things work ok in my unit tests, but it doesn't work when I deploy to a single instance of WebLogic 12 on my laptop.  Here is an example scheme:

<near-scheme>

  <scheme-name>prod-near</scheme-name>

  <autostart>true</autostart>

  <front-scheme>

    <local-scheme>

      <high-units>{high-units 2000}</high-units>

      <expiry-delay>{expiry-delay 2h}</expiry-delay>

    </local-scheme>

  </front-scheme>

  <back-scheme>

    <distributed-scheme>

      <backing-map-scheme>

        <local-scheme>

          <high-units>{high-units 10000}</high-units>

          <expiry-delay>{expiry-delay 2h}</expiry-delay>

        </local-scheme>

      </backing-map-scheme>

      <serializer>

        <instance>

          <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>

          <init-params>

            <init-param>

              <param-value>/Bus/pof-config.xml</param-value>

              <param-value>String</param-value>

            </init-param>

          </init-params>

        </instance>

      </serializer>

    </distributed-scheme>

  </back-scheme>

</near-scheme>

I don't know if it matter, but some of my caches use another scheme that references this one as a parent:

<near-scheme>

  <scheme-name>daily-near</scheme-name>

  <scheme-ref>prod-near</scheme-ref>

  <autostart>true</autostart>

  <back-scheme>

    <distributed-scheme>

      <backing-map-scheme>

        <local-scheme>

          <high-units system-property="daily-near-high-units">{high-units 10000}</high-units>

          <expiry-delay>{expiry-delay 1d}</expiry-delay>

        </local-scheme>

      </backing-map-scheme>

      <serializer>

        <instance>

          <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>

          <init-params>

            <init-param>

              <param-value>/Bus/pof-config.xml</param-value>

              <param-value>String</param-value>

            </init-param>

          </init-params>

        </instance>

      </serializer>

    </distributed-scheme>

  </back-scheme>

</near-scheme>

Those schemes have existed for years.  I'm only now adding the serializers.  I use this same cache config file in my unit tests, as well as the same pof config file.  My unit tests do ExternalizableHelper.toBinary(o, pofContext) and ExternalizableHelper.fromBinary(b, pofContext).  I create the test pof context by doing new ConfigurablePofContext("/Bus/pof-config.xml").  I've also tried actually putting and getting an object to and from a cache in my unit tests.  Everything works as expected.

My type definition looks like this:

<user-type>

  <type-id>1016</type-id>

  <class-name>com.mycompany.mydepartment.bus.service.role.RoleResource</class-name>

</user-type>

I'm not using the tangosol.pof.enabled system property because I don't think it's necessary with the explicit serializers.

Here is part of a stack trace:

(Wrapped) java.io.IOException: unknown user type: com.mycompany.mydepartment.bus.service.role.RoleResource

    at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:214)

    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ConverterValueToBinary.convert(PartitionedCache.CDB:3)

    at com.tangosol.util.ConverterCollections$ConverterCacheMap.put(ConverterCollections.java:2486)

    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.put(PartitionedCache.CDB:1)

    at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)

    at com.tangosol.net.cache.CachingMap.put(CachingMap.java:943)

    at com.tangosol.net.cache.CachingMap.put(CachingMap.java:902)

    at com.tangosol.net.cache.CachingMap.put(CachingMap.java:814)

Any idea what I'm missing?

Thanks

John

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2013
Added on Sep 18 2013
0 comments
688 views