michael_56 Posted March 1, 2020 Share Posted March 1, 2020 I see frequent references in the logs to error UIDs. 2020-03-02 09:41:59,093 ERROR SecureExceptionHandlerImpl,pool-5-thread-2:116 - There was an error on the server. Try again or contact site administrators. (Error UID: c4c3f8d2-6fab-4e01-abdb-93aecba1d563)[/code]I have searched the entire database: psql -tA -U postgres -d jasperserver -c "select 'select ' || quote_literal(column_name) || ', count(*) from ' || table_schema || '.' || table_name || ' where ' || column_name || ' ilike XXX' from information_schema.columns where data_type in ('text', 'character varying')" | sed "s/XXX/'%c4c3f8d2-6fab-4e01-abdb-93aecba1d563%' union all/g" | paste -s - -d ' ' | sed 's/union all$//g' | psql -U postgres -d jasperserver -tA[/code] I have also searched the directory structure: grep -rHniF c4c3f8d2-6fab-4e01-abdb-93aecba1d563 /opt/jasperreports-server-cp-7.2.0[/code]There are no references to this error ANYWHERE except the original message posted above. So my question is this: Does the error UID even have a purpose, and if so, what is it? Link to comment Share on other sites More sharing options...
lucianc Posted March 3, 2020 Share Posted March 3, 2020 The purpose of the error UID is to link a problem experienced by a user in the UI to an exception stacktrace in the logs.It would normally work something like this: a user does something in the JasperReports Server UI, it goes wrong and the users gets a screen that reads "There was an error, UID: XYZ". The users sends the error UID to the server administrator, who searches the logs for the UID, finds the exception stack trace and (in the optimistic case) identifies the cause of the problem and fixes it.Regards,Lucian Link to comment Share on other sites More sharing options...
michael_56 Posted March 3, 2020 Author Share Posted March 3, 2020 lucianc, that makes sense and is the typical reason software provides unique identifiers to customers on errors. However, in this case I am the system administrator, and as per my original post, the only thing that appears in the error log is a message to contact the system administrator. Link to comment Share on other sites More sharing options...
ae3 Posted May 19, 2021 Share Posted May 19, 2021 It's an older question, but in case someone else is looking for it ...The documentation at Hiding Stack Trace Messages describes how error messages should be issued based on user roles. In the example given here, the error is likely to have been caused by a standard user who, according to the configuration, does not have permission to see the error contents, e.g.applicationContext-security.xml <bean name="exceptionOutputManager" class="com.jaspersoft.jasperserver.api.common.error.handling.ExceptionOutputManagerImpl"> <property name="outputControlMap"> <map> <entry key="ERROR_UID"> <list> <value>ROLE_USER</value> </list> </entry> <entry key="STACKTRACE"> <list> <value>ROLE_SUPERUSER</value> </list> </entry> <entry key="MESSAGE"> <list> <value>ROLE_SUPERUSER</value> </list> </entry> </map> </property> </bean>[/code]In our case, an error occurred while running a report. The cause was a faulty template that caused an "Input controls validation failure". However, this error message was not written to the log file but only the error UID. We determined the cause by debugging.So I wonder how an administrator in this case should analyze the problem using log files. Probably it would be helpful, the output of an error message (without stacktrace):applicationContext-security.xml<bean name="exceptionOutputManager" class="com.jaspersoft.jasperserver.api.common.error.handling.ExceptionOutputManagerImpl"> <property name="outputControlMap"> <map> <entry key="ERROR_UID"> <list> <!--<value>ROLE_USER</value>--> </list> </entry> <entry key="STACKTRACE"> <list> <value>ROLE_SUPERUSER</value> </list> </entry> <entry key="MESSAGE"> <list> <value>ROLE_USER</value> <value>ROLE_SUPERUSER</value> </list> </entry> </map> </property> </bean>[/code] 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