Jump to content
We've recently updated our Privacy Statement, available here ×

Error Filling Print ... ?


2005 IR Help

Recommended Posts

By: Edward V. Berard - edberard

Error Filling Print ... ?

2005-05-31 12:55

I created an iReport report that compiled with no problems. However, when I attempt to run it, I get beaucoup error messages, all under the general title of "Error Filling Print...", and an admonition of "Print not filled. Try to use an EmptyDataSource."

 

It would appear that the program is having lots of problems finding classes.

 

Can anybody shed some light on this problem?

 

-- Ed

 

 

 

 

By: Chris Cureau - ccureau

RE: Error Filling Print ... ?

2005-05-31 13:04

I had a similar problem, may or may not be related. I had emailed Giulio Toffoli about the problem, but he wasn't immediately able to offer suggestions...perhaps someone could shed some light onto this? It looks as if the stack trace is saying that it's trying to open the connection as an FTP connection, which is just wrong. I have verified that the report it is trying to load actually exists...

 

Here's the stack trace:

 

---

Filling report...

Error filling print...

java.net.UnknownHostException: C

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at sun.net.NetworkClient.doConnect(Unknown Source)

at sun.net.NetworkClient.openServer(Unknown Source)

at sun.net.ftp.FtpClient.openServer(Unknown Source)

at sun.net.ftp.FtpClient(Unknown Source)

at sun.net.www.protocol.ftp.FtpUrlConnection.connect(Unknown Source)

at sun.net.www.protocol.ftp.FtpUrlConnection.getInputStream(Unknown Source)

at java.net.URL.openStream(Unknown Source)

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:136)

at net.sf.japserreports.engine.util.JRLoader.loadObjectFromLocation (JRLoader.java:259)

at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:294)

at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:339)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1254)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooter(JRVerticalFiller.java:640)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooters(JRVerticalFiller.java:614)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:221)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:122)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:622)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:489)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:76)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:163)

at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:550)

at java.lang.Thread.run(Unknown Source)

 

NESTED BY :

java.net.UnknownHostException: C

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at sun.net.NetworkClient.doConnect(Unknown Source)

at sun.net.NetworkClient.openServer(Unknown Source)

at sun.net.ftp.FtpClient.openServer(Unknown Source)

at sun.net.ftp.FtpClient.<init>(Unknown Source)

at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)

at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream (Unknown Source)

at java.net.URL.openStream(Unknown Source)

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:136)

at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:259)

at net.sf.jasperreports.engine.fill.JRFillSubreport.evaulate(JRFillSubreport.javaL294)

at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:339)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1254)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooter(JRVerticalFiller.java:640)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooters(JRVerticalFiller.java:614)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:221)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:122)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:622)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:489)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:76)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:163)

at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:550)

at java.lang.Thread.run(Unknown Source)

 

NESTED BY :

net.sf.jasperreports.engine.JRException: Error loading object from URL : file://C:/iReport-0.5.0/oereports/patient_address.jasper

 

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:142)

at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:259)

at net.sf.jasperreports.engine.fill.JRFillSubreport.evaulate(JRFillSubreport.javaL294)

at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:339)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1254)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooter(JRVerticalFiller.java:640)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooters(JRVerticalFiller.java:614)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:221)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:122)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:622)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:489)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:76)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:163)

at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:550)

at java.lang.Thread.run(Unknown Source)

 

 

 

 

 

 

 

By: Edward V. Berard - edberard

RE: Error Filling Print ... ?

2005-05-31 13:33

Some more information...

 

I ran the same query, to the same database, over the same connection, using the ClassicC template.

 

I got a clean compile, and I encountered no problems when I generated a report.

 

-- Ed

 

 

 

 

By: Chris Cureau - ccureau

RE: Error Filling Print ... ?

2005-06-02 07:01

Giulio,

All of my reports are in the same directory, and my subreports are named simply as "my_subreport_file_name.jasper" in the subreport expression field. This worked fine when I ran the reports after they were compiled with 0.4.1, but continually fail after the reports were compiled with 0.5.0.

I did a little more experimentation last night with the subreport and found something interesting -- the "my_subreport_file_name.jasper" subreport expression seems to be expanding to

 

file://c:/ireport-0.5.0/my_subreport_file_name.jasper

 

which is incorrect. There needs to be three slashes before the c: to access the file correctly. When I hardcoded the path above with three slashes before the c:, it worked like a dream.

 

Thanks,

Chris

 

 

 

 

By: Chris Cureau - ccureau

RE: Error Filling Print ... ?

2005-06-02 16:28

One other interesting thing...

 

I tried compiling the main report with the subreport expression as "my_subreport_file_name.jasper" in 0.5.0 running in Linux along with the subreport -- the report ran and exported just as it did in 0.4.1. Something in 0.5.0 is causing this in Windows, is my guess.

 

 

 

 

By: J. Brett Howell - jbretthowell

RE: Error Filling Print ... ?

2005-06-03 09:38

I'm in the same boat as ccureau - report with subreport, jasper files for both in the same directory (along with xml) .

 

In the 0.4.1 version of iReport (and in my web application) it works, but in 0.5.0 a "java.net.UnknownHostException: C" is thrown (further down in the stack trace

"net.sf.jasperreports.engine.JRException: Error loading object from URL : file://C:/reportpath/subreport.jasper"

 

This is different from when the subreport cannot be found (or doesn't exist - "Could not load object from location...").

 

I tried to do a little debugging last night and although did not accomplish much, I did notice that the way iReport is handling the report filenames is different: In 0.4.1 the value stored in the fileName variable in the IReportCompiler.run() method was formatted like "c:reportpathreportname.jasper" whereas in 0.5.0 it is formatted like "/reportpath/reportname.jasper" - drive letter is stripped off and different separators.

 

I wonder if the difference in the formatting of the report name is causing problems later on for the class loader to find the jasper file?

 

 

 

 

By: J. Brett Howell - jbretthowell

RE: Error Filling Print ... ?

2005-06-07 08:42

ReportClassLoader.java (around line 206) creates a new URL object passing in a string of "file://" + path + filename, and it appears that in Windows the path is resolving to "/c:/pathtoreport.../" which means the concatenated string equals "file:///c:/pathtoreport.../". The URL host attribute then gets set to "c" instead of "".

 

By removing the second slash from "file://" (e.g., making it "file:/" instead) seems to work properly in Windows.

 

Anyone care to test this in Linux and post the results? Chris?

 

 

 

 

By: Chris Cureau - ccureau

RE: Error Filling Print ... ?

2005-06-08 05:36

I've hardcoded the Subreport Expression field in Linux to

 

"file:/home/chrisc/oereports/subreport.jasper"

 

and tested -- both the compile and the export works as expected. I think you've found the solution, Brett. :-)

 

 

 

 

By: J. Brett Howell - jbretthowell

RE: Error Filling Print ... ?

2005-06-08 07:07

Thanks Chris.

 

After seeing your response I passed a message along to Giulio who immediately responded that he would look at it as soon as he could and put a fix into CVS.

 

So any other Windows users with this problem - be patient, a fix is on the way (or if you can't wait then download the source and make the change yourself in the interim).

 

BTW, 0.5.0 is very nice relative to 0.4.1. The latter was good, but the former is much better.

 

 

 

 

By: Giulio Toffoli - gt78

RE: Error Filling Print ... ?

2005-06-08 13:56

 

I committed in CVS the solution proposed by Chris and Brett.

 

If you can, try it.

 

Thanks

 

Giulio

 

 

 

 

By: Giulio Toffoli - gt78

RE: Error Filling Print ... ?

2005-06-01 16:04

This kind of probleam (strange FTP/HTTP connections) appears specifing a wrong path to find a resource.

 

If you use an expression on type "String" to locate a resource (i.e. a subreport jasper file or an image) use the syntax:

 

c:\my\file.jasper

 

or, if your resource is in the classpath:

 

/path/to/my/resource.jasper

 

This is because if you have all reports in the same directory, you can simply write as subreport expression:

 

"my_subreport_file_name.jasper"

 

Giulio

 

 

 

 

 

 

By: gilbertoca - gilbertoca

RE: Error Filling Print ... ?

2005-11-24 06:15

I have the same problem!

 

ireport version: 0.5.2

the imagem expresion:

"images\novo-4.gif"

 

Windows XP works, but in linux I get this error:

 

Error filling print...

net.sf.jasperreports.engine.JRException: Image not found : imagesnovo-4.gif at net.sf.jasperreports.engine.util.JRImageLoader.loadImageDataFromLocation(JRImageLoader.java:193)

 

If I change de expression to:

"images//novo-4.gif"

 

on windows Xp works and linux give me another error:

Error filling print...

java.net.UnknownHostException: home at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at sun.net.NetworkClient.doConnect(NetworkClient.java:139)

.

.

.

NESTED BY : net.sf.jasperreports.engine.JRException: Error loading byte data : file://home/gilberto/dev/eclipse-config/workspace/scc/sql/report/images/novo-4.gif at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:365)

 

Can anyone help?

Gilberto

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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