Web Viewer Java Exception during login - OM Web Viewer 12.1
search cancel

Web Viewer Java Exception during login - OM Web Viewer 12.1

book

Article ID: 439767

calendar_today

Updated On:

Products

Output Management Web Viewer

Issue/Introduction

Encountering a Java Exception (HTTP Status 500 – Internal Server Error) when attempting to log into the Web Viewer account. The logs show java.lang.NullPointerException and DB2 SQL Error SQLCODE=-551, SQLSTATE=42501.

 

Environment

  • Output Management Web Viewer
  • DB2

Cause

This error signifies that the user ID you are using does not have the required authorization to perform operations (such as CREATE, SELECT, INSERT, or UPDATE) on the database objects.

Resolution

Ensure that  Web Viewer has the proper permissions to interact with the database. Follow these steps to resolve the issue:

  1. Disable Automatic Table Generation: Set PERSISTENCE.TableGeneration=0 in your WVprofile.properties file. This prevents Web Viewer from attempting to create tables automatically when it lacks the necessary database permissions.
  2. Manually Create Database Tables: Use the provided Data Definition Language (DDL) scripts to create the tables manually. You can find these SQL scripts in the ddl folder of your installation media or the installed directory.
    Use create.sql to create tables in your pre-created database.
  3. Verify JDBC Configuration: Ensure your PERSISTENCE.JDBCURL is correctly formatted. If you use DB2, ensure the URL includes the necessary parameters, such as: jdbc:db2://####:####/####:currentSchema=####;
  4. Check Account Privileges: Compare the privileges of your JDBCUser (e.g., ####) with a working environment to ensure it has the correct permissions for the database schema.