Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21425

Make BinaryMetadataWork Serializable

    XMLWordPrintable

    Details

      Description

      Unit tests reveal that BinaryMetadataWork is not Serializable but it should.

      This will prevent binary metadata extraction to work properly in cluster mode.

      main 18:12:01,818 WARN  [TransactionImpl] Unexpected exception from afterCompletion; continuing
      org.nuxeo.ecm.core.api.NuxeoException: Cannot serialize work of type org.nuxeo.binary.metadata.internals.BinaryMetadataWork
      	at org.nuxeo.ecm.core.work.TestWorkQueuing$1.clone(TestWorkQueuing.java:44)
      	at org.nuxeo.ecm.core.work.TestWorkQueuing$1.putElement(TestWorkQueuing.java:36)
      	at org.nuxeo.ecm.core.work.NuxeoBlockingQueue.put(NuxeoBlockingQueue.java:107)
      	at org.nuxeo.ecm.core.work.NuxeoBlockingQueue.offer(NuxeoBlockingQueue.java:90)
      	at org.nuxeo.ecm.core.work.MemoryBlockingQueue.workSchedule(MemoryBlockingQueue.java:179)
      	at org.nuxeo.ecm.core.work.MemoryWorkQueuing.workSchedule(MemoryWorkQueuing.java:65)
      	at org.nuxeo.ecm.core.work.WorkManagerImpl.schedule(WorkManagerImpl.java:698)
      	at org.nuxeo.ecm.core.work.WorkManagerImpl$WorkScheduling.afterCompletion(WorkManagerImpl.java:469)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.afterCompletion(TransactionImpl.java:540)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.afterCompletion(TransactionImpl.java:533)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:329)
      	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
      	at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.commit(NuxeoContainer.java:535)
      	at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:359)
      	at org.nuxeo.ecm.core.test.TransactionalFeature.nextTransaction(TransactionalFeature.java:74)
      	at org.nuxeo.ecm.core.test.TransactionalFeature.nextTransaction(TransactionalFeature.java:64)
      	at org.nuxeo.binary.metadata.test.TestBinaryMetadataAsyncListener.testListener(TestBinaryMetadataAsyncListener.java:80)
      Caused by: org.apache.commons.lang3.SerializationException: java.io.NotSerializableException: org.nuxeo.binary.metadata.internals.MetadataMappingDescriptor
      	at org.apache.commons.lang3.SerializationUtils.serialize(SerializationUtils.java:157)
      	at org.apache.commons.lang3.SerializationUtils.serialize(SerializationUtils.java:179)
      	at org.apache.commons.lang3.SerializationUtils.clone(SerializationUtils.java:82)
      	at org.nuxeo.ecm.core.work.TestWorkQueuing$1.clone(TestWorkQueuing.java:42)
      	... 63 more
      Caused by: java.io.NotSerializableException: org.nuxeo.binary.metadata.internals.MetadataMappingDescriptor
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
      	...
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      	at org.apache.commons.lang3.SerializationUtils.serialize(SerializationUtils.java:154)
      	... 66 more
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h