Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File is getting error while generating the pdf even the case is also passes #22

Open
Wal-Ramiz opened this issue Oct 6, 2016 · 9 comments

Comments

@Wal-Ramiz
Copy link

Can you please help in this regard,

Oct 06, 2016 11:47:26 AM com.uttesh.pdfngreport.PDFReportListener generateReport
SEVERE: null
com.uttesh.pdfngreport.exceptionHandler.ReportException: Failed generating PDF report.
at com.uttesh.pdfngreport.PDFGenerator.generateReport(PDFGenerator.java:88)
at com.uttesh.pdfngreport.PDFReportListener.generateReport(PDFReportListener.java:91)
at org.testng.TestNG.generateReports(TestNG.java:1089)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:152)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:57)
Caused by: java.lang.NullPointerException
at com.uttesh.pdfngreport.util.pdf.GenerateTable.populateColumnHeader(GenerateTable.java:247)
at com.uttesh.pdfngreport.util.pdf.GenerateTable.generate(GenerateTable.java:63)
at com.uttesh.pdfngreport.util.pdf.SuccessTable.populateData(SuccessTable.java:40)
at com.uttesh.pdfngreport.util.pdf.SuccessTable.populateSingleTableData(SuccessTable.java:58)
at com.uttesh.pdfngreport.PDFGenerator.getTable(PDFGenerator.java:149)
at com.uttesh.pdfngreport.PDFGenerator.populatePassedListTable(PDFGenerator.java:97)
at com.uttesh.pdfngreport.PDFGenerator.generateReport(PDFGenerator.java:71)
... 6 more

@uttesh
Copy link
Owner

uttesh commented Oct 6, 2016

@Wal-Ramiz please go through the configuration properly, looks like its missing the some configuration, is sample code is working fine?

@Wal-Ramiz
Copy link
Author

@uttesh Yeah uttesh sample code is working fine and followed the exact steps which you mentioned while configuring it.

@uttesh
Copy link
Owner

uttesh commented Oct 10, 2016

@Wal-Ramiz send the full build log.

@abdelwahebg
Copy link

@uttesh I got the some error on my side :( any update for this issue ? Thanks

@uttesh
Copy link
Owner

uttesh commented May 16, 2017

@abdelwahebg please send the error detail and this issue come only when configuration is not correct. Make sure configuration is correct

@abdelwahebg
Copy link

abdelwahebg commented Apr 4, 2018

@uttesh We got an empty report in the specific directory
the full log is :com.uttesh.pdfngreport.PDFReportListener generateReport
GRAVE: null
com.uttesh.pdfngreport.exceptionHandler.ReportException: Failed generating PDF report.
at com.uttesh.pdfngreport.PDFGenerator.generateReport(PDFGenerator.java:88)
at com.uttesh.pdfngreport.PDFReportListener.generateReport(PDFReportListener.java:93)
at org.testng.TestNG.generateReports(TestNG.java:1192)
at org.testng.TestNG.run(TestNG.java:1120)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
Caused by: java.lang.NullPointerException
at com.uttesh.pdfngreport.util.pdf.GenerateTable.populateColumnHeader(GenerateTable.java:247)
at com.uttesh.pdfngreport.util.pdf.GenerateTable.generate(GenerateTable.java:63)
at com.uttesh.pdfngreport.util.pdf.SuccessTable.populateData(SuccessTable.java:40)
at com.uttesh.pdfngreport.util.pdf.SuccessTable.populateSingleTableData(SuccessTable.java:58)
at com.uttesh.pdfngreport.PDFGenerator.getTable(PDFGenerator.java:149)
at com.uttesh.pdfngreport.PDFGenerator.populatePassedListTable(PDFGenerator.java:97)
at com.uttesh.pdfngreport.PDFGenerator.generateReport(PDFGenerator.java:71)
Thx

@abdelwahebg
Copy link

@uttesh Any update for this issue ? Thanks

@abdelwahebg
Copy link

abdelwahebg commented Apr 5, 2018

No error found when using this configuration (2.0.10 version):<!-- TestNG PDF Generation --> <dependency> <groupId>jfree</groupId> <artifactId>jfreechart</artifactId> <version>1.0.13</version> </dependency> <dependency> <groupId>org.apache.xmlgraphics</groupId> <artifactId>fop</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>org.apache.avalon.framework</groupId> <artifactId>avalon-framework-api</artifactId> <version>4.3.1</version> </dependency> <dependency> <groupId>org.apache.avalon.framework</groupId> <artifactId>avalon-framework-impl</artifactId> <version>4.3.1</version> </dependency> <dependency> <groupId>com.uttesh</groupId> <artifactId>pdfngreport</artifactId> <version>2.0.10</version> </dependency> <dependency> <groupId>com.google.inject</groupId> <artifactId>guice</artifactId> <version>4.1.0</version> <classifier>no_aop</classifier> <scope>test</scope> </dependency>
Also the report is generated without errors
Thx

@angarasadhana
Copy link

@uttesh My scripts are running successfully and report is also generating but the size of the pdf file is always zero bytes because of which unable to open it. Also getting below error, can you please help me with this ?
Sep 14, 2023 10:46:54 PM com.uttesh.pdfngreport.PDFReportListener generateReport
SEVERE: null
com.uttesh.pdfngreport.exceptionHandler.ReportException: Failed generating PDF report.
at com.uttesh.pdfngreport.PDFGenerator.generateReport(PDFGenerator.java:88)
at com.uttesh.pdfngreport.PDFReportListener.generateReport(PDFReportListener.java:93)
at org.testng.TestNG.generateReports(TestNG.java:1134)
at org.testng.TestNG.run(TestNG.java:1072)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
Caused by: java.lang.NullPointerException
at com.uttesh.pdfngreport.util.pdf.GenerateTable.populateColumnHeader(GenerateTable.java:247)
at com.uttesh.pdfngreport.util.pdf.GenerateTable.generate(GenerateTable.java:63)
at com.uttesh.pdfngreport.util.pdf.SuccessTable.populateData(SuccessTable.java:40)
at com.uttesh.pdfngreport.util.pdf.SuccessTable.populateSingleTableData(SuccessTable.java:58)
at com.uttesh.pdfngreport.PDFGenerator.getTable(PDFGenerator.java:149)
at com.uttesh.pdfngreport.PDFGenerator.populatePassedListTable(PDFGenerator.java:97)
at com.uttesh.pdfngreport.PDFGenerator.generateReport(PDFGenerator.java:71)
... 5 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants