On 18.1.2017 8:44, Steve C wrote:
Hi all,

Have built a new Debian Server (OpenJDK 1.8, Tomcat 8) and installed Dspace 6.0 /xmlui for testing. Asset store and Database were restored from our current version 5 production system and all seem to be working well apart from the Citation Cover Page.

If 'citation-page.enable_globally=true' is enabled in citation-page.cfg all is OK. However, comenting this out and instead setting up specific communities (eg citation-page.enabled_communities=11079/13840, 11079/13938) causes problems in the BitstreamReader. First, the thumbnails appear as broken links for all items. Clicking on a 'View/Open' link to open a pdf file causes a NullPointerException:

Hello,

there seems to be multiple issues present here, but as for the NullPointerException one possible cause might be a bug in BitstreamReader. When a document with citation pages enabled is opened using the View/Open link, item variable in BitstreamReader is null while trying to retrieve the handle for the logger:

https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-xmlui/src/main/java/org/dspace/app/xmlui/cocoon/BitstreamReader.java#L371

It seems that item variable is not used in other way in that method with standard Dspace 6.0-6.2 so commenting out the log line will probably fix the issue. Or you could set the item based on bitstream with e.g.

if (item==null) {
DSpaceObject owningDSO = bitstreamService.getParentObject(context, bitstream);
    if(owningDSO instanceof Item) {
        item = (Item)owningDSO;
    }
}

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cocoon.reading.Reader/BitstreamReaderPooled': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.dspace.app.xmlui.cocoon.BitstreamReader]: Constructor threw exception; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1039) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:985) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191) at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean.getFromPool(PoolableFactoryBean.java:212) at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:67)
 at com.sun.proxy.$Proxy182.setup(Unknown Source)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupReader(AbstractProcessingPipeline.java:560)
 ... 75 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.dspace.app.xmlui.cocoon.BitstreamReader]: Constructor threw exception; nested exception is java.lang.NullPointerException at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1032)
 ... 84 more
Caused by: java.lang.NullPointerException
at org.dspace.app.xmlui.cocoon.BitstreamReader.<init>(BitstreamReader.java:180)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
 ... 86 more


Have tried a using a single Community, changing the direction of the slashes, entering just the collection part of the handle. But whenever the 'citation-page.enabled_communities' line is uncommented in citation-page.cfg it seems to break the BitStreamReader.

Any clues on where to look next would be greatly appreciated.
Steve
--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscr...@googlegroups.com <mailto:dspace-tech+unsubscr...@googlegroups.com>. To post to this group, send email to dspace-tech@googlegroups.com <mailto:dspace-tech@googlegroups.com>.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Cheers,
Miika Nurminen


--
You received this message because you are subscribed to the Google Groups "DSpace 
Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to