Created on 12-11-2019 09:06 PM - last edited on 12-12-2019 01:35 AM by VidyaSargur
Hi,
I am trying to run nexgtech/knox as a container in a pod in a kubernetes cluster and i am getting the below
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.knox.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:68)
at org.apache.knox.gateway.launcher.Invoker.invoke(Invoker.java:39)
at org.apache.knox.gateway.launcher.Command.run(Command.java:99)
at org.apache.knox.gateway.launcher.Launcher.run(Launcher.java:75)
at org.apache.knox.gateway.launcher.Launcher.main(Launcher.java:52)
Caused by: java.lang.NoSuchFieldError: DEFAULT_XML_TYPE_ATTRIBUTE
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.setupInheritance(MappingsGenerator.java:2431)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:246)
at org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:191)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:985)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:978)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:905)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:198)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:122)
at org.eclipse.persistence.jaxb.compiler.CompilerHelper.getXmlBindingsModelContext(CompilerHelper.java:491)
at org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindings(JAXBContextFactory.java:310)
at org.eclipse.persistence.jaxb.JAXBContextFactory.processBindingFile(JAXBContextFactory.java:284)
at org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindingsFromProperties(JAXBContextFactory.java:264)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:853)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:198)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:171)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:293)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431)
at org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.getJAXBContext(DefaultTopologyService.java:127)
at org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.<clinit>(DefaultTopologyService.java:91)
at org.apache.knox.gateway.services.CLIGatewayServices.init(CLIGatewayServices.java:88)
at org.apache.knox.gateway.util.KnoxCLI.initializeServices(KnoxCLI.java:185)
at org.apache.knox.gateway.util.KnoxCLI.run(KnoxCLI.java:155)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.knox.gateway.util.KnoxCLI.main(KnoxCLI.java:2122)
... 9 more
Starting LDAP succeeded with PID 89.
Starting Gateway succeeded with PID 183.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.knox.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:68)
at org.apache.knox.gateway.launcher.Invoker.invoke(Invoker.java:39)
at org.apache.knox.gateway.launcher.Command.run(Command.java:99)
at org.apache.knox.gateway.launcher.Launcher.run(Launcher.java:75)
at org.apache.knox.gateway.launcher.Launcher.main(Launcher.java:52)
Caused by: java.lang.NoSuchFieldError: DEFAULT_XML_TYPE_ATTRIBUTE
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.setupInheritance(MappingsGenerator.java:2431)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:246)
at org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:191)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:985)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:978)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:905)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:198)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:122)
at org.eclipse.persistence.jaxb.compiler.CompilerHelper.getXmlBindingsModelContext(CompilerHelper.java:491)
at org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindings(JAXBContextFactory.java:310)
at org.eclipse.persistence.jaxb.JAXBContextFactory.processBindingFile(JAXBContextFactory.java:284)
at org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindingsFromProperties(JAXBContextFactory.java:264)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:853)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:198)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:171)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:293)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431)
at org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.getJAXBContext(DefaultTopologyService.java:127)
at org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.<clinit>(DefaultTopologyService.java:91)
at org.apache.knox.gateway.services.CLIGatewayServices.init(CLIGatewayServices.java:88)
at org.apache.knox.gateway.util.KnoxCLI.initializeServices(KnoxCLI.java:185)
at org.apache.knox.gateway.util.KnoxCLI.run(KnoxCLI.java:155)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.knox.gateway.util.KnoxCLI.main(KnoxCLI.java:2122)
... 9 more
2019-12-12 04:38:13,506 INFO knox.gateway (GatewayConfigImpl.java:loadConfigResource(406)) - Loading configuration resource jar:file:/usr/local/knox-1.3.0/bin/../lib/gateway-server-1.3.0.jar!/conf/gateway-default.xml
2019-12-12 04:38:13,987 INFO knox.gateway (GatewayConfigImpl.java:loadConfigFile(394)) - Loading configuration file /usr/local/knox-1.3.0/conf/gateway-site.xml
2019-12-12 04:38:14,124 INFO knox.gateway (GatewayConfigImpl.java:initGatewayHomeDir(334)) - Using /usr/local/knox-1.3.0/bin/.. as GATEWAY_HOME via system property.
2019-12-12 04:38:14,125 INFO knox.gateway (GatewayConfigImpl.java:init(327)) - Cookie scoping feature enabled: false
2019-12-12 04:38:14,845 INFO knox.gateway (RemoteAliasService.java:init(258)) - Remote Alias Service enabled
2019-12-12 04:38:14,847 WARN knox.gateway (ZookeeperRemoteAliasService.java:init(349)) - There is no registry client defined for remote configuration monitoring.
2019-12-12 04:38:14,850 INFO knox.gateway (JettySSLService.java:init(64)) - Creating credential store for the gateway instance.
2019-12-12 04:38:14,855 INFO knox.gateway (JettySSLService.java:init(80)) - Creating keystore for the gateway instance.
2019-12-12 04:38:15,735 INFO knox.gateway (JettySSLService.java:logAndValidateCertificate(112)) - The Gateway SSL certificate is issued to hostname: localhost.
2019-12-12 04:38:15,738 INFO knox.gateway (JettySSLService.java:logAndValidateCertificate(115)) - The Gateway SSL certificate is valid between: 12/12/19 4:38 AM and 12/11/20 4:38 AM.
2019-12-12 04:46:11,263 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: user.name=knox
2019-12-12 04:46:11,267 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: user.dir=/home/knox
2019-12-12 04:46:11,267 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: java.runtime.name=OpenJDK Runtime Environment
2019-12-12 04:46:11,267 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: java.runtime.version=1.8.0_222-b10
2019-12-12 04:46:11,267 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: java.home=/usr/local/openjdk-8/jre
2019-12-12 04:46:11,426 INFO knox.gateway (GatewayConfigImpl.java:loadConfigResource(406)) - Loading configuration resource jar:file:/usr/local/knox-1.3.0/bin/../lib/gateway-server-1.3.0.jar!/conf/gateway-default.xml
2019-12-12 04:46:11,484 INFO knox.gateway (GatewayConfigImpl.java:loadConfigFile(394)) - Loading configuration file /usr/local/knox-1.3.0/conf/gateway-site.xml
2019-12-12 04:46:11,491 INFO knox.gateway (GatewayConfigImpl.java:initGatewayHomeDir(334)) - Using /usr/local/knox-1.3.0/bin/.. as GATEWAY_HOME via system property.
2019-12-12 04:46:11,491 INFO knox.gateway (GatewayConfigImpl.java:init(327)) - Cookie scoping feature enabled: false
2019-12-12 04:46:11,905 INFO knox.gateway (RemoteAliasService.java:init(258)) - Remote Alias Service enabled
2019-12-12 04:46:11,909 WARN knox.gateway (ZookeeperRemoteAliasService.java:init(349)) - There is no registry client defined for remote configuration monitoring.
2019-12-12 04:46:11,920 INFO knox.gateway (JettySSLService.java:init(72)) - Credential store for the gateway instance found - no need to create one.
2019-12-12 04:46:11,938 INFO knox.gateway (JettySSLService.java:init(91)) - Keystore for the gateway instance found - no need to create one.
2019-12-12 04:46:11,942 INFO knox.gateway (JettySSLService.java:logAndValidateCertificate(112)) - The Gateway SSL certificate is issued to hostname: localhost.
2019-12-12 04:46:11,945 INFO knox.gateway (JettySSLService.java:logAndValidateCertificate(115)) - The Gateway SSL certificate is valid between: 12/12/19 4:38 AM and 12/11/20 4:38 AM.
Could you please let me know how i could debug this issue.
Created 12-11-2019 09:13 PM
Which knox version is it?
We see the error as following:
Caused by: java.lang.NoSuchFieldError: DEFAULT_XML_TYPE_ATTRIBUTE
.
At a glance it looks very similar to the one issue reported with Knox https://issues.apache.org/jira/browse/KNOX-1987
Created 12-11-2019 09:13 PM
Which knox version is it?
We see the error as following:
Caused by: java.lang.NoSuchFieldError: DEFAULT_XML_TYPE_ATTRIBUTE
.
At a glance it looks very similar to the one issue reported with Knox https://issues.apache.org/jira/browse/KNOX-1987
Created 12-11-2019 09:19 PM
Is it possible if you can try with Knox 1.4.0 version once to see if it works well or not? as mentioned in the JIRA fix version is 1.4.0.
Created 12-11-2019 09:34 PM
Could you please give me the path where i can clone the 1.4.0 version since in the below path i cannot find it
Created 12-11-2019 09:31 PM
Hi,
Iam using 1.3 version. This works in some of the kubernetes cluster and does not work in some.
Is there any way to check why this is not working
Created 12-11-2019 09:39 PM
@Amrutha
Currently released Apache Knox version is 1.3.0. https://knox.apache.org/
.
However, you can try to build the desired version / 1.4.0 version by following the instructions mentioned in . https://cwiki.apache.org/confluence/display/KNOX/Build+Process
By coning from https://github.com/apache/knox/tree/v1.4.0-branch
Created on 12-11-2019 10:27 PM - edited 12-11-2019 11:47 PM
Hi @jsensharma
But any specific reason that its not working only in some of the kubernetes clusters since iam using the same docker-image across all the clusters.
Created 12-16-2019 10:24 PM
Hi,
I have followed the steps and done the build, but how do i put this into a package and install knox
Created 12-16-2019 01:04 AM
Hi @ jsensharma
Could you please provide me any help that is possible in order to debug the issue