Exception in thread "main" java.lang.NoClassDefFoundError: org/jaxen/NamespaceContext at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:756) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:473) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at org.jdom2.xpath.jaxen.JaxenXPathFactory.compile(JaxenXPathFactory.java:82) at org.jdom2.xpath.XPathFactory.compile(XPathFactory.java:297) at org.geotools.coverage.io.netcdf.tools.CreateIndexer.getAttributes(CreateIndexer.java:334) at org.geotools.coverage.io.netcdf.tools.CreateIndexer.main(CreateIndexer.java:151) Caused by: java.lang.ClassNotFoundException: org.jaxen.NamespaceContext at java.net.URLClassLoader.findClass(URLClassLoader.java:387) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 16 more
Adding Jaxen 1.1.6 in the GeoServer classpath fixes the issue. It’s marked as a test dependency in the gt-netcdf module.
Environment
None
Activity
Andrea Aime
May 21, 2022 at 8:18 AM
Was merged as part of the NetCDF docs improvements… was meant to be a separate commit though, guess I made a bit of a mess with rebases there.
Jody Garnett
May 20, 2022 at 8:26 PM
So this is more of a release/packaging issue then any fix to the code.
I do not see any pull request with GEOS-10482 in history, or any commits, going to assume this was fixed with a transitive dependency.
Trying to use the CreateIndexer tool for the creation of a NetCDF mosaic fails due to a missing dependency:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jaxen/NamespaceContext
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at org.jdom2.xpath.jaxen.JaxenXPathFactory.compile(JaxenXPathFactory.java:82)
at org.jdom2.xpath.XPathFactory.compile(XPathFactory.java:297)
at org.geotools.coverage.io.netcdf.tools.CreateIndexer.getAttributes(CreateIndexer.java:334)
at org.geotools.coverage.io.netcdf.tools.CreateIndexer.main(CreateIndexer.java:151)
Caused by: java.lang.ClassNotFoundException: org.jaxen.NamespaceContext
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 16 more
Adding Jaxen 1.1.6 in the GeoServer classpath fixes the issue. It’s marked as a test dependency in the gt-netcdf module.