Uploaded image for project: 'ERM Platform'
  1. ERM Platform
  2. ERM-1816

Error on tagging an agreement line which references an external (eHoldings) resource

    XMLWordPrintable

    Details

    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      ERM Sprint 121, ERM Sprint 122, ERM Sprint 123, ERM Sprint 124
    • Development Team:
      Bienenvolk
    • Affected Institution:
      5 Colleges

      Description

      Overview:

      If you try to add a tag to an agreement line that uses an external resource, you get a 500 error. Only applies to agreement lines for external resources

      Steps to Reproduce:

      1. In a Folio environment with eHoldings configured
      2. Create an agreement
      3. Add an agreement line
      4. Link an eHolding resource to the agreement line and save
      5. Try to add a tag to the agreement line

      Expected Results:

      tag added
      Actual Results:

      500 response with stacktrace

      Error and stack trace:

      message: grails.views.ViewException: Error rendering view: nullstackTrace:
      grails.views.AbstractWritableScript.writeTo(AbstractWritableScript.groovy:46)
      grails.plugin.json.view.api.internal.DefaultGrailsJsonViewHelper$6.writeTo(DefaultGrailsJsonViewHelper.groovy:834)
      grails.plugin.json.view.JsonViewWritableScript.json(JsonViewWritableScript.groovy:126)
      grails.plugin.json.view.JsonViewWritableScript.json(JsonViewWritableScript.groovy:149)
      mod_agreements_entitlement__entitlement_gson.run(mod_agreements_entitlement__entitlement_gson:10)
      grails.plugin.json.view.JsonViewWritableScript.doWrite(JsonViewWritableScript.groovy:27)
      grails.views.AbstractWritableScript.writeTo(AbstractWritableScript.groovy:40)
      grails.views.mvc.GenericGroovyTemplateView.renderMergedOutputModel(GenericGroovyTemplateView.groovy:73)
      org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:317)
      grails.views.mvc.renderer.DefaultViewRenderer.render(DefaultViewRenderer.groovy:117)
      grails.artefact.controller.RestResponder$Trait$Helper.internalRespond(RestResponder.groovy:192)
      grails.artefact.controller.RestResponder$Trait$Helper.respond(RestResponder.groovy:98)
      java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      com.k_int.web.toolkit.rest.RestfulController$__tt__restfulController_update_closure2$_closure4.doCall(RestfulController.groovy:84)
      java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      org.grails.plugins.web.api.MimeTypesApiSupport.getResponseForFormat(MimeTypesApiSupport.groovy:142)
      org.grails.plugins.web.api.MimeTypesApiSupport.withFormatInternal(MimeTypesApiSupport.groovy:77)
      org.grails.plugins.web.api.MimeTypesApiSupport.withFormat(MimeTypesApiSupport.groovy:40)
      org.grails.web.mime.HttpServletRequestExtension.withFormat(HttpServletRequestExtension.groovy:45)
      java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      com.k_int.web.toolkit.rest.RestfulController.$tt__restfulController_update(RestfulController.groovy:75)
      java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      grails.gorm.transactions.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:94)
      org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
      grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:91)
      java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      com.k_int.web.toolkit.rest.TenantAwareRestfulController.$tt__tenantAwareRestfulController_update(TenantAwareRestfulController.groovy:52)
      java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      grails.gorm.transactions.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:94)
      org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
      grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:91)
      java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      grails.gorm.multitenancy.Tenants$_withId_closure2$_closure6.doCall(Tenants.groovy:265)
      org.grails.orm.hibernate.GrailsHibernateTemplate.doExecute(GrailsHibernateTemplate.java:297)
      org.grails.orm.hibernate.GrailsHibernateTemplate.execute(GrailsHibernateTemplate.java:241)
      org.grails.orm.hibernate.GrailsHibernateTemplate.executeWithNewSession(GrailsHibernateTemplate.java:153)
      org.grails.orm.hibernate.GrailsHibernateTemplate.executeWithExistingOrCreateNewSession(GrailsHibernateTemplate.java:207)
      org.grails.orm.hibernate.AbstractHibernateDatastore.withNewSession(AbstractHibernateDatastore.java:369)
      grails.gorm.multitenancy.Tenants$_withId_closure2.doCall(Tenants.groovy:258)
      grails.gorm.multitenancy.Tenants$CurrentTenant.withTenant(Tenants.groovy:358)
      grails.gorm.multitenancy.Tenants.withId(Tenants.groovy:236)
      org.grails.datastore.gorm.services.DefaultTenantService.withCurrent(DefaultTenantService.groovy:71)
      org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker.invoke(DefaultGrailsControllerClass.java:223)
      org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188)
      org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
      org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:920)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
      io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
      io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
      io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
      org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
      org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
      grails.plugin.springsecurity.web.UpdateRequestContextHolderExceptionTranslationFilter.doFilter(UpdateRequestContextHolderExceptionTranslationFilter.groovy:64)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.groovy:54)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:150)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.groovy:64)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.groovy:58)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      com.k_int.okapi.springsecurity.OkapiAuthenticationFilter.successfulAuthentication(OkapiAuthenticationFilter.groovy:87)
      org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:240)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
      org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
      org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
      io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
      io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
      io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
      io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
      io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
      io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
      io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
      io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
      io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
      io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
      io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
      io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
      io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
      io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)
      io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
      java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      java.base/java.lang.Thread.run(Thread.java:834)

      Example curl on folio testing that generated this

      curl 'https://folio-snapshot-okapi.dev.folio.org/erm/entitlements/5475e046-07b1-49da-898c-b6ad46f927be' \
        -X 'PUT' \
        -H 'authority: folio-snapshot-okapi.dev.folio.org' \
        -H 'sec-ch-ua: "Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92"' \
        -H 'x-okapi-tenant: diku' \
        -H 'accept-language: en-US' \
        -H 'sec-ch-ua-mobile: ?0' \
        -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36' \
        -H 'content-type: application/json' \
        -H 'accept: text/plain' \
        -H 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjljZWU4MzQ1LTdjYjktNWU1Zi05MDcwLWY5YjRiY2UxNzEwMCIsImlhdCI6MTYyODI1NjQzOCwidGVuYW50IjoiZGlrdSJ9.5ruoKotuHjpngKHgOwS2bvF_mKy8FRbATYfGzOZ0sIs' \
        -H 'origin: https://folio-snapshot.dev.folio.org' \
        -H 'sec-fetch-site: same-site' \
        -H 'sec-fetch-mode: cors' \
        -H 'sec-fetch-dest: empty' \
        -H 'referer: https://folio-snapshot.dev.folio.org/' \
        --data-raw '{"tags":[{"value":"tag1"}]}' \
        --compressed

      Dev task breakdown

      Investigate view files for tags on agreement lines
       

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ostephens Owen Stephens
                Reporter:
                ostephens Owen Stephens
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases