hard to find exceptions when using restrictive rights

Description

I do some experiments with roles and users and very restrictive rights. (The goal was to begin with no rights and open them one by one if needed.) While doing this I sometimes get exceptions without good explanations. These exceptions have to be debugged to see what is the problem. There is a need for better error messages as an Exception window or as a log entry.

The one you see in the attached screenshot is just one example. It created the following (not helpful) log:

16:55:11.657===========> CLogger.saveError: AccessTableNoView - (Not found) [14]
16:55:11.679===========> zkoss.handleError:1359: >>org.adempiere.exceptions.AdempiereException: java.lang.NullPointerException
>>java.lang.NullPointerException
>> at org.compiere.model.GridWindow.loadTabData(GridWindow.java:160)
>> at org.compiere.model.GridWindow.<init>(GridWindow.java:110)
>> at org.compiere.model.GridWindow.<init>(GridWindow.java:98)
>> at org.adempiere.impexp.GridTabCSVImporter.getSpecialMColumn(GridTabCSVImporter.java:686)
>> at org.adempiere.impexp.GridTabCSVImporter.fileImport(GridTabCSVImporter.java:205)
>> at org.adempiere.webui.panel.action.FileImportAction.importFile(FileImportAction.java:317)
>> at org.adempiere.webui.panel.action.FileImportAction.onEvent(FileImportAction.java:234)
>> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2742)
>> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2713)
>> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2654)
>> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
>> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1717)
>> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1502)
>> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1212)
>> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600)
>> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
>> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:491)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
>> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
>> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
>> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
>> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269)
>> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
>> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>> at java.lang.Thread.run(Thread.java:679)

This one comes from line 685 in GridTabCSVExporter. You need rights to the "Location" window for that.

Environment

None

Activity

Show:
Thomas Bayen
June 10, 2013, 12:19 AM
Edited

A second one: When I create a role with no rights and just give access to a document window (I tested with GL_Journal_Batch) there is a button for the document action. It seems activated, you can press it but nothing happens. There should be a better error message about that.

If you add the process rights in the role the behaviour stays the same. You have to add document action rights. Then a window opens to choose your action.

Thomas Bayen
February 2, 2014, 9:57 PM

It is the same for simple buttons. This is an example of a Toolbar Process button. I can press it but nothing happens. No error, nothing. On the console I get the following message:

22:50:06.684-----------> ProcessCtl.process: ProcessInfo[Import Bankauszug,Process_ID=221,Record_ID=1029478,Error=true,Summary=Cannot access Process 221 with role: Meyer,Log=0] [31]

Assignee

Diego Ruiz

Reporter

Thomas Bayen

Labels

None

Tested By

None

Components

Fix versions

Affects versions

Priority

Minor
Configure