Attachment not present!

Hi,

I created a report with ireport, what is running fine. When I fill it to Jasperserver repository, I've this error message, when ireport reopening it: 

Error:
Attachment not present!

When I delete first 4 textfield from detail, the fill working fine.

I'm using JasperServer 3.7.0, IReport 3.7.2, Postgresql

Have you got any ideas whats wrong

thx,
Csaba

ragasits's picture
Joined: Nov 29 2006 - 10:39pm
Last seen: 2 years 6 months ago

14 Answers:

Hi

I have the same issue. Tried searching a lot about it but didn't find anything. As the guy above told, if I remove some of the text fields, it works fine. If I delete those fields and try adding anyting there, it still gives the same error.

It's really urgent. Can some one please help us out.

Cheers

Prashant

prashant_nz's picture
Joined: Dec 16 2010 - 3:50pm
Last seen: 12 years 9 months ago

iReport version must match JasperServer version.

Since you're using JasperServer 3.7.0, you should be using iReport 3.7.0

hozawa's picture
190673
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago
Hi
Were U able to sort out this issue.I am Facing the Same.
Pls Respond if you have any clue...
Gaurav
itsgauravdas's picture
Joined: Dec 10 2010 - 2:51am
Last seen: 12 years 9 months ago

Hi

No, I still didn't get the solution. I even tried installing the same exact version of iReport and Jasper server but still having the same problem.

prashant_nz's picture
Joined: Dec 16 2010 - 3:50pm
Last seen: 12 years 9 months ago
I don't Know Why this Error is Comming for Only One or Two of the reports.
Is this a limitation/bug in Jasper Reports....
Any Idea||||
itsgauravdas's picture
Joined: Dec 10 2010 - 2:51am
Last seen: 12 years 9 months ago

I am facing the same problem again and this time I just created a simple report (i.e. with no subreports). Can someone please help.

prashant_nz's picture
Joined: Dec 16 2010 - 3:50pm
Last seen: 12 years 9 months ago

Prashant,

I think you'll need to add some more details about what you are encountering and step by step instructions for reproducing it. There are probably other readers like myself that cannot understand what symptoms you're facing, so it's impossible to begin guessing at what the underlying cause it.

Regards,
Matt

mdahlman's picture
37480
Joined: Mar 13 2007 - 2:43am
Last seen: 8 years 10 months ago
Hi Matt,

Thanks for looking into it. Well, I will tell you the latest problem I had with the same error message. I am using JasperServer 3.7.0, IReport 3.7.3. I have set my compatibility option in iReports to JasperReport 3.7.0 .

Well I created a report and it worked completely fine in iReports. Now I uploaded in the jasper server repository and it get uploaded without any error. Now when I double click on the .JRXML file from the reporsitory, it gives me error

Error:
Attachment not present!

I have attached a screenshot.

Now for the same report in iReport, I tried deleting some text fields or other stuff randomly and it worked after I deleted some of the fields.

Please let me know if you need any further details.

Thanks
Prashant


Post Edited by prashant_nz at 01/09/2011 20:32
prashant_nz's picture
Joined: Dec 16 2010 - 3:50pm
Last seen: 12 years 9 months ago

Ahh... I see what's going on now. I just had this problem recently myself.

The problem is with how web service attachments are handled. By default they get saved into .../webapps/jasperserver/WEB-INF/attachments

It's common enough that the user running the app server, I'll call him "tomcat", cannot create directories there. So tomcat cannot create the folder "attachments" and you cannot upload things. Or the directory could exist but tomcat doesn't have write access to it.

But what does it work for some reports and not others? That's because axis has a hard-coded limit of 16Kb that defines what "large" is. If the report being uploaded is smaller than 16Kb then it handles things without writing to the file system. Life is good. But if the report is large then axis needs to write the file to the attachments directory. If tomcat cannot do this, then you get this error.

Solutions:

  1. The quickest workaround is to upload the file using the web UI instead of using the JasperServer plugin in iReport. This is bad long term... but it's a good quick fix.
  2. Modify .../webapps/jasperserver/WEB-INF/server-config.wsdd. Find this line and set the value to somewhere that tomcat does have access to write to:
    <parameter name="attachments.Directory" value="attachments"/>
  3. My favorite: modify the permissions on the attachments directory.

Please let me know if that solves things for you.

Regards,
Matt

 

mdahlman's picture
37480
Joined: Mar 13 2007 - 2:43am
Last seen: 8 years 10 months ago

Thanks,Matt,

Will try  this solutions.

Regards,

Gaurav

itsgauravdas's picture
Joined: Dec 10 2010 - 2:51am
Last seen: 12 years 9 months ago

Thanks a lot Matt. It worked absolutely fine.

prashant_nz's picture
Joined: Dec 16 2010 - 3:50pm
Last seen: 12 years 9 months ago

Thanks Matt,

We had the same problem and we just added attachment folder in .../webapps/jasperserver/WEB-INF/ and updated permission for tomcat.

That work well !

--
Gilles

gdumeou's picture
Joined: Jul 1 2011 - 12:28am
Last seen: 12 years 3 months ago

Hello,

I've tried all the possibilities to fix this issue on my iReport, based on what mdahlman responded, but I didnt managed to fix it.

I still receive Attachment not present! text, and my settings are:

iReport v4.1.3

JasperServer v4.2

Tomcat6

Java 1.6.0

 

Response from jasperserver is:

Attachment not present!


java.lang.Exception: Attachment not present! 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:443) 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) 
    at com.jaspersoft.ireport.jasperserver.ReportRunner.run(ReportRunner.java:70) 
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) 
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 

 

Please let me know if you need any other details.

Thanks!

rovidiu82's picture
Joined: Jan 9 2012 - 8:01am
Last seen: 11 years 8 months ago

rovidiu82
Wrote:

Hello,

I've tried all the possibilities to fix this issue on my iReport, based on what mdahlman responded, but I didnt managed to fix it.

I still receive Attachment not present! text, and my settings are:

iReport v4.1.3

JasperServer v4.2

Tomcat6

Java 1.6.0

 

Response from jasperserver is:

Attachment not present!


java.lang.Exception: Attachment not present! 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:443) 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) 
    at com.jaspersoft.ireport.jasperserver.ReportRunner.run(ReportRunner.java:70) 
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) 
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 

 

Please let me know if you need any other details.

Thanks!

I managed to fix it

rovidiu82's picture
Joined: Jan 9 2012 - 8:01am
Last seen: 11 years 8 months ago
Feedback