Skip to Content

SAP Jco integration - issue spring

Hi All,

We stumble upon an issue having a JCo integration setup. As we followed the guides on wiki/help, we still have issue initializing our beans, resulting in Hybris failing to startup.

This is how our spring definition looks like:

  <bean id="calendarService" class="somepackage.implbean" scope="sapSession" parent="sapCoreBackendObjectJCo"/>

This is how our bean definition looks like:

 public class CalendarServiceImpl extends BackendBusinessObjectBaseJCo implements CalendarService {

We have all necessary extensions defined in local.extensions and the extensioninfo. However, this service bean never gets initiated and is used as a property reference for another bean (eg. Cronjob). and thus Hybris fails to startup.

Anyone an idea? Are we missing something?

Thanks! Wesley

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2016 at 03:06 PM

    you cant directly inject this bean to other bean as calendarService is session scope. use genericfactory to inject this bean into other beans. Example : see this oob implementation DefaultBolOrderFacade and see this method protected Search getSearch() { return genericFactory.getBean(SapordermgmtbolConstants.ALIAS_BO_SEARCH); } dont inject it in xml file.

    Add a comment
    10|10000 characters needed characters exceeded

    • We should be capable of injecting this bean, there are dozens of examples in OOTB implementations, however to no prevail at this time. As you mentioned as a workaround, we are using the genericfactory to fetch the bean @runtime, not the nicest solution but it works. Thanks.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.