我在hadoop工作中看到了这个:
2014-08-21 09:26:57,216 ERROR org.apache.hadoop.mapred.Child: Error running child : java.lang.ExceptionInInitializerError
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:107)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:129)
at com.sun.proxy.$Proxy61.describeVehicle(Unknown Source)
at com.company.inventory.externalapi.externalsoapclient.ExternalClientImpl.getFromSoap(ExternalClientImpl.java:46)
at com.company.dataservices.external.hadoop.ExternalIngestionProcess.populateExternalCache(ExternalIngestionProcess.java:112)
at com.company.dataservices.external.hadoop.ExternalIngestionProcess.map(ExternalIngestionProcess.java:93)
at com.company.dataservices.external.hadoop.ExternalIngestionProcess.map(ExternalIngestionProcess.java:38)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:140)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:672)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:330)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1438)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.internal.bind.api.JAXBRIContext
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.<clinit>(SOAPFaultBuilder.java:550)
... 16 more
此问题与this issue类似,但我没有在类路径上提供任何jax-b依赖项。但是,它确实看起来像hadoop。
有没有办法强制hadoop使用jdk jaxb jar或只使用它自己提供的jaxb jar,但不能混合使用?
答案 0 :(得分:3)
坦率地说,它听起来不像是一个Hadoop错误。正如您已经提到的,正确的解决方案是修复类路径,但请尝试以下方法:
-Djavax.xml.bind.JAXBContext = com.sun.xml.internal.bind.v2.ContextFactory