Results 1 to 2 of 2

Thread: help with NoSuchBeanDefinitionException

  1. #1
    Join Date
    Jul 2008
    Posts
    28

    Default help with NoSuchBeanDefinitionException

    Hi everybody, I seem to be having a lot of trouble getting my configuration together. The latest issue is that a bean I thought I had defined doesn't seem to be loading.

    I have zipped the entire project (not much in there so should be easy to navigate around), inside it I have saved the stack trace of the error (trace.log), and there is also the slf4j log (gps.log). Note that the missing bean is in the service layer.

    There don't seem to be any errors and all the context files appear to be loaded. So what's going on? What am I missing, is the configuration itself in error?

    thanks
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2008
    Posts
    28

    Default

    solved it.

    I needed the component-scan configurations in the service and dao layers

    Code:
        <context:component-scan base-package="x.y.dao">
            <context:include-filter type="annotation"
                expression="org.springframework.stereotype.Repository"/>
        </context:component-scan>
    and

    Code:
        <context:component-scan base-package="x.y.service">
            <context:include-filter type="annotation"
                expression="org.springframework.stereotype.Service"/>
        </context:component-scan>
    with these in place the service and dao were detected.

    cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •