added a new service for a new table

5 views
Skip to first unread message

Jose Blanco

unread,
Mar 12, 2020, 12:04:55 PM3/12/20
to DSpace Technical Support
and I'm getting this error:

 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.dspace.content.service.UmrestrictedService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}


when I do:


ant -Dconfig=/repository/dev63/config/dspace.cfg update

Jose Blanco

unread,
Mar 12, 2020, 12:53:06 PM3/12/20
to DSpace Technical Support
I think it may have to do with these files:

spring/api/core-services.xml:    

spring/api/core-factory-services.xml:

Mark H. Wood

unread,
Mar 18, 2020, 2:45:37 PM3/18/20
to DSpace Technical Support
On Thu, Mar 12, 2020 at 12:52:50PM -0400, Jose Blanco wrote:
> I think it may have to do with these files:
>
> spring/api/core-services.xml:
>
> spring/api/core-factory-services.xml:

Yes. For example, ItemService (which operates on 'Item's) is defined
in core-services.xml. Spring needs to be told which classes are
Beans.

BTW, it's a small matter, but I would name the interface something like
edu.umich.content.service.UmrestrictedService so that the fully qualified
name doesn't make someone think it is stock DSpace code someday. I
would only name a class org.dspace.Whatever if I were planning to
contribute it to the DSpace codebase.

The good news is that Spring understood that you want it to
instantiate that service and inject a reference somewhere.

> On Thu, Mar 12, 2020 at 12:04 PM Jose Blanco <bla...@umich.edu> wrote:
>
> > and I'm getting this error:
> >
> > Caused by:
> > org.springframework.beans.factory.NoSuchBeanDefinitionException: No
> > qualifying bean of type [org.dspace.content.service.UmrestrictedService]
> > found for dependency: expected at least 1 bean which qualifies as autowire
> > candidate for this dependency. Dependency annotations:
> > {@org.springframework.beans.factory.annotation.Autowired(required=true)}
> >
> >
> > when I do:
> >
> >
> > ant -Dconfig=/repository/dev63/config/dspace.cfg update
> >
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CAK%3DKc-tXssda8aLpPHh%3Di80JyVqhxxC8aAbR0zYENinnN-SmCA%40mail.gmail.com.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc
Reply all
Reply to author
Forward
0 new messages