Jump to content
We've recently updated our Privacy Statement, available here ×
  • This documentation is an older version of JasperReports Server Visualize.js Guide. View the latest documentation.

    This chapter lists the errors that commonly occur and describes how to handle them with Visualize.js.

    This chapter contains the following sections:

    Error Properties
    Common Errors
    Catching Initialization and Authentication Errors
    Catching Search Errors
    Validating Search Properties
    Catching Report Errors
    Catching Input Control Errors
    Validating Input Controls

    Error Properties

    The properties structure for Generic Errors is defined as follows:

    Common Errors

    The following table lists common errors, their message, and their cause.

    Error Message - Description
    Page or app not responding {no_message} - If your page or web application has stopped working without any notifications or errors, then check that the server that provides visualize.js is accessible and returning scripts.
    unexpected.error An unexpected error has occurred - In most of cases this is either a JavaScript exception or an HTTP 500 (Internal Server Error) response from server.
    schema.validation.error JSON schema validation failed: {error_message} - Validation against schema has failed. Check the validationError property in object for more details.
    unsupported.
    configuration.error
    {unspecified_message} - This error happens only when isolateDom = true and defaultJiveUi.enabled = true. These properties are mutually exclusive.
    authentication.error Authentication error - Credentials are not valid or session has expired.
    container.not.found.error Container was not found in DOM - The specified container was not found in the DOM:error.
    report.execution.failed Report execution failed - The report failed to run on the server.
    report.execution.cancelled Report execution was canceled - Report execution was canceled.
    report.export.failed Report export failed - The report failed to export on the server.
    licence.not.found JRS missing appropriate licence - The server's license was not found.
    licence.expired JRS license expired - The server's license has expired
    resource.not.found Resource not found in Repository - Either the resource does not exist in the repository or the user doesn't have permissions to read it.
    export.pages.out.range Requested pages {0} out of range - The user requested pages which do not exist in the current export.
    input.controls.
    validation.error
    {server_error_message} - The wrong input control params were sent to the server.

    Catching Initialization and Authentication Errors

    Visualize.js is designed to have many places where you can catch and handle errors. The visualize function definition, as shown in Contents of the Visualize.js Script, is:

    During intitialization and authentication, you can handle errors in the third parameter named errorback (an error callback). Your application would then have this structure:

    Catching Search Errors

    One way to handle search errors is to specify an error handler as the second parameter of run:

    Another way to handle search errors is to specify a function as the third parameter of run. This function is an always handler that run every time when operation ends.

    Validating Search Properties

    You can also validate the structure of the search properties without making an actual call to the search function:

    Catching Report Errors

    To catch and handle errors when running reports, define the contents of the err function as shown in the following sample:

    Catching Input Control Errors

    Catching and handling input control errors is very similar to reports. Define the contents of the err function that gets invoked in error conditions, as shown in the following sample:

    Validating Input Controls

    You can also validate the structure of your input controls without making an actual call. However, the values of the input controls and their relevance to the named resource are not checked.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...