Fixing Maintenance Window Initialization Error in AIQUM
Applies to
- Active IQ Unified Manager 9.18+ (AIQUM)
Issue
- The AIQUM web application (
dfm-app.war) fails to start on every WildFly restart attempt. - The following exception appears in the WildFly server log:
org.hibernate.LazyInitializationException: could not initialize proxy [MaintenanceWindow#1] - no Session - The issue is triggered when a maintenance window record with
ID=1exists in the database.
Cause
- The
MaintenanceWindowScheduler.init()method indfm-app.waraccesses a Hibernate lazy proxy (MaintenanceWindow#1) outside of an active session. - This was introduced by a code/mapping change in version 9.18P1.
Solution
- Database manipulation needed
- Please contact NetApp Technical Support or log into the NetApp Support Site to create a case. Reference this article for further assistance
Partner Notes
Additional Information
Internal Notes
- This is an L2 operation that requires direct database access on the AIQUM appliance.
Submitted CAIQUM-8929 for this issue.
- L2 procedure — database cleanup:
- Connect to MySQL on the AIQUM appliance and select the
Ocumdatabase. - Select Ocum database
USE OCUM; - Check the current maintenance window state:
SELECT mw.id, FROM_UNIXTIME(mw.startTime/1000) AS start_time, FROM_UNIXTIME(mw.endTime/1000) AS end_time, m.resourceType, m.resourceId
FROM maintenance_window mw
LEFT JOIN maintenance_window_object_mapping m ON m.maintenanceWindowId = mw.id; - Delete all maintenance window records (
ON DELETE CASCADEautomatically cleans upmaintenance_window_object_mapping):DELETE FROM maintenance_window; - Verify both tables are empty:
SELECT COUNT(*) FROM maintenance_window;
SELECT COUNT(*) FROM maintenance_window_object_mapping; - Reboot the AIQUM server.
