Lazy Initialization exception thrown for Message Body when querying Incident through SOAP API
search cancel

Lazy Initialization exception thrown for Message Body when querying Incident through SOAP API

book

Article ID: 375900

calendar_today

Updated On:

Products

Data Loss Prevention Enforce

Issue/Introduction

Upgraded to 16.0.2 RU2 and still using Soap API internally instead of using the new Rest API.

The issue with the soap api is that when the user belonging to a role queries for the incident detail, the following error is thrown in the Tomcat localhost log.

File: C:\ProgramData\Symantec\DataLossPrevention\EnforceServer\16.0.20000\logs\tomcat\localhost.2024-06-11.log

11 Jun 2024 16:11:41,576- Thread: 1753 SEVERE [com.vontu.manager.webservice.incident.v2011.IncidentWebServiceImpl] (INCIDENT_WEBSERVICE.300) Incident Detail operation encountered an error accessing incidents for user [USERNAME]
Cause:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.vontu.enforceentities.users.Role.permissions, could not initialize proxy - no Sessionorg.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.vontu.enforceentities.users.Role.permissions, could not initialize proxy - no Session
at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:612)
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:218)
....
...
 
 
11 Jun 2024 16:11:41,578- Thread: 1753 SEVERE [com.vontu.manager.webservice.incident.v2011.IncidentWebServiceImpl] Unable to service Incident detail request
Cause:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.vontu.enforceentities.users.Role.permissions, could not initialize proxy - no Sessionorg.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.vontu.enforceentities.users.Role.permissions, could not initialize proxy - no Session
at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:612)
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:218)
...
..
 

Environment

DLP 16.0.2

Resolution

Option 1: You can use the built-in Administrator account created during installation. The built-in Administrator account by default has all the privileges.

Option 2: Upgrade 16.0 RU2 HF1 (16.0.20001.60064) or later.