Re: [dspace-tech] Re: Cover Pages with 7.x?
On Tue, Apr 04, 2023 at 09:45:19PM -0700, darryl@usask.ca wrote: > Just as an FYI to anyone that might stumble across this, through trial and > error I discovered that removing the citation-page.enabled_communities > setting from my local.cfg solved the problem. I haven't looked into the > DSpace code to sort out why that may be. The communities we had listed in > that setting existed. We only wanted cover page generation on a couple of > our communities, so I was able to just list the collections individually in > citation-page.enabled_collections and achieve the same effect. > > - Darryl The 'main' branch, which is still pretty close to 7.5, has this at line 163: citationEnabledCollectionsList.add(collection.getHandle()); My first guess is that one of your collections has no Handle, but I have no idea how that might happen. I'm assuming that the UnsupportedOperationException is from trying to add a null reference to that List. Pulling the 'collection.getHandle()' out of the 'add' to a local variable and testing it for null would (a) test this theory, (b) be a good idea anyway since it's cheap sanitation, and (c) allow you to log *which* Collection has no Handle (if any). > On Tuesday, April 4, 2023 at 3:37:20 PM UTC-6 darryl@usask.ca wrote: > > > Is anyone using the cover page generation with 7.x (specifically 7.5)? > > > > Building the backend seems to work without issue, but when I include the > > settings from citation-page.cfg in my local.cfg file I get the errors below > > in my dspace.log during startup. > > > > We're attempting to enable this for just a couple of collections using the > > citation-page.enabled_collections setting, and the other settings are > > just local tweaks to the default examples (using our own institution names, > > URL etc). > > > > Is anyone using cover pages with 7.x? Any hints on what might be causing > > the error below? > > > > Thanks! > > > > - Darryl > > > > > > > > 2023-04-04 14:00:15,814 WARN unknown unknown > > org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext > > > > @ Exception encountered during context initialization - cancelling refresh > > attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: > > Error creating bean with name 'bitstreamRestController': Unsatisfied > > dependency expressed through field 'citationDocumentService'; nested > > exception is org.springframework.beans.factory.BeanCreationException: Error > > creating bean with name > > 'org.dspace.disseminate.CitationDocumentServiceImpl#0' defined in file > > [/data/dspace/config/spring/api/core-services.xml]: Invocation of init > > method failed; nested exception is java.lang.UnsupportedOperationException > > 2023-04-04 14:00:15,837 INFO unknown unknown > > org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener > > > > @ > > > > Error starting ApplicationContext. To display the conditions report re-run > > your application with 'debug' enabled. > > 2023-04-04 14:00:15,873 ERROR unknown unknown > > org.springframework.boot.SpringApplication @ Application run failed > > org.springframework.beans.factory.UnsatisfiedDependencyException: Error > > creating bean with name 'bitstreamRestController': Unsatisfied dependency > > expressed through field 'citationDocumentService'; nested exception is > > org.springframework.beans.factory.BeanCreationException: Error creating > > bean with name 'org.dspace.disseminate.CitationDocumentServiceImpl#0' > > defined in file [/data/dspace/config/spring/api/core-services.xml]: > > Invocation of init method failed; nested exception is > > java.lang.UnsupportedOperationException > > at > > org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659) > > > > ~[spring-beans-5.3.20.jar:5.3.20] > > at > > org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) > > > > ~[spring-beans-5.3.20.jar:5.3.20] > > at > > org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) > > > > ~[spring-beans-5.3.20.jar:5.3.20] > > at > > org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) > > > > ~[spring-beans-5.3.20.jar:5.3.20] > > at > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) > > > > ~[spring-beans-5.3.20.jar:5.3.20] > > at > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) > > > > ~[spring-beans-5.3.20.jar:5.3.20] > > at > > org.s
[dspace-tech] Re: Cover Pages with 7.x?
Just as an FYI to anyone that might stumble across this, through trial and error I discovered that removing the citation-page.enabled_communities setting from my local.cfg solved the problem. I haven't looked into the DSpace code to sort out why that may be. The communities we had listed in that setting existed. We only wanted cover page generation on a couple of our communities, so I was able to just list the collections individually in citation-page.enabled_collections and achieve the same effect. - Darryl On Tuesday, April 4, 2023 at 3:37:20 PM UTC-6 darryl@usask.ca wrote: > Is anyone using the cover page generation with 7.x (specifically 7.5)? > > Building the backend seems to work without issue, but when I include the > settings from citation-page.cfg in my local.cfg file I get the errors below > in my dspace.log during startup. > > We're attempting to enable this for just a couple of collections using the > citation-page.enabled_collections setting, and the other settings are > just local tweaks to the default examples (using our own institution names, > URL etc). > > Is anyone using cover pages with 7.x? Any hints on what might be causing > the error below? > > Thanks! > > - Darryl > > > > 2023-04-04 14:00:15,814 WARN unknown unknown > org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext > > @ Exception encountered during context initialization - cancelling refresh > attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: > Error creating bean with name 'bitstreamRestController': Unsatisfied > dependency expressed through field 'citationDocumentService'; nested > exception is org.springframework.beans.factory.BeanCreationException: Error > creating bean with name > 'org.dspace.disseminate.CitationDocumentServiceImpl#0' defined in file > [/data/dspace/config/spring/api/core-services.xml]: Invocation of init > method failed; nested exception is java.lang.UnsupportedOperationException > 2023-04-04 14:00:15,837 INFO unknown unknown > org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener > > @ > > Error starting ApplicationContext. To display the conditions report re-run > your application with 'debug' enabled. > 2023-04-04 14:00:15,873 ERROR unknown unknown > org.springframework.boot.SpringApplication @ Application run failed > org.springframework.beans.factory.UnsatisfiedDependencyException: Error > creating bean with name 'bitstreamRestController': Unsatisfied dependency > expressed through field 'citationDocumentService'; nested exception is > org.springframework.beans.factory.BeanCreationException: Error creating > bean with name 'org.dspace.disseminate.CitationDocumentServiceImpl#0' > defined in file [/data/dspace/config/spring/api/core-services.xml]: > Invocation of init method failed; nested exception is > java.lang.UnsupportedOperationException > at > org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) > > ~[spring-beans-5.3.20.jar:5.3.20] > at > o