Closed ketlervs closed 4 years ago
Tudo bom? Segundo o erro vc está inicializando as configurações com o Ambiente nulo. Pode verificar por favor?
Estou usando AmbienteEnum.PRODUCAO: this.config = ConfiguracoesNfe.criarConfiguracoes(EstadosEnum.valueOf(cliente.getMunicipio().getSgUf()), AmbienteEnum.PRODUCAO, this.certificado, schemasPath);
Estou recebendo uma NfeException ao chamar o método Nfe.distribuicaoDfe:
br.com.swconsultoria.nfe.exception.NfeException: java.lang.NullPointerException at br.com.swconsultoria.nfe.DistribuicaoDFe.consultaNfe(DistribuicaoDFe.java:101) at br.com.swconsultoria.nfe.Nfe.distribuicaoDfe(Nfe.java:46) at br.com.funcionalconsultoria.receiver_dfe.service.ReceiverNfeService.buscarNfesUltimaNsu(ReceiverNfeService.java:62) at br.com.funcionalconsultoria.receiver_dfe.service.ReceiverDfeService.buscaDocumentos(ReceiverDfeService.java:38) at br.com.funcionalconsultoria.receiver_dfe.service.ReceiverDfeService$$FastClassBySpringCGLIB$$2279d76a.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Meu código é esse
RetDistDFeInt retorno = br.com.swconsultoria.nfe.Nfe.distribuicaoDfe(config, PessoaEnum.JURIDICA, cliente.getNrCnpjCpf(), ConsultaDFeEnum.NSU, ultimaNsuCliente);