Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-2863

Checksum checker errors out with services refactor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted / Claimed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Needed

      Description

      Checksum checker errors out:
      https://www.irccloud.com/pastebin/r67glKqq/

      Code is/was:
      https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/content/dao/impl/BitstreamDAOImpl.java#L68
      Criteria criteria = createCriteria(context, Bitstream.class).add(Subqueries.propertyNotIn("id", DetachedCriteria.forClass(MostRecentChecksum.class)));

      I've changed that to:
      DetachedCriteria d = DetachedCriteria.forClass(MostRecentChecksum.class, "mrc");
      d.setProjection(Projections.projectionList().add(Projections.property("mrc.bitstream")));

      Criteria criteria = createCriteria(context, Bitstream.class, "b")
      .add(Subqueries.propertyNotIn("b.id", d));

      And that doesn't error out. (PR coming, once I get it all successful).
      However, I get another error, that I don't have a solution to yet:

      /dspace/bin/dspace checker -v
      Exception: not-null property references a null or transient value: org.dspace.checker.MostRecentChecksum.checksumAlgorithm
      org.hibernate.PropertyValueException: not-null property references a null or transient value: org.dspace.checker.MostRecentChecksum.checksumAlgorithm
      at org.hibernate.engine.internal.Nullability.checkNullability(Nullability.java:103)
      at org.hibernate.action.internal.AbstractEntityInsertAction.nullifyTransientReferencesIfNotAlready(AbstractEntityInsertAction.java:132)
      at org.hibernate.action.internal.AbstractEntityInsertAction.makeEntityManaged(AbstractEntityInsertAction.java:141)
      at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:235)
      at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:209)
      at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:152)
      at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:329)
      at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:286)
      at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:192)
      at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:135)
      at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:208)
      at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:151)
      at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:78)
      at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:772)
      at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:746)
      at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:750)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:352)
      at com.sun.proxy.$Proxy37.persist(Unknown Source)
      at org.dspace.core.AbstractHibernateDAO.create(AbstractHibernateDAO.java:30)
      at org.dspace.checker.MostRecentChecksumServiceImpl.updateMissingBitstreams(MostRecentChecksumServiceImpl.java:110)
      at org.dspace.checker.CheckerCommand.process(CheckerCommand.java:123)
      at org.dspace.app.checker.ChecksumChecker.main(ChecksumChecker.java:231)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
      at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)

        Attachments

          Activity

            People

            Assignee:
            peterdietz Peter Dietz
            Reporter:
            peterdietz Peter Dietz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: