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

Adding supervisor order bug

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.2, 3.0
    • Fix Version/s: 4.0
    • Component/s: JSPUI
    • Labels:
    • Attachments:
      1
    • Comments:
      4
    • Documentation Status:
      Not Required

      Description

      If you attempt to add a supervisor order when no workflow exists then this throws an internal error.

      Exception:
      org.postgresql.util.PSQLException: ERROR: insert or update on table "epersongroup2workspaceitem" violates foreign key constraint "epersongroup2workspaceitem_workspace_item_id_fkey"
      Detail: Key (workspace_item_id)=(-1) is not present in table "workspaceitem".
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1531)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1313)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:308)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      at org.dspace.storage.rdbms.DatabaseManager.execute(DatabaseManager.java:1429)
      at org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java:781)
      at org.dspace.eperson.Supervisor.add(Supervisor.java:191)
      at org.dspace.app.webui.servlet.admin.SuperviseServlet.addSupervisionOrder(SuperviseServlet.java:242)
      at org.dspace.app.webui.servlet.admin.SuperviseServlet.doDSPost(SuperviseServlet.java:111)
      at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:147)
      at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:105)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.dspace.app.webui.filter.AdminOnlyFilter.doFilter(AdminOnlyFilter.java:103)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:112)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:429)
      at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:384)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
      at java.lang.Thread.run(Thread.java:679)

      Steps to reproduce:
      1. Login with admin account.
      2. Navigate to the Dspace admin page (<dspaceurl>/dspace-admin/)
      3. Click supervisors link.
      4. Click "Add a Supervision Order" button
      5. Click "Submit Supervision Order" button

      I managed to reproduce this issue on Dspace 1.6.2 and Dspace3.0 RC 3. I have't tested if this issue occurs on any other versions of Dspace. I have created a fix for this issue. I've attached a patch with the fix.

        Attachments

          Activity

            People

            Assignee:
            zuki.ebetsu Keiji Suzuki
            Reporter:
            jonathanblood Jonathan Blood
            Reviewer:
            Andrea Bollini (4Science)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: