max.massoni Posted January 27, 2016 Posted January 27, 2016 We have two Jaspersoft AWS environments and I'm not able to create ad hoc views and reports in one of them. When I try to create an adhoc view I'm prompted with the following error:Error Messagejava.lang.Exception: You do not have permission to write to the folder /temp. Choose another folder or contact your system administrator.Error Tracejava.lang.Exception: You do not have permission to write to the folder /temp. Choose another folder or contact your system administrator. at com.jaspersoft.ji.semantic.action.QueryBuilderAction.repositoryTempSave(QueryBuilderAction.java:2664) at com.jaspersoft.ji.semantic.action.QueryBuilderAction.tempSave(QueryBuilderAction.java:2319) at This appears to be due to the fact the Save Topic step in the ad hoc view creation defaults the save location to /. If I set it to an exisiting folder I'm able to create and save the AdHoc view. That however leads to a second problem: When I attempt to create a report from the Ad Hoc View I get another exception: Error Messagejava.lang.RuntimeException: An error occurred while performing the previous request.Error Tracejava.lang.RuntimeException: An error occurred while performing the previous request. at com.jaspersoft.ji.adhoc.action.ReportGeneratorController.defaultExceptionHandler(ReportGeneratorController.java:103) at sun.reflect.GeneratedMethodAccessor4954.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleException(MultiActionController.java:637) at ... In the other environment, where everything works I noticed that the reports are created in the Organization's Temp folder by default so I suspect both errors might be related. The thing is, in the problematic environment, there is no such folder. I've created one and assigned the correct permissions but the error persists. My question is: How can I provide access to the /Temp folder since I have no access to it from the UI? Thanks in advance!
joseng62 Posted January 27, 2016 Posted January 27, 2016 Hi Max, So default the only roles that can view temp folder is <property name="rolesToSeeTempFiles"> <list> <value>ROLE_SUPERUSER</value> <value>ROLE_ADMINISTRATOR</value> </list> </property>as per the file applicationContext-adhoc.xmlEnsure you user is assigned ROLE_USER atleast. As per jasper manualROLE_USER: Required to log in. This role is automatically assigned to everyJasperReports Server user. It's a special system-level role visible in everyorganization. Never delete this role, it's required to create users and allow them to log in.Then when signed in as superadmin check ther permission for ROLE_USER, you required at least Read access level. Then if you use other roles set permission to read and write. If user spesific then set per user. Then you also require correct permission to for the domain or topic you created.Hope this helps, if yoou have not already done it.
max.massoni Posted January 27, 2016 Author Posted January 27, 2016 Thanks for the answer joseng62. I'm using the jasperadmin account which is a ROLE_ADMINISTRATOR user so I believe it should have enough rights to write to the temp folder. I restarted the server but the problem persists. I read something about clearing the temp folder and restarting tomcat. I'll try that. Are reports created in the temp folder? With the Ad Hoc View the workaround atm is to save them as topics to another folder but I dont have a workaround for creating reports. I'm assuming that reports are created in the temp folder and the root cause of the issue is (somehow) the lack of permissions.
joseng62 Posted January 28, 2016 Posted January 28, 2016 Ok so,Just check and confirm the jasperadmin has these 2 roles assignedROLE_ADMINISTATOR and ROLE_USERPermission could easily have been changed.The when you sign in as superuser or jasperadmimCan you confirm the permission set for the given role and jasperadmin user to the temp folder.ROLE_ADMIN… should be administerROLE_USER should be either administer or one of the write options.User jasperadmin should be default no access, but if so, just change to administer and test and see if any difference.Same goes for the given domain or topic you created. Also requires privileges. Regarding this“I restarted the server but the problem persists. I read something about clearing the temp folder and restarting tomcat. I'll try that.”You could clear the work folder tomcat install directoryapache-tomcatwork. Ensure tomcat is shutdown when doing so.And then also clear the temp folder tomcat install directoryapache-tomcattemp.Another issue might be that someone might have manually created the temp folder after deleting it in backend. Which means the ownership, group and file permission might be incorrect.Check for this and confirm its same permission. Own, grp as apachetomcatbin.Also have you tried to troubleshoot regarding different situations?Did you try to sign in as another user and create ad hoc report?Do you get to the point where the report completed to load and you can drag and drop fields or measures? Or does it give error before that?Or does it give error when you try to save the ad hoc report?Maybe create another role, assign to a new user and give that role and user full access to temp folder and domain.Or give full access to parent folder organization, child folder permission are inherited from parent.If it works, then you know its permissions issue.On the other AWS instance you have, where its working, maybe cross check the permissions settings, file permissions, role / user setup etc.Also the error you are retrieving from the UI screen.Always try and check the jaspers log file as more exceptions might be thrown that is not displaying on screen. “….apache-tomcatwebappsjasperserver-proWEB-INFlogs”Could also check the tomcat log files and see of any severe, error or wars are being generated.“…apache-tomcatlogs”Also when you sign in as superuser, you can set the log level for log4j properties. This might help to trouble shoot the issue. There might be another underlying issue.“Are reports created in the temp folder?” – Yes as I understand it Jasper uses the temp folder for just this purpose to temporally store data/report in this folder.“With the Ad Hoc View the workaround atm is to save them as topics to another folder “ – Topic are new set of data query you created and save from given domain. So topic receive own permission and when you save topic you create default permission. So yes seem to be that the issue is around permissions.Hope this helps
Balder Posted December 2, 2016 Posted December 2, 2016 Same problem, caused by two resource bundles with same name.... wowI had the same problem using Jasper Server 6.2. Creating a ad-hock query from a domain caused same error. The reason for this was beacuse I had added a property resource bundle for translation - with same name as an existing one, but from a different folder. Jasper asked me to overwrite when I added this to the domain - but it didn't - just added it. So, the two files, ie. MyCoreResouce.properties actually existed twice in the list.... Removing the old one solved the problem :-)
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