samuel-oliveira / java_danfe Goto Github PK
View Code? Open in Web Editor NEWCommit Inicial
License: MIT License
Commit Inicial
License: MIT License
está dando um erro ao carregar a xml da nfce, possivel mente erro na compilação do jasper.
net.sf.jasperreports.engine.JRException: Error loading object from InputStream.
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:230)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:210)
at br.com.swconsultoria.impressao.util.JasperResourceLoader.loadJasperFile(JasperResourceLoader.java:44)
at br.com.swconsultoria.impressao.util.ImpressaoUtil.impressaoPadraoNFCe(ImpressaoUtil.java:100)
at br.com.abatech.agropet.util.Impressora.imprimirNFCe(Impressora.java:1156)
at br.com.abatech.agropet.visoes.jdDocumentosFiscaisEmitidos.lambda$jbtImprimirActionPerformed$2(jdDocumentosFiscaisEmitidos.java:453)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.StreamCorruptedException: invalid stream header: EFBFBDEF
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:866)
at java.io.ObjectInputStream.(ObjectInputStream.java:358)
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.(ContextClassLoaderObjectInputStream.java:56)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:225)
... 6 more
Exception in thread "Thread-26" java.lang.NullPointerException
at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:267)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:156)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:145)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:758)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:1074)
at br.com.swconsultoria.impressao.service.ImpressaoService.geraImpressao(ImpressaoService.java:84)
at br.com.swconsultoria.impressao.service.ImpressaoService.impressaoPreview(ImpressaoService.java:76)
at br.com.abatech.agropet.util.Impressora.imprimirNFCe(Impressora.java:1158)
at br.com.abatech.agropet.visoes.jdDocumentosFiscaisEmitidos.lambda$jbtImprimirActionPerformed$2(jdDocumentosFiscaisEmitidos.java:453)
at java.lang.Thread.run(Thread.java:748)
Boa tarde, estou tentando gerar o arquivo pdf da danfe, o mesmo faz a leitura do xml corretamente, salva na pasta corretamente, porem o conteúdo do pdf sai em branco, eu estou usando a lib que foi disponibilizada nesse link https://github.com/Samuel-Oliveira/Java_Danfe/raw/master/java-danfe-1.0.jar
Ao importar como dependência maven da o seguinte erro:
Failed to execute goal on project modulo-on: Could not resolve dependencies for project "projeto": Failed to collect dependencies at br.com.swconsultoria:java-danfe:jar:1.0
O erro ocorre ao tentar imprimir uma danfe cujo xml possui caracter especial, por ex: '&'.
Efetuei uma correção do .jrxml e gostaria de submeter para sua análise.
campo infAdic/infAdFisco não é exibido no arquivo gerado,
No arquivo danfe.jrxml há referência ao campo /infAdic/infCpl, mas não ao infAdFisco.
Olá, após atualizar para a v1.2 quando se tenta criar um arquivo PDF seguindo os mesmos passos do tutorial da página https://github.com/Samuel-Oliveira/Java_Danfe/wiki/01-:-Impress%C3%A3o-PDF-Arquivo ocorre um NullPointerException, segue o Trace:
java.lang.NullPointerException
at java.base/java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2887)
at java.base/java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2903)
at java.base/java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3400)
at java.base/java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:936)
at java.base/java.io.ObjectInputStream.(ObjectInputStream.java:379)
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.(ContextClassLoaderObjectInputStream.java:56)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:277)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:262)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:737)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:1061)
at br.com.swconsultoria.impressao.service.ImpressaoService.geraImpressao(ImpressaoService.java:82)
at br.com.swconsultoria.impressao.service.ImpressaoService.impressaoPdfArquivo(ImpressaoService.java:32)
O mesmo ocorre gerando HTML ou tentando exibir na tela. Tentei criando com um projeto do zero e mesmo assim o erro persiste, identifiquei que é nessa classe e método no return que o problema ocorre:
Utilizando Spring Boot 2.7.6 com Java 11 (Eclipse Adoptium jdk-11.0.15.10-hotspot)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.