This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes Dynamic Jasper +  struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dynamic Jasper +  struts 2" Watch "Dynamic Jasper +  struts 2" New topic
Author

Dynamic Jasper + struts 2

Renz Alexander
Greenhorn

Joined: Jun 11, 2010
Posts: 28
hi I've been having problems with my setup of dynamic Jasper plugin with struts. i've been getting this error



i don't know why but i followed the intstructions in the site. can any one help me thanks

[edit] so i've finally got this thing working.

this is basically a patch that allows the plugin to work work with struts 2.1.8 and xwork-core-2.1.6

so for the steps:

1. Edit the source code of the plugin. change the instance of the at around line 310 to

don 't forget to remove the import statement of the previous code

2. add the needed the jars implied by the import statement
remember servelet-api.jar can be found in the tomcat lib folder

3. now compile the whole thing.

4. after adding the jar file to your project download remember to get a copy of itext 2.1.7(specifically if an error occured concerning com/lowagie/text/DocumentException) and not itext 5.x.x as they have changed the namespace from com.lowagie to com.itextpdf.

* Another error might occur concerning beanutil so get the commons-beanutils jar.
* Also don't forget to assign the proper type to the item you're printing.

there you go now just follow the example from their site and you've got yourself a working dynamic jasper report plugin

[edit 2]

so their seems to be another problem and now i can only print out pdf file. i'll update when i get it fixed

[edit 3]

my bad it was supposed to be isNotEmpty no isEmpty
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Move to Struts.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If this is a bug in the JasperReports plugin it would probably be more helpful to file a ticket against it in the Struts 2 JIRA.
Renz Alexander
Greenhorn

Joined: Jun 11, 2010
Posts: 28
thanks for the move. the plugin isn't a jaspererport plugin it's a dynamic jasper plugin.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Oh; I have no idea what that is--it probably would have been better to ask the creators of the plugin directly if it's not part of Struts itself.
Renz Alexander
Greenhorn

Joined: Jun 11, 2010
Posts: 28
it's a plugin that allows struts to create jasper reports dynamically with out the jasper report xml file. i actually posted in their forums but no one seems to be there. the reason i placed this post in the other sub-forum is because i thought the error was more related to my configuration with Dynamic jasper Report than with struts 2 and i didn't expect that the plugin has a compatibility issue with the latest version of struts 2. thanks for the reply again
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic Jasper + struts 2
 
Similar Threads
Exception in using javatemplates plugin / struts 2
[Struts 2.1.8] datetimepicker and action: String or Date ??
Conversion of string to date
java.lang.NullPointerException
Connecting to Oracle using Struts 2