This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

JasperReports: Subreport failure in deployed environment.

 
Ranch Hand
Posts: 624
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We use jasperReports in our J2ee application running on WAS6 servers.

We build our reports in iReports..
test them in our RAD6 built application on a local WAS6 server on windows and then deploy them to our production Linux servers.

After much mucking about we decided that we really need a way of adding new reports without the hassle of redeployment - so I've developed a framework for storing reports and their definitions in our DB.

Everything works well - When the user requests a report (with the relevant paramters provided) .jasper and .jrxml files are pulled out of the database and stored temporarily in a temp directory on the server and jasper reports builds a PDF which is presented to the user... sweet...

Unfortunately, when the report in question contains a subreport things fall over. My code extracts .jasper and .jrxml files for all subreports used - and when running from my WAS6 server locally it works a charm. The SUBREPORT_DIR parameter is populated with a value specific to the environment it runs on - which matches the temp directory the .jasper and .jrxml files are extracted to ('C:\Temp\ReportFiles' on Windows boxes or '/temp/reportfiles/' on Linux ) but on my Linux servers the report fails with the following message:



(Does that make sense? )

Can anyone suggest a way to move forward?
 
Alan Wanwierd
Ranch Hand
Posts: 624
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved!

It seems my code that created files in a temp directory created them with uppercase names (for reasons that are not important to this discussion)...

Of course the reference to the subreport compiled by iReports was looking for a mixed case name ("MySubReport.jasper") -

so in windows it would find "MYSUBREPORT.JASPER" aand all would be ok - but the Linux boxes are a little more fussy about case-sensitivity in file names!

So in the end - nothing to do with Jasper at all!!
 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!