Main Content

Magnolia Community Forums: Get help with Magnolia: NullPointer when upgrading to 5.5.4


  • heike409
    heike409
    Full name: Heike Franosch
    Posts: 18
    Last post: Oct 17, 2017 10:01:04 AM
    Registered on: Jul 13, 2015
    NullPointer when upgrading to 5.5.4
    #1 by heike409 on Aug 14, 2017 1:44:44 PM

    Hi all,

    I have 5.5.3 ce running, but when switching to 5.5.4 the server won't start.
    There seems to be something wrong with the wiring. The injector is null when
    he tries to instantiate ContextFactory.

    I am using stk version 3.0.2. - don't know if it matters.
    I have made several adjustments in admincentral, so maybe I have somewhere a wrong value.
    What is responsible for this wiring?

    Thanks for any help,
    Heike

    --
    The stacktrace:

    java.lang.NullPointerException: null
    at info.magnolia.objectfactory.guice.GuiceUtils.hasExplicitBindingFor(GuiceUtils.java:158) ~[magnolia-core-5.5.4.jar:?]
    at info.magnolia.objectfactory.guice.GuiceUtils.hasExplicitBindingFor(GuiceUtils.java:152) ~[magnolia-core-5.5.4.jar:?]
    at info.magnolia.objectfactory.guice.GuiceComponentProvider.getComponent(GuiceComponentProvider.java:99) ~[magnolia-core-5.5.4.jar:?]
    at info.magnolia.objectfactory.Components.getComponent(Components.java:107) ~[magnolia-core-5.5.4.jar:?]
    at info.magnolia.context.ContextFactory.getInstance(ContextFactory.java:72) ~[magnolia-core-5.5.4.jar:?]
    at info.magnolia.context.MgnlContext.getSystemContext(MgnlContext.java:369) ~[magnolia-core-5.5.4.jar:?]
    at info.magnolia.context.MgnlContext.release(MgnlContext.java:637) ~[magnolia-core-5.5.4.jar:?]
    at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:403) ~[magnolia-core-5.5.4.jar:?]
    at info.magnolia.init.MagnoliaServletContextListener.startServer(MagnoliaServletContextListener.java:256) ~[magnolia-core-5.5.4.jar:?]

  • mdivilek
    mdivilek
    Full name: Milan Divilek
    Posts: 36
    Last post: Aug 14, 2017 2:37:47 PM
    Re: NullPointer when upgrading to 5.5.4
    #2 by mdivilek on Aug 14, 2017 2:37:47 PM

    Hello Heike,

    error is most likely caused by missing core-compatibility module in your webapp.

    Your webapp contains admininterface-legacy which needs MVCServlet classes to work, but this classes where moved to core-compatibility (https://jira.magnolia-cms.com/browse/MAGNOLIA-6948).

    If you don't need admininterface-legacy then removing this module will fix the error. If some of your module needs the admininterface-legacy then you need to add core-compatibility module.


    <dependency>
    <groupId>info.magnolia</groupId>
    <artifactId>magnolia-core-compatibility</artifactId>
    <version>5.5.4</version>
    </dependency>

  • heike409
    heike409
    Full name: Heike Franosch
    Posts: 18
    Last post: Oct 17, 2017 10:01:04 AM
    Registered on: Jul 13, 2015
    Re: NullPointer when upgrading to 5.5.4
    #3 by heike409 on Aug 16, 2017 10:36:02 AM

    Hi Milan,

    thanks, that's it.

    It's really hard to find if you don't know where to look for.

    Thanks, Heike

  • azhang4
    azhang4
    Full name: Aiping Zhang
    Posts: 15
    Last post: Dec 12, 2017 6:04:41 PM
    Registered on: Jul 29, 2015
    Re: NullPointer when upgrading to 5.5.4
    #4 by azhang4 on Dec 12, 2017 5:26:19 PM

    Hi Milan,

    I got the same exception when I'm upgrading my project from CE 5.4.9 to 5.5.1. We're using the admininterface-legacy in our project, but it seems magnolia-core-compatibility module starts from version 5.5.4. So I'm wondering what is causing the error. The database we are using is always h2, and I updated the file jackrabbit-bundle-h2-search.xml.

    Thanks very much for your help!
    Aiping

  • azhang4
    azhang4
    Full name: Aiping Zhang
    Posts: 15
    Last post: Dec 12, 2017 6:04:41 PM
    Registered on: Jul 29, 2015
    Re: NullPointer when upgrading to 5.5.4
    #5 by azhang4 on Dec 12, 2017 6:04:41 PM

    Update - I upgraded from CE 5.4.9 to 5.5.4 successfully by adding the dependency magnolia-core-compatibility. Thanks!

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/