Support Article
Cannot insert NULL into PR_HOURLY_USAGE table
SA-7856
Summary
You are seeing SQLIntegrityConstraintViolationException in log file thrown at LicenseDaemon processing.
Error Messages
2015-03-04 18:00:58,117 [ WorkManager(2)-17] [ STANDARD] [ xxx:01.01.01] (.license.InvocationTrackerImpl) ERROR - problem commiting hourly usage data - disabling tracking
com.pega.pegarules.pub.database.IntegrityConstraintViolationException: Database-Saver-InsertUpdatefail
From: (BD700B7646C94FA9776581391BEF6D5C1:(License Daemon))
SQL: insert into pr_hourly_usage (PZINTERACTIONCOUNT , PZINVOCATIONCOUNT , PZMAYCHECKOUTRULES , PZMODIFIEDRULESCOUNT , PZNODENAME , PZNOINVOCATIONFLOWCOUNT , PZNOINVOCATIONUSERCOUNT , PZPERIODENDING , PZUSERADDITIONALINFO , PZUSERID , PZUSERTYPE) values (? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?)
SQL Inserts: <1> <0> <0> <0> <0bce63e9aa4cc50d331b60caea7120e2> <0> <0> <2015-03-04 17:59:59.0> <<null>> <<null>> <H> <2015-03-04 17:59:59.0> <0bcexxe9aa4xx50d331b60caeaxxx20e2> <<null>>
Caused by SQL Problems.
Problem #1, SQLState 23000, Error code 1400: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("PRD"."PR_HOURLY_USAGE"."PZUSERID")
Steps to Reproduce
Configure an active null operator and observe the log file.
Root Cause
When License Compliance Tracking facility is enabled, a License Daemon starts each time you start the server. Periodically, such as once an hour this daemon saves counts and totals into instances of the Log-License-Usage-Hourly class, corresponding to the pr_hourly_usage table. This table typically contains one row per active user for each hourly snapshot.
Reported exception suggests that you have an active NULL user in your system.
Resolution
Execute 'select * from pr_operators' and review the result set to identify NULL operator. And then, either remove it or mark it as unavailable.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.