java 无法初始化类_java.lang.NoClassDefFoundError:无法初始化类

在尝试通过sbt运行下载Bing Ads报告的代码时,遇到了`NoClassDefFoundError:Could not initialize class com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl`的问题。错误发生在尝试实例化SAAJMetaFactoryImpl类时,可能由于缺少关键配置或依赖。问题出现在使用Apache CXF和javax.xml.soap包的相关组件。
摘要由CSDN通过智能技术生成

我正在尝试从BingAds下载报告 . 我的代码在IDEA内部下载报告,没什么大问题 . 当我试图让它在sbt里面运行时:

H24_BING_CONFIG = / home / oleber / del / develop_bing.json sbt clean'project importerBing''run'

执行失败如:

[oleber] [WARN] [home24-aws] [org.apache.cxf.transport.https.HttpsURLConnectionFactory] [Default key managers cannot be initialized: /home/oleber/.keystore (No such file or directory)]

[oleber] [WARN] [home24-aws] [org.apache.cxf.transport.https.HttpsURLConnectionFactory] [Default key managers cannot be initialized: /home/oleber/.keystore (No such file or directory)]

java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl

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 javax.xml.soap.FactoryFinder.newInstance(FactoryFinder.java:47)

at javax.xml.soap.FactoryFinder.find(FactoryFinder.java:194)

at javax.xml.soap.FactoryFinder.find(FactoryFinder.java:98)

at javax.xml.soap.SAAJMetaFactory.getInstance(SAAJMetaFactory.java:74)

at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:146)

at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:111)

at org.apache.cxf.binding.soap.saaj.SAAJFactoryResolver.createMessageFactory(SAAJFactoryResolver.java:56)

at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.getFactory(SAAJOutInterceptor.java:87)

at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOutInterceptor.java:123)

at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:120)

at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:71)

at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)

at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)

at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:416)

at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:394)

at org.apache.cxf.jaxws.JaxWsClientProxy.invokeAsync(JaxWsClientProxy.java:297)

at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:136)

at com.sun.proxy.$Proxy68.submitGenerateReportAsync(Unknown Source)

at com.microsoft.bingads.reporting.ReportingServiceManager.submitDownloadAsync(ReportingServiceManager.java:196)

at importer.bing.BingAdsImporterDownloader.submit(BingAdsImporterDownloader.scala:104)

at importer.bing.BingAdsImporterDownloader$$anonfun$process$1$$anonfun$apply$2.apply(BingAdsImporterDownloader.scala:171)

at importer.bing.BingAdsImporterDownloader$$anonfun$process$1$$anonfun$apply$2.apply(BingAdsImporterDownloader.scala:170)

at common.ManagedResource$.withTmpDir(ManagedResource.scala:47)

at importer.bing.BingAdsImporterDownloader$$anonfun$process$1.apply(BingAdsImporterDownloader.scala:170)

at importer.bing.BingAdsImporterDownloader$$anonfun$process$1.apply(BingAdsImporterDownloader.scala:159)

at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:253)

at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)

at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)

at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)

at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)

at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)

at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)

at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl

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 javax.xml.soap.FactoryFinder.newInstance(FactoryFinder.java:47)

at javax.xml.soap.FactoryFinder.find(FactoryFinder.java:194)

at javax.xml.soap.FactoryFinder.find(FactoryFinder.java:98)

at javax.xml.soap.SAAJMetaFactory.getInstance(SAAJMetaFactory.java:74)

at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:146)

at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:111)

at org.apache.cxf.binding.soap.saaj.SAAJFactoryResolver.createMessageFactory(SAAJFactoryResolver.java:56)

at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.getFactory(SAAJOutInterceptor.java:87)

at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOutInterceptor.java:123)

at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:120)

at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:71)

at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)

at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)

at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:416)

at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:394)

at org.apache.cxf.jaxws.JaxWsClientProxy.invokeAsync(JaxWsClientProxy.java:297)

at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:136)

at com.sun.proxy.$Proxy68.submitGenerateReportAsync(Unknown Source)

at com.microsoft.bingads.reporting.ReportingServiceManager.submitDownloadAsync(ReportingServiceManager.java:196)

at importer.bing.BingAdsImporterDownloader.submit(BingAdsImporterDownloader.scala:104)

at importer.bing.BingAdsImporterDownloader$$anonfun$process$1$$anonfun$apply$2.apply(BingAdsImporterDownloader.scala:171)

at importer.bing.BingAdsImporterDownloader$$anonfun$process$1$$anonfun$apply$2.apply(BingAdsImporterDownloader.scala:170)

at common.ManagedResource$.withTmpDir(ManagedResource.scala:47)

at importer.bing.BingAdsImporterDownloader$$anonfun$process$1.apply(BingAdsImporterDownloader.scala:170)

at importer.bing.BingAdsImporterDownloader$$anonfun$process$1.apply(BingAdsImporterDownloader.scala:159)

at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:253)

at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)

at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)

at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)

at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)

at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)

at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)

at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

警告在两个地方都有 .

我完全迷失了 . 你有什么可能的解决方案吗?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值