2017-01-03 9 views
1

BingAds에서 보고서를 다운로드하려고합니다. 내 코드는 IDEA 내부에서 작동하며 보고서를 다운로드합니다. 큰 문제는 아닙니다. 내가 만들려고하면 그것은 내부처럼 SBT 실행java.lang.NoClassDefFoundError : 클래스를 초기화 할 수 없습니다.

H24_BING_CONFIG =/가정/oleber/델/develop_bing.json SBT '

실행을 실행' 'importerBing 프로젝트'처럼 실패

[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) 

경고는 두 위치에 있습니다.

전 완전히 잃었습니다. 가능한 해결책이 있습니까?

답변

0

키 스토어에 대한 경고는 예외와 관련이 없습니다.

문제는 대부분 실패한 빌드가 종속성이 부족한 com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl입니다. IDEA는 아마 그 의존성을 제공 할 것이다. 이는 내부 빌드가 다른 빌드 환경 (클래스 경로/대상 플랫폼)에있을 수 있기 때문에 가능합니다.

NoClassDefFoundErrors의 가장 일반적인 이유는 참조 된 클래스의 정적 초기화 프로그램 (ExceptionInInitializer 근본 원인) 및 참조 된 클래스의 경우 ClassNotFoundExceptions입니다. 후자는 SAAJMetaFactoryImpl의 종속성이 누락되었지만 FactoryImpl 자체가있는 라이브러리가없는 경우 발생합니다.

실제로 예외가 발생했을 때 그 예외의 근본 원인을 포함하는 Caused-By 체인 링크가 예외로 의심됩니다. 어쩌면 빌드를 재구성하여 던져진 예외의 전체 원인 체인을 표시 할 수 있습니다.

일반적으로 종속성을 해결하는 데 사용하는 대상 플랫폼과 관련하여 두 빌드 환경을 비교해보십시오. 이로 인해 누락 된 라이브러리가 명확 해집니다.