Jaspersoft Studio issue with subreports - jasper-reports

I am having an issue while attempting to compile my Main report which consists of a Sub report in Jaspersoft Studio.
This is the error I am getting:
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Unable to get next record from result set.
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:524)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:499)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:380)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: net.sf.jasperreports.engine.JRException: Unable to get next record from result set.
at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:134)
at net.sf.jasperreports.engine.fill.JRFillDataset.advanceDataSource(JRFillDataset.java:1422)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1271)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1250)
at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1010)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:121)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558)
at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:119)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.firebirdsql.jdbc.FBSQLException: The result set is closed
at org.firebirdsql.jdbc.AbstractResultSet.checkOpen(AbstractResultSet.java:233)
at org.firebirdsql.jdbc.AbstractResultSet.checkCursorMove(AbstractResultSet.java:222)
at org.firebirdsql.jdbc.AbstractResultSet.next(AbstractResultSet.java:284)
at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:130)
... 8 more
I have looked all over the internet and have looked in every Stack Over Flow question that may help with this and I am still coming up short.
Any information on this issue will be greatly appreciated!
-Colt

The problem here can be in 2 areas.
How you created the JasperReports data source that you pass into the report
This is in the code you are using to run JasperReports. The JasperReports Server manages the creation and transaction control for data sources. What is the Firebird JDBC URL you are using?
How you pass the connection to the sub report
This is in the JRXML. When you use the sub report, you have to add:
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>

Related

Jasper report runs in preview, but not jasper server

I have a report that is running a pretty big query, it returns a lot of data and also has a parameter that is going to used as an input control fro the report server. However the issue is that when I upload it to the server, it errors. This is the error log it gives
Error Message
Error filling report (Error UID: 9f1a27b4-5bb1-40df-ab67-23ff44f15d66)
Error Trace
com.jaspersoft.jasperserver.api.JSException: Error filling report Arguments: at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$FillResultListener.reportFillError(EngineServiceImpl.java:1336) at net.sf.jasperreports.engine.fill.BaseFillHandle.notifyError(BaseFillHandle.java:216) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:138) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:961) at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:169) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$AsynchronousReportFiller.fillReport(EngineServiceImpl.java:912) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1840) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runWithDataSource(EngineServiceImpl.java:1159) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:1088) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:983) 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) Caused by: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: Financial_summary_report_test. at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:347) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:166) at com.jaspersoft.commons.util.JSControlledJdbcQueryExecuter.createDatasource(JSControlledJdbcQueryExecuter.java:111) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1245) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:723) at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:429) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:570) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123) ... 10 more Caused by: org.postgresql.util.PSQLException: ERROR: transaction is read-only Detail: at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:310) ... 17 more
The errors don't mean much to me, and I don't find them all that helpful, I can tell that there are errors for: Error filling report Arguments, Caused by: net.sf.jasperreports.engine.JRException: Error executing SQL statement for, ERROR: transaction is read-only Detail: at. Does anybody actually know what it means?
Again it will work in studio, but not jasper report server. I did a smaller test report and it ran on the server just fine...

Jasperreport with REST Web Service as the Dataset, the verb can't be null

Good day everyone!
I am trying to use Jasper Report with REST Web Service as my data adapter. I was able to preview the data, but I wasn't able to preview the report because it says that the verb can't be null.
here is the link to the source view of my jrxml (it's too long, so I can't post it here) :
RegisteredParticipants.jrxml
and this is my data adapter:
Everytime I try to preview the report, I get this error:
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error creating request: net.sf.jasperreports.engine.JRException: The verb can't be null
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:545)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:520)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:401)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error creating request: net.sf.jasperreports.engine.JRException: The verb can't be null
at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:874)
at net.sf.jasperreports.components.table.fill.FillTableSubreport.prepareSubreport(FillTableSubreport.java:172)
at net.sf.jasperreports.components.table.fill.FillTable.prepare(FillTable.java:424)
at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:152)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:537)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:411)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:386)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:313)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:247)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:582)
at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123)
at java.lang.Thread.run(Thread.java:745)
Caused by: net.sf.jasperreports.engine.JRException: Error creating request: net.sf.jasperreports.engine.JRException: The verb can't be null
at com.jaspersoft.webservice.data.util.WebServiceConnector.createRequestForWs(WebServiceConnector.java:187)
at com.jaspersoft.webservice.data.util.WebServiceConnector.callWS(WebServiceConnector.java:134)
at com.jaspersoft.webservice.data.query.WebServiceQueryExecuter.createDatasource(WebServiceQueryExecuter.java:168)
at com.jaspersoft.webservice.data.query.WebServiceQueryExecuter.createDatasource(WebServiceQueryExecuter.java:1)
at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1245)
at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:723)
at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:438)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:550)
at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:732)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)
at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 more
Caused by: net.sf.jasperreports.engine.JRException: The verb can't be null
at com.jaspersoft.webservice.data.util.WebServiceConnector.createRequestForWs(WebServiceConnector.java:178)
... 14 more
I don't know if I missed anything and I don't have idea about the verbkey. I tried to connect the "RegisteredParticipantsRest" to the main dataset, but it didn't help . I hope someone can help me. Thanks!
I found out the cause of the error. I had to export the data adapter as xml, then set it as the "Default data adapater" on my "RegisteredParticipantsRest"

Jasper reports, getting error message/empty report while compiling jrxml file even after datasource test is passed

I am using JasperStudio and Jasper server 6.2 windows version. In the local environment firstly I have tested data source, postgreSQL JDBC connection, connection which is successfull and I have created a domain and linked the datasource. I took the working jrxml file which needs an input string. I have created the report in view>repository>create>jasperReport and while configuring the report I have given the jrxml file which is working in production server and set an input field as mandatory. till now everything is fine but when I click on the report it is asking for input value, when an input value is given and clickon apply, it is showing the following error message:
Error Message
Error filling report
Error Trace
com.jaspersoft.jasperserver.api.JSException: Error filling report Arguments: at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$FillResultListener.reportFillError(EngineServiceImpl.java:1294) at net.sf.jasperreports.engine.fill.BaseFillHandle.notifyError(BaseFillHandle.java:210) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:134) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:922) at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:164) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$AsynchronousReportFiller.fillReport(EngineServiceImpl.java:878) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1774) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runWithDataSource(EngineServiceImpl.java:1118) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:1047) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:944) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.DiagnosticLoggingContextCompatibleExecutorService$1.run(DiagnosticLoggingContextCompatibleExecutorService.java:61) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: net.sf.jasperreports.engine.JRException: java.lang.RuntimeException: exception initting subfilters at com.jaspersoft.ji.adhoc.strategy.StrategyAwareDomainQueryExecuter.createDatasource(StrategyAwareDomainQueryExecuter.java:165) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1129) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:696) at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:437) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:526) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:119) ... 11 more Caused by: java.lang.RuntimeException: exception initting subfilters at com.jaspersoft.ji.adhoc.strategy.DomainDataStrategy.getInitialSubFilterList(DomainDataStrategy.java:629) at com.jaspersoft.ji.adhoc.strategy.BaseDataStrategy.initSubFilterList(BaseDataStrategy.java:424) at com.jaspersoft.ji.adhoc.strategy.DomainDataStrategy.getBaseQueryDataSet(DomainDataStrategy.java:145) at com.jaspersoft.ji.adhoc.strategy.DomainQueryDataStrategy.getBaseQueryDataSet(DomainQueryDataStrategy.java:38) at com.jaspersoft.ji.adhoc.strategy.CommonDomainDataStrategy.createQuery(CommonDomainDataStrategy.java:736) at com.jaspersoft.ji.adhoc.strategy.CommonDomainDataStrategy.getQuery(CommonDomainDataStrategy.java:681) at com.jaspersoft.ji.adhoc.strategy.CommonDomainDataStrategy.getWorkingDataSet(CommonDomainDataStrategy.java:1232) at com.jaspersoft.ji.adhoc.strategy.CommonDomainDataStrategy.getWorkingDataSet(CommonDomainDataStrategy.java:1220) at com.jaspersoft.ji.adhoc.strategy.StrategyAwareDomainQueryExecuter.createDatasource(StrategyAwareDomainQueryExecuter.java:156) ... 16 more Caused by: java.lang.NullPointerException at com.jaspersoft.commons.dataset.expr.DataSetExpressionParser.varRef(DataSetExpressionParser.java:1703) at com.jaspersoft.commons.dataset.expr.DataSetExpressionParser.term(DataSetExpressionParser.java:1349) at com.jaspersoft.commons.dataset.expr.DataSetExpressionParser.multDivExpr(DataSetExpressionParser.java:1003) at com.jaspersoft.commons.dataset.expr.DataSetExpressionParser.addSubExpr(DataSetExpressionParser.java:888) at com.jaspersoft.commons.dataset.expr.DataSetExpressionParser.comparisonExpr(DataSetExpressionParser.java:601) at com.jaspersoft.commons.dataset.expr.DataSetExpressionParser.notExpr(DataSetExpressionParser.java:499) at com.jaspersoft.commons.dataset.expr.DataSetExpressionParser.andExpr(DataSetExpressionParser.java:423) at com.jaspersoft.commons.dataset.expr.DataSetExpressionParser.orExpr(DataSetExpressionParser.java:353) at com.jaspersoft.commons.dataset.expr.DataSetExpressionParser.booleanExpr(DataSetExpressionParser.java:298) at
when I try to compile the same jrxml in JasperStudio then it is giving me an empty report with design but no data when empty data adapter is selected and it is giving complete empty document when a datasource is selected.

(Eclipse) JasperStudio JasperReports Server Access Configuration: AxisFault: NullPointerException

Got this error on Repository Explorer->Create JasperReports Server Connection
Error Details:
----------------------------------------------------------------------------------------------
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:193)
...
Caused by: java.lang.NullPointerException
at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:193)
although the calling the server URL, e.g. http://somehost:8080/jasperserver/services/repository works in the browser stating:
repository
Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here...
Using JasperServer 5.2.0 and JasperStudio 5.5.0.
This may likely be due to some local HTTP proxy setup problem.
To solve this you can try the following:
Window->Preferences->General->Network Connections->
Provider: Manual (where Eclipse proxy settings are applied)
(adjust proxy rules as desired) (try including/excluding rules matching your jasper server host)
restart Eclipse (important!)
I found this solution a little hidden here: Jasper forum question 3143 comment 16.

Unable to run jbehave feature/story with JUnitReportingRunner

I am using JUnitReportingRunner as below in jbehave .feature file in eclipse. But only BeforeStories and AfterStories are run and the .feature file is not getting executed. Here is the code and error. Please help. What could be the issue? Any help is much appreciated.
#RunWith(JUnitReportingRunner.class)
public class CalcConfig extends JUnitStories {
public CalcConfig() {
JUnitReportingRunner.recommandedControls(configuredEmbedder());
}
...
Here is the error I am getting:
Failed to run story test/resources/calculator/Calculator.feature
java.lang.AbstractMethodError: de.codecentric.jbehave.junit.monitoring.JUnitScenarioReporter.lifecyle(Lorg/jbehave/core/model/Lifecycle;)V
at org.jbehave.core.reporters.DelegatingStoryReporter.lifecyle(DelegatingStoryReporter.java:79)
at org.jbehave.core.reporters.ConcurrentStoryReporter.lifecyle(ConcurrentStoryReporter.java:137)
at org.jbehave.core.embedder.StoryRunner.runCancellable(StoryRunner.java:277)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:220)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:181)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:229)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:201)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
(AfterStories)
Generating reports view to '/Documents/workspace/Calculator/jbehave' using formats '[stats, stats, html, txt, console, junitscenarioreporter]' and view properties '{defaultFormats=stats, decorateNonHtml=true, viewDirectory=view, decorated=ftl/jbehave-report-decorated.ftl, reports=ftl/jbehave-reports-with-totals.ftl, maps=ftl/jbehave-maps.ftl, navigator=ftl/jbehave-navigator.ftl, views=ftl/jbehave-views.ftl, nonDecorated=ftl/jbehave-report-non-decorated.ftl}'
Reports view generated with 0 stories (of which 0 pending) containing 0 scenarios (of which 0 pending)
I've got the same error on my site. My problem was, that I was using a wrong version of JBehave. Please make sure the version of JBehave matches JBehave-Junit-Runner.
Especially, the 3.9-SNAPSHOT version of JBehave introduces an additional method lifecycle, which is not implemented by the JUnitScenarioReporter.
The fix is trivial, so I'll pull it to github today.