bundle context should be set before refreshing the application context

Samebug tips1

If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.


Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web546

  • via Stack Overflow by Prashant Onkar
  • via Unknown by Unknown author,
  • via Unknown by,
  • Stack trace

    • java.lang.IllegalArgumentException: bundle context should be set before refreshing the application context at org.springframework.util.Assert.notNull( at at$NoDependenciesWaitRefreshExecutor.refresh( at at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext( at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext( at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext( at org.springframework.web.servlet.FrameworkServlet.initServletBean( at org.springframework.web.servlet.HttpServletBean.init( at javax.servlet.GenericServlet.init( at at at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    2 times, last one
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    190 more bugmates