在 Eclipse 中将 axis2 初始化为客户端时出现 ExceptionInInitializerError

ExceptionInInitializerError while initializing axis2 to client in eclipse

我已经在 eclipse 中创建了一个独立的服务客户端,并如下初始化存根,

CustomerInteractionStub interaction_stub = new CustomerInteractionStub (END_POINT_URL);

但出现以下错误,

Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.axis2.description.AxisDescription.<init>(AxisDescription.java:72)
at org.apache.axis2.description.AxisService.<init>(AxisService.java:323)
at org.apache.axis2.description.AxisService.<init>(AxisService.java:394)
at com.ril.jio.www.integration.services.inventory.customerinteractionmanagement.CustomerInteractionMaintenanceStub.populateAxisService(CustomerInteractionMaintenanceStub.java:43)
at com.ril.jio.www.integration.services.inventory.customerinteractionmanagement.CustomerInteractionMaintenanceStub.<init>(CustomerInteractionMaintenanceStub.java:131)
at com.ril.jio.www.integration.services.inventory.customerinteractionmanagement.CustomerInteractionMaintenanceStub.<init>(CustomerInteractionMaintenanceStub.java:119)
at com.ril.jio.www.integration.services.inventory.customerinteractionmanagement.CustomerInteractionMaintenanceStub.<init>(CustomerInteractionMaintenanceStub.java:166)
at CSVReader1.getIRequestXML(CSVReader1.java:340)
at CSVReader1.main(CSVReader1.java:235)
Caused by: java.lang.NullPointerException
at org.apache.crimson.tree.ElementNode.getAttributeNodeNS(ElementNode.java:415)
at org.apache.crimson.tree.ElementNode.getAttributeNS(ElementNode.java:392)
at org.apache.axiom.locator.ImplementationFactory.parseImplementation(ImplementationFactory.java:114)
at org.apache.axiom.locator.ImplementationFactory.parseDescriptor(ImplementationFactory.java:87)
at org.apache.axiom.locator.DefaultOMMetaFactoryLocator.<init>(DefaultOMMetaFactoryLocator.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.apache.axiom.om.OMAbstractFactory.<clinit>(OMAbstractFactory.java:95)
... 9 more

搜索了很多但没有得到任何解决方案。任何帮助表示赞赏。如果需要任何额外信息,请询问,我会尽力提供。谢谢。

堆栈跟踪表明您正在使用 Apache Crimson。这是一个旧的 DOM 实现,不应再使用。只需删除相应的 JAR 即可解决问题。