Hi,
I'm having a lot of difficulty using the hive JDBC driver running in a jetty 
container.  The hive JDBC driver pulls in a much earlier version of jetty-all, 
which causes a failure when the jetty container starts up:

java.lang.IllegalArgumentException: Object of class 
'org.eclipse.jetty.webapp.WebAppContext' is not of type 
'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from 
different loaders. in 
file:/tmp/jetty-0.0.0.0-8080-le-metadata-microservice-2.0.17-SNAPSHOT.war-_le-metadata-microservice-2.0.17-SNAPSHOT-any-3594971506368747137.dir/webapp/WEB-INF/jetty-web.xml
        at 
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:296)
        at 
org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:248)
        at 
org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:102)
        at 
org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:471)
        at 
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1347)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:744)
        at 
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:497)
        at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at 
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:125)
        at 
org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:289)
        at 
org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:221)
        at 
org.eclipse.jetty.util.component.ContainerLifeCycle.updateBeans(ContainerLifeCycle.java:771)
        at 
org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:89)
        at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.setHandlers(ContextHandlerCollection.java:144)
        at 
org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:155)
        at 
org.eclipse.jetty.deploy.bindings.StandardDeployer.processBinding(StandardDeployer.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.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:605)
        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:125)
        at org.eclipse.jetty.server.Server.start(Server.java:358)
        at 
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107)
        at 
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
        at org.eclipse.jetty.server.Server.doStart(Server.java:325)
        at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at 
org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1250)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:297)
        at org.eclipse.jetty.start.Main.start(Main.java:727)
        at org.eclipse.jetty.start.Main.main(Main.java:103)

Forcing hive to use the current version of jetty, however, causes a class not 
found exception (java.lang.NoClassDefFoundError: 
org/apache/http/conn/scheme/SchemeSocketFactory)

So basically this forces me to use the version of jetty that hive is compiled 
against.  Is there any workaround for this?

I believe I can use a custom jetty class loader to get around this issue, but I 
haven't yet fully grokked what this means...

Thanks in advance,
Ben 


This message has been scanned for malware by Websense. www.websense.com

Reply via email to