ciprian_ivan Posted October 4, 2012 Share Posted October 4, 2012 Hello, I wrote a simple stored procedure (no parameters in the report query, only hard-coded values as IN variables for the procedure). When i test it in Ireport, it works fine, the result is as expected. When i create a "JasperServer" report and try to "Run Jasper server report", i get the ERROR message: 1 - An error has occurred. Please contact your system administrator. (6632)java.lang.Exception: 1 - An error has occurred. Please contact your system administrator. (6632) at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:403) 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) Can someone give me a pointer in the right direction ?? i "google" without results until now.Thank you, Ciprian Link to comment Share on other sites More sharing options...
lisacbeaton Posted October 4, 2012 Share Posted October 4, 2012 Can you post your JRXML file? Can you tell us more about this stored procedure? What does it do, etc. Link to comment Share on other sites More sharing options...
ciprian_ivan Posted October 4, 2012 Author Share Posted October 4, 2012 -- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- -------------------------------------------------------------------------------- DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `usp_show_users`(IN `user_id_low_param` INT, IN `user_id_high_param` INT, IN `birth_date_low_param` DATE, IN `birth_date_high_param` DATE, IN `school_ID_param` INT) READS SQL DATA BEGIN /* Variables: */ /* SQL Statemens: */ select user_id, concat(last_name, ", ",first_name) as userName, date_of_birth as BirthDate from user_profiles where school_instance_id = school_ID_param AND ( (user_id >=user_id_low_param) and (user_id <=user_id_high_param) ) AND ( (date_of_birth >=birth_date_low_param) and (date_of_birth <=birth_date_high_param) ) order by date_of_birth, user_id; END Link to comment Share on other sites More sharing options...
ciprian_ivan Posted October 4, 2012 Author Share Posted October 4, 2012 A colleague find a solution: In webapps/jasperserver/WEB-INF/classes/esapi/security-config.properties/validation.properties you have to set: Validator.ValidSQL = ^{s*(?i)(withs+.*)?(select|call|exec(ute)?)s+[^;]+}$ to allow for {call "sp_name"(...)} And IT WORKS! Thanks a lot for responsiveness ! Link to comment Share on other sites More sharing options...
Solution mgeise Posted October 5, 2012 Solution Share Posted October 5, 2012 Adding as an answer, instead of a comment...Thanks for posting the solution you found!"In webapps/jasperserver/WEB-INF/classes/esapi/security-config.properties/validation.properties you have to set: Validator.ValidSQL = ^{s*(?i)(withs+.*)?(select|call|exec(ute)?)s+[^;]+}$ to allow for {call "sp_name"(...)} And IT WORKS! Thanks a lot for responsiveness" Link to comment Share on other sites More sharing options...
kcsekhar25 Posted June 4, 2013 Share Posted June 4, 2013 Hi all , i tried above one as well but not useful in my case. i have generated a report usin stored function with 3 parameters in postgresql and the report is working very well in the ireport and it is throwing 6632 error in jasper server. i tried all possible solutions from the forum but not solved my problem. please guide me to solve this issue,it's irritating as i have solved this issue when used with sql queries by making sql validation false but this time not working the reg exp changed in validation properties or sql security properties file. Thanks in advance Link to comment Share on other sites More sharing options...
vinayt Posted September 25, 2014 Share Posted September 25, 2014 For me, this approch worked like a Charm.. Thank you 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