spunog Posted January 26, 2010 Share Posted January 26, 2010 I am using Jasper reports with Struts 2 and tomcat 6. I have followed the example to get the sample jasper report working with struts. Everything is fine up until the action looks for the template file. According to the example you should place your template file as follows : try { JasperCompileManager.compileReportToFile( "S2_WEBAPP/jasper/our_jasper_template.jrxml", "S2_WEBAPP/jasper/our_compiled_template.jasper"); So I take this to mean in my /webapps/mywebapp/jasper/our_jasper_template.jrxml If I use servletcontext.getRealPAth("S2_WEBAPP/jasper/our_jasper_template.jrxml");It finds the jrxml file but I get this error : java.lang.ClassNotFoundException: org.apache.commons.lang.xwork.StringUtilsPlease note the xwork package here. This class (in this package) is not shipped with JAsper Reports 3.5.2 I would really like to use Jasper Reports in my project but I am stuck now. Any suggestions are welcome. Thanks in advance Spunog Link to comment Share on other sites More sharing options...
spunog Posted January 29, 2010 Author Share Posted January 29, 2010 FYI I solved this problem by rebuiding the plugin code and rebuiding the jar. Seems like a little bug in the build process of the plugin. Link to comment Share on other sites More sharing options...
sayidnavas Posted March 25, 2010 Share Posted March 25, 2010 Hi Spunog in my project also have same issue.Please help me to resolve the issue..in my project also getting the same error.Let me know how we can do rebuiding the plugin code and rebuiding the jar. Thanks in advance Sayid Navas Link to comment Share on other sites More sharing options...
spunog Posted March 29, 2010 Author Share Posted March 29, 2010 You need to get your hands on the source code of the plugin. Create a project with this source code in Eclipse. You will need to add the required libs to get it compiling correctly. Make your change in the plugin. Get the new .class file you just created. UnJar your plugin to some location. replace the .class file with your new one from the project you just created. create the plugin jar again using the same folder structure but with your new .class file. Add this new jar into your webapps lib folder. Thats it ! Link to comment Share on other sites More sharing options...
rcpeters Posted November 2, 2010 Share Posted November 2, 2010 Here is my new jar if anyone wants it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now