Results 1 to 2 of 2

Thread: "bean not found" when injecting in different spring context files

  1. #1
    Join Date
    Sep 2011
    Posts
    2

    Default "bean not found" when injecting in different spring context files

    Hi,

    I hope the following is clear if not I can clarify:

    I have in my portlet a portlet-context.xml that imports a external-bean-context.xml file in which bean "customerService" is created via the following code

    Code:
    <bean id="customerService" scope="session" factory-bean="customerServiceLocator" factory-method="getCustomerService_customerServiceHttpPort">	
    	<aop:scoped-proxy/>
    </bean>
    In a dependency jar that the portlet imports I have a servlet-context.xml that declares a bean "serviceObject". My issue is that I can't inject the customerService bean into the serviceObject and it is throwing an error "bean not found".

    If I import the external-bean-context.xml file in either the portlet-context.xml or the service-context.xml it is only available in the portlet-context.xml file (as in when injecting no errors are thrown in the portlet-context.xml but errors are thrown in the service-context - "bean not found").

    I have read up on the AOP scoping and believe this may be the issue but am not sure what to do.

    Any ideas?

  2. #2
    Join Date
    Sep 2011
    Posts
    2

    Default

    I should also note that when injecting the customerService bean into the service-context.xml I recieve the following error:


    Nested Exception is com.ibm.wps.pe.pc.legacy.impl.TransferPortletExcep tion: Error. Foundation tag could not find WclFacade in the session scope with id wcl_facade_key.

Tags for this Thread

Posting Permissions

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