gpt4 book ai didi

java - hadoop jaxb类路径问题

转载 作者:可可西里 更新时间:2023-11-01 14:47:10 25 4
gpt4 key购买 nike

我在 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,而不是混合使用两者?

最佳答案

坦率地说,这听起来不像是 Hadoop 错误。正如您已经提到的,正确的解决方案是修复类路径,但试试这个:

-Djavax.xml.bind.JAXBContext=com.sun.xml.internal.bind.v2.ContextFactory

Additional details

关于java - hadoop jaxb类路径问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25433658/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com