Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5379

NullPointerException when server name does not resolve in DNS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.5.13, 5.1.1
    • 5.1
    • core
    • None

      Running Magnolia on a box that has a non-resolvable hostname.

      In this case, the server name should fall back to "default".

      It appears to do that, but there is a subsequent NullPointerException:

      INFO: Deploying web application directory /srv/tomcat/webapps/magnolia
      2013-10-10 15:21:33,198 ERROR info.magnolia.init.DefaultMagnoliaInitPaths       : nested: nested: Name or service not known
      2013-10-10 15:21:33,205 WARN  info.magnolia.init.MagnoliaServletContextListener : Failed to obtain server name, please check your configuration. Using 'default' as server name instead.
      2013-10-10 15:21:33,714 ERROR info.magnolia.init.MagnoliaServletContextListener : Oops, Magnolia could not be started
      java.lang.NullPointerException
              at java.util.Hashtable.put(Hashtable.java:514)
              at info.magnolia.init.properties.InitPathsPropertySource$1.<init>(InitPathsPropertySource.java:55)
              at info.magnolia.init.properties.InitPathsPropertySource.<init>(InitPathsPropertySource.java:52)
              at info.magnolia.init.DefaultMagnoliaConfigurationProperties.makeSources(DefaultMagnoliaConfigurationProperties.java:94)
              at info.magnolia.init.DefaultMagnoliaConfigurationProperties.init(DefaultMagnoliaConfigurationProperties.java:82)
              at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:157)
              at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:126)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
              at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
              at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:724)
      

        Acceptance criteria

              mdivilek Milan Divilek
              archie Archie Cobbs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD