Jump to content
Changes to the Jaspersoft community edition download ×

JRLoader: JRException:Error loading byte data


2004 IR Help

Recommended Posts

By: Albert Chan - albertchan

JRLoader: JRException:Error loading byte data

2005-07-25 12:01

Hi,

 

It seems like JasperReport generate a temp file

(tempReportName.class) to store the report before

creating the real jasper report. Here are my questions:

 

1. How does it determine where to create this temp report?

 

2. Can we configure JasperReport to create this temp report in a specified location, like /tmp intead of my home directory?

 

3. If I try to generate 2 reports at the same time, would the 2 reports step on each other's toe since JasperReport generate this temp file

(tempReportName.class) in my home directory?

Possibly a synchronization issue here?

 

Thanks!

albert

ps: please refer to the error message below:

 

net.sf.jasperreports.engine.JRException: Error loading byte data : /export/home/cptest2/tempReportName.class

at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:291)

at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileReport(JRAbstractClassCompiler.java:125)

at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:106)

at net.sf.jasperreports.engine.JasperCompileManager.compileReportToStream(JasperCompileManager.java:181)

at net.sf.jasperreports.engine.JasperManager.compileReportToStream(JasperManager.java:916)

 

 

 

 

 

By: Teodor Danciu - teodord

RE: JRLoader: JRException:Error loading byte

2005-07-25 12:50

 

Hi,

 

First of all you have to make sure you really need to

compile report templates at runtime.

This is required only you have dynamically built report

templates.

If your reports do not change with every execution based

on some user input, then you only have to compile your

static report templates once, at design time and deploy

the compiler *.jasper files with your application just like

you deploy the *.class files.

 

If runtime report compilation is required, the I suggest

you put the supplied /lib/jdt-compiler.jar file in the

classpath of your application so that the JDT-based

report compiler is used and not the JDK-based onces.

The JDT report compiler does not work with temporary

files on disk and it is up to ten times faster.

 

If you still think you need to stick with the JDK-based

report compilers, then check this sections of the docs

that explain how to configure them using system properties:

 

http://jasperreports.sourceforge.net/quick.how.to.html#compile

 

I hope this helps.

Teodor

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...