Jump to content
Changes to the Jaspersoft community edition download ×

"com.jaspersoft.jasperserver.api.JSException: Error filling report" and "net.sf.jasperreports.engine.JRException: Resource not found"


ujjawalkhare11
Go to solution Solved by ujjawalkhare11,

Recommended Posts

Hi Attached is the copy of my jasper report which has 3 subreports in it. While running it I am getting below errors:

Please help to crossveryfy the rxml and let me know if this error is due to subreport path or I need any other modification ?

Error Message
com.jaspersoft.jasperserver.api.JSException: Error filling report

Error Trace
com.jaspersoft.jasperserver.api.JSException: Error filling report at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$FillResultListener.reportFillError(EngineServiceImpl.java:1030) at net.sf.jasperreports.engine.fill.BaseFillHandle.notifyError(BaseFillHandle.java:211) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:135) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:733) at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:165) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$AsynchronousReportFiller.fillReport(EngineServiceImpl.java:695) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1474) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:874) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:754) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: net.sf.jasperreports.engine.JRException: Resource not found at : ////reports////subreports////report8_subreport1.jrxml at net.sf.jasperreports.repo.RepositoryUtil.getResourceFromLocation(RepositoryUtil.java:255) at net.sf.jasperreports.repo.RepositoryUtil.getReport(RepositoryUtil.java:208) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport(JRFillSubreport.java:329) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:359) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:287) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:457) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:337) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:273) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:144) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120) ... 9 more

Error Message
net.sf.jasperreports.engine.JRException: Resource not found at : ////reports////subreports////report8_subreport1.jrxml

Error Trace
net.sf.jasperreports.engine.JRException: Resource not found at : ////reports////subreports////report8_subreport1.jrxml at net.sf.jasperreports.repo.RepositoryUtil.getResourceFromLocation(RepositoryUtil.java:255) at net.sf.jasperreports.repo.RepositoryUtil.getReport(RepositoryUtil.java:208) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport(JRFillSubreport.java:329) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:359) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:287) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:457) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:337) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:273) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:144) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:733) at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:165) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$AsynchronousReportFiller.fillReport(EngineServiceImpl.java:695) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1474) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:874) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:754) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

At a first glance this looks like a path issue

 

Caused by: net.sf.jasperreports.engine.JRException: Resource not found at : ////reports////subreports////report8_subreport1.jrxml[/code]

I'd say, check your path. 
 

I encounterd a similair issue when running a report with subreports in iReport Designer while the report was on the Jasperserver (imported via the repositorybroweser)

Later i figured i only could preview the report through the Japserserver.

Link to comment
Share on other sites

  • Solution

Here is the solution:

1. login to jasperserver.

2. Go to View-->Repositry

3. Right click on Reports-->Add Resource-->File-->jrxm

4. Choose below:

a. Type of File: JRXML

b. Upload subreport.jrxml from your system (if more then one subreports then upload one by one after you complete procedure of uploading frist jrxml file.)

c. Give a name for your jrxml file in name field. (In my case i gave name as report8_subreport1, report8_subreport2 and report8_subreport3

d. save loacation: /reports and click on submit.

5. After you upload all subreports now its time to edit subreport dir in main.jrxml file.

Follow the steps below.

Note. Name given to subreport jrxml files is actually should be involved in jrxml dir path. so here our path of subreports should follow below patterns:

"repo:/reports/<name_of_subreport>"

so in my case this path will be :

"repo:/reports/report8_subreport2"

so in main.jrxml file i will have to mention like below:

<subreportExpression><![CDATA["repo:/reports/report8_subreport1"]]></subreportExpression>

<subreportExpression><![CDATA["repo:/reports/report8_subreport2"]]></subreportExpression>

<subreportExpression><![CDATA["repo:/reports/report8_subreport3"]]></subreportExpression>

 

Be noted that in DefaultValueExpression field we need to give local path of our system where main.jrxml file is saved.

for reference i am also attaching my main.jrxml file here (report10-Copy.jrxml)

6. Now once editing of  main.jrxml is done again follow the steps that were used to upload subreport.jrxml files.

7. Now its time to create a link with database to run our report:

a. Go to report-->Add Resource-->JasperReport

b. Give a name to report (this name will be the link to run your report)

c. choose "select a jrxml from repositry" and under brouse in "Reports" you can find your main.jrxml file as a namethat was choosen by you while uploaded main.jrxml.

d. click on datasource and choose a database connection from which you are retrieving the report.

e. Click on submit.

Now your report is ready to run. Just click on link of you final setup (will appear under "Reports") and your report will run.

 

"HAVE FUN"

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...