Error bean PubmedImportService - Version 6.3

298 views
Skip to first unread message

Leonardo Matos

unread,
Sep 25, 2018, 2:56:06 PM9/25/18
to DSpace Technical Support
Hello friends,


I have a problem updating my dspace to version 6.3. The error occurs while starting tomcat. The error is below, Can anyone help me with this?

"Error creating bean with name 'importService' defined in URL [jar:file:/home/dspace/apache-tomcat-7.0.68/webapps/oai/WEB-INF/lib/dspace-api-6.3.jar!/spring/spring-dspace-addon-import-services.xml]: Unsatisfied dependency expressed through bean property 'importSources': : Error creating bean with name 'PubmedImportService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'maxRetry' is defined; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'PubmedImportService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'maxRetry' is defined"

"Error creating bean with name 'PubmedImportService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'maxRetry' is defined"

Capturar.PNG



mapeamentoUrl.PNG


Mark H. Wood

unread,
Sep 26, 2018, 9:11:21 AM9/26/18
to DSpace Technical Support
On Tuesday, September 25, 2018 at 2:56:06 PM UTC-4, Leonardo Matos wrote:
I have a problem updating my dspace to version 6.3. The error occurs while starting tomcat. The error is below, Can anyone help me with this?

"Error creating bean with name 'PubmedImportService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'maxRetry' is defined"



maxRetry should be defined in '[DSpace]/config/spring/api/pubmed-integration.xml'.  It is required as a @Resource in org.dspace.importer.external.service.components.AbstractRemoteMetadataSource, and I expect that PubmedImportMetadataSource extends that.  I would first check pubmed-integration.xml for damage.

Leonardo Matos

unread,
Sep 26, 2018, 2:45:13 PM9/26/18
to DSpace Technical Support
Hi Mark,

Thanks for the feedback, I checked all the points you said and it's exactly as it should be. Look:

pubmed-integration.xml
image.png

AbstractRemoteMetadataSource.java
image.png

image.png



PubmedImportMetadataSourceServiceImpl.java

image.png


I'm using DSpace 6.3 without any changes. I looked at the spring-dspace-addon-import-services.xml file that references url http://eutils.ncbi.nlm.nih.gov/entrez/eutils/, can you tell me if the firewall or proxy of the company may be barring this connection?

Leonardo Matos

unread,
Oct 1, 2018, 2:17:31 PM10/1/18
to DSpace Technical Support
Hi Mark,

the images broke.
I will try again.
Thanks for the feedback, I checked all the points you said and it's exactly as it should be. Look:

pubmed-integration.xml

    <bean class="java.lang.Integer" id="maxRetry">
<constructor-arg value="2"/>
</bean>

AbstractRemoteMetadataSource.java


AbstractRemoteMetadataSource.PNG

















PubmedImportMetadataSourceServiceImpl.java implements interface

PubmedImportMetadataSourceServiceImpl.PNG

Tim Donohue

unread,
Oct 1, 2018, 2:54:15 PM10/1/18
to Leonardo Matos, DSpace Technical Support
Hi Leonardo,

The original error is clearly pointing at DSpace not being able to "find" your setting for "maxRetry".  As Mark noted, the most important part of your error message is this note:


"Error creating bean with name 'PubmedImportService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'maxRetry' is defined" 

I would double check the "pubmed-integration.xml" file that is *installed* in the [dspace]/config/spring/api/ folder (note: this is not the "dspace-src" directory).  According to that error message, DSpace cannot find that "maxRetry" setting.  So, it's likely that either your "pubmed-integration.xml" file is missing that setting, or perhaps the file has an invalid character (which makes it not be valid XML), which could cause DSpace not to be able to parse that configuration file properly.

It's also possible that your upgrade to 6.3 did not properly replace all the Spring configuration in your [dspace]/config/spring/api/ folder (it should have done this during the "ant update" step of your upgrade).  If that's the case, assuming you haven't modified the Spring configuration manually, it is safe to *delete* the entire [dspace]/config/spring/api/ folder, and rerun "ant update" (which will replace it with the 6.3 version of the configurations).

In any case, this error definitely sounds like an issue in your configuration file. It would not be caused by a firewall or proxy problem.

Tim


--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
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...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
--
Tim Donohue
Technical Lead for DSpace & DSpaceDirect
DuraSpace.org | DSpace.org | DSpaceDirect.org

Leonardo Matos

unread,
Oct 2, 2018, 10:37:34 AM10/2/18
to DSpace Technical Support
Hello Tim,

thanks for the feedback. I was able to fix the problem by following your guidelines, it really was not a proxy problem, but some corrupted file inside the / config directory.
What I did was update the directory again and it worked again.

Many thanks for your support.
Reply all
Reply to author
Forward
0 new messages