Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Currently, Eclipse Jetty is a "compile-time" dependency of geode-core:
[INFO] | | | +- org.apache.geode:geode-core:jar:1.9.0:compile [INFO] | | | | +- com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:compile [INFO] | | | | +- org.jgroups:jgroups:jar:3.6.14.Final:compile [INFO] | | | | +- commons-validator:commons-validator:jar:1.6:compile [INFO] | | | | | +- commons-beanutils:commons-beanutils:jar:1.9.2:compile [INFO] | | | | | +- commons-logging:commons-logging:jar:1.2:compile [INFO] | | | | | \- commons-collections:commons-collections:jar:3.2.2:compile [INFO] | | | | +- commons-digester:commons-digester:jar:2.1:compile [INFO] | | | | +- com.sun.activation:javax.activation:jar:1.2.0:compile [INFO] | | | | +- javax.xml.bind:jaxb-api:jar:2.3.1:compile [INFO] | | | | | \- javax.activation:javax.activation-api:jar:1.2.0:compile [INFO] | | | | +- com.sun.xml.bind:jaxb-impl:jar:2.3.1:compile [INFO] | | | | +- com.sun.istack:istack-commons-runtime:jar:2.2:compile [INFO] | | | | +- org.apache.commons:commons-lang3:jar:3.9:compile [INFO] | | | | +- io.micrometer:micrometer-core:jar:1.2.0:compile [INFO] | | | | | +- org.hdrhistogram:HdrHistogram:jar:2.1.11:compile [INFO] | | | | | \- org.latencyutils:LatencyUtils:jar:2.0.3:compile [INFO] | | | | +- it.unimi.dsi:fastutil:jar:8.2.2:compile [INFO] | | | | +- javax.resource:javax.resource-api:jar:1.7.1:compile [INFO] | | | | | \- javax.transaction:javax.transaction-api:jar:1.3:compile [INFO] | | | | +- net.java.dev.jna:jna:jar:4.5.2:compile [INFO] | | | | +- net.sf.jopt-simple:jopt-simple:jar:5.0.4:compile [INFO] | | | | +- org.eclipse.jetty:jetty-server:jar:9.4.19.v20190610:compile [INFO] | | | | | +- javax.servlet:javax.servlet-api:jar:4.0.1:compile [INFO] | | | | | +- org.eclipse.jetty:jetty-http:jar:9.4.19.v20190610:compile [INFO] | | | | | | \- org.eclipse.jetty:jetty-util:jar:9.4.19.v20190610:compile [INFO] | | | | | \- org.eclipse.jetty:jetty-io:jar:9.4.19.v20190610:compile [INFO] | | | | +- org.apache.shiro:shiro-core:jar:1.4.0:compile [INFO] | | | | | +- org.apache.shiro:shiro-lang:jar:1.4.0:compile [INFO] | | | | | +- org.apache.shiro:shiro-cache:jar:1.4.0:compile [INFO] | | | | | +- org.apache.shiro:shiro-crypto-hash:jar:1.4.0:compile [INFO] | | | | | | \- org.apache.shiro:shiro-crypto-core:jar:1.4.0:compile [INFO] | | | | | +- org.apache.shiro:shiro-crypto-cipher:jar:1.4.0:compile [INFO] | | | | | +- org.apache.shiro:shiro-config-core:jar:1.4.0:compile [INFO] | | | | | +- org.apache.shiro:shiro-config-ogdl:jar:1.4.0:compile [INFO] | | | | | \- org.apache.shiro:shiro-event:jar:1.4.0:compile [INFO] | | | | +- io.github.classgraph:classgraph:jar:4.0.6:compile [INFO] | | | | +- com.healthmarketscience.rmiio:rmiio:jar:2.1.2:compile [INFO] | | | | +- org.apache.geode:geode-common:jar:1.9.0:compile
If Jetty is not on the classpath of an Apache Geode (client or peer) cache application, then Geode will throw an Exception on shutdown:
2019-08-21 00:44:32.819 WARN 63204 --- [m shutdown hook] o.a.g.d.i.InternalDistributedSystem : Exception trying to close cache java.lang.BootstrapMethodError: java.lang.IllegalAccessError: no such method: org.apache.geode.internal.cache.HttpService.stop()void/invokeVirtual at org.apache.geode.internal.cache.GemFireCacheImpl.close(GemFireCacheImpl.java:2183) ~[geode-core-1.9.0.jar:na] at org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:1627) [geode-core-1.9.0.jar:na] at org.apache.geode.distributed.internal.InternalDistributedSystem.lambda$static$4(InternalDistributedSystem.java:2278) [geode-core-1.9.0.jar:na] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_192] Caused by: java.lang.IllegalAccessError: no such method: org.apache.geode.internal.cache.HttpService.stop()void/invokeVirtual at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:483) ~[na:1.8.0_192] ... 4 common frames omitted Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Handler at java.lang.invoke.MethodHandleNatives.resolve(Native Method) ~[na:1.8.0_192] at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:975) ~[na:1.8.0_192] at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1000) ~[na:1.8.0_192] at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1394) ~[na:1.8.0_192] at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1750) ~[na:1.8.0_192] at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:477) ~[na:1.8.0_192] ... 4 common frames omitted Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Handler at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_192] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_192] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_192] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_192] ... 10 common frames omitted
Ironically, Jetty has NO significance on the client, in a ClientCache application.
Even when the application embeds a peer Cache, the server still might not require Jetty.
Jetty is only used to enable the embedded HTTP service in a GemFire server-side node (e.g. Locator/Manager or Server).
In the Manager, the embedded HTTP service implemented with Jetty is used to host the Management (Admin) REST API and Pulse.
In a Server, the embedded HTTP service implemented with Jetty is used to host the Developer REST API.
Jetty should only be required when a server-side node (i.e. Locator/Manager or Server) is hosting the Developer/Management REST API or Pulse.
Please consider this change!