Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7354 Upgrade JBoss Cache to 3.2.11
  3. JBPAPP-9574

ClassNotFoundException during JBoss Cache replication with lazy deserialization

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Done
    • Major
    • EAP_EWP 5.2.0
    • EAP_EWP 5.1.2
    • Clustering
    • None
    • Release Notes
    • Hide
      JBoss Cache unmarshalled return values that were going to be discarded during replication. When the cache contained objects in an isolated classloader, it was unable to unmarshall the objects and an exception was thrown, preventing the replication from succeeding. The return values are now no longer unmarshalled since they will be discarded. The exception is therefore not thrown and the replication finishes successfully.
      Show
      JBoss Cache unmarshalled return values that were going to be discarded during replication. When the cache contained objects in an isolated classloader, it was unable to unmarshall the objects and an exception was thrown, preventing the replication from succeeding. The return values are now no longer unmarshalled since they will be discarded. The exception is therefore not thrown and the replication finishes successfully.
    • Documented as Resolved Issue
    • NEW

    Description

      Replicating a cache put tries to deserialize the original value on the remote nodes.
      If the classloader of the JGroups call is not the correct classloader for the value, a ClassCastException occurs and aborts the put.
      Since the value is never returned, it should not be deserialized.

      ERROR [org.jboss.cache.interceptors.TxInterceptor] prepare failed!
      org.jboss.cache.CacheException: Unable to unmarshall value
      at org.jboss.cache.marshall.MarshalledValue.deserialize(MarshalledValue.java:117)
      at org.jboss.cache.marshall.MarshalledValue.get(MarshalledValue.java:177)
      at org.jboss.cache.interceptors.MarshalledValueInterceptor.processRetVal(MarshalledValueInterceptor.java:181)
      at org.jboss.cache.interceptors.MarshalledValueInterceptor.compactAndProcessRetVal(MarshalledValueInterceptor.java:172)
      at org.jboss.cache.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:109)
      at org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
      at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
      at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:501)
      at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:388)
      at org.jboss.cache.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:134)
      ...
      [JGroups RPC call]
      Caused by: java.lang.ClassNotFoundException: com.example.MyClass
      ...
      at java.lang.Class.forName(Class.java:247)
      at org.jboss.util.stream.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.java:81)
      ...

      Attachments

        Activity

          People

            rhn-support-dereed Dennis Reed
            rhn-support-dereed Dennis Reed
            Petr Penicka Petr Penicka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: