Uploaded image for project: 'GeoServer'
  1. GEOS-8749

Startup failure with ClassNotFoundException for JAXBException on Java 9 and Java 10

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 2.13.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Description

      geoserver-2.13.0-bin.zip fails to start with Java 9 or Java 10 because Java 9 modules make JAXB inaccessible. Jetty returns a 503 Service Unavailable. Full console logs attached. Handled NumberFormatException reported separately as GEOS-8748 Open .

      For Java 9:

      16 May 11:57:37 ERROR [context.ContextLoader] - Context initialization failed
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'KMLEncoder': Failed to introspect bean class [org.geoserver.kml.KMLEncoder] for lookup method metadata: could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
      	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:269)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1118)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1091)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
      	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
      	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
      	at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:23)
      	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
      	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
      	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
      	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
      	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
      	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
      	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
      	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
      	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
      	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)
      	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
      	at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:440)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
      	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)
      	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:528)
      	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
      	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:560)
      	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:235)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
      	at org.eclipse.jetty.server.Server.start(Server.java:387)
      	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
      	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
      	at org.eclipse.jetty.server.Server.doStart(Server.java:354)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1255)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)
      	at org.eclipse.jetty.start.Main.start(Main.java:817)
      	at org.eclipse.jetty.start.Main.main(Main.java:112)
      Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
      	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
      	at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3139)
      	at java.base/java.lang.Class.getDeclaredMethods(Class.java:2266)
      	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613)
      	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524)
      	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)
      	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:247)
      	... 57 more
      Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
      	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
      	at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:510)
      	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441)
      	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)
      	... 64 more
      2018-05-16 11:57:37.327:WARN:oejw.WebAppContext:main: Failed startup of context 
      

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bencaradocdavies Ben Caradoc-Davies
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: