Bug 1413090 - Server log warnings from CriteriaQueryRunner: Could not initialize private org.rhq.core.domain.event.EventSource org.rhq.core.domain.event.Event.source
Summary: Server log warnings from CriteriaQueryRunner: Could not initialize private or...
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.12
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1413088
TreeView+ depends on / blocked
 
Reported: 2017-01-13 15:30 UTC by bkramer
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description bkramer 2017-01-13 15:30:41 UTC
This error is logged whenever user navigate to RHQ UI dashboard - in case it has Recent Events portlet or when user navigate to the resource's Summary tab that contains Resource: Events portlet. This error does not affect collection of events. 

Version-Release number of selected component (if applicable):
RHQ 4.12

How reproducible:
Always

Steps to Reproduce:
1. Install RHQ;
2. Import EAP server into RHQ inventory;
3. Enable events collection for imported EAP server;
4. Make sure that either RHQ Dashboard contains Recent Events portlet or resource's Summary page contains Resource: Events portlet;
5. Start to collect events;
6. Navigate to RHQ UI Dashboard or to EAP's Summary page;

Actual results:
For every collected event in the portlet a WARN message "Could not initialize private org.rhq.core.domain.event.EventSource org.rhq.core.domain.event.Event.source" will be logged in the server.log file;

Expected results:
No WARN messages are logged;

Additional info:

The server.log in DEBUG mode shows the following:

**************************************************
14:59:38,140 DEBUG [org.rhq.enterprise.server.util.CriteriaQueryGenerator] (http-0.0.0.0:7080-2) SELECT  new org.rhq.core.domain.event.composite.EventComposite(    event.detail,   event.source.resource.id,   event.source.resource.name,   event.source.resource.ancestry,   event.source.resource.resourceType.id,   event.id,   event.severity,   event.source.location,   event.timestamp ) 
FROM Event event
WHERE ( event.source.resourceId = :resourceId 
AND LOWER( event.source.location )  like :sourceName ESCAPE '\\'  )
ORDER BY event.timestamp DESC, event.id ASC

14:59:38,140 DEBUG [org.rhq.enterprise.server.util.CriteriaQueryGenerator] (http-0.0.0.0:7080-2) Bind: (resourceId, 10100)
14:59:38,140 DEBUG [org.rhq.enterprise.server.util.CriteriaQueryGenerator] (http-0.0.0.0:7080-2) Bind: (sourceName, %%)
14:59:38,141 DEBUG [org.rhq.enterprise.server.util.CriteriaQueryGenerator] (http-0.0.0.0:7080-2) SELECT COUNT(*)
FROM Event event
WHERE ( event.source.resourceId = :resourceId 
AND LOWER( event.source.location )  like :sourceName ESCAPE '\\'  )

14:59:38,141 DEBUG [org.rhq.enterprise.server.util.CriteriaQueryGenerator] (http-0.0.0.0:7080-2) Bind: (resourceId, 10100)
14:59:38,141 DEBUG [org.rhq.enterprise.server.util.CriteriaQueryGenerator] (http-0.0.0.0:7080-2) Bind: (sourceName, %%)
14:59:38,142 DEBUG [org.rhq.enterprise.server.util.CriteriaQueryRunner] (http-0.0.0.0:7080-2) Could not initialize private org.rhq.core.domain.event.EventSource org.rhq.core.domain.event.Event.source  Following exception has caused the problem: : java.lang.IllegalArgumentException: Can not set org.rhq.core.domain.event.EventSource field org.rhq.core.domain.event.Event.source to org.rhq.core.domain.event.composite.EventComposite
	...
	at org.rhq.enterprise.server.util.CriteriaQueryRunner.initialize(CriteriaQueryRunner.java:188) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	at org.rhq.enterprise.server.util.CriteriaQueryRunner.initJoinFetchFields(CriteriaQueryRunner.java:173) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	at org.rhq.enterprise.server.util.CriteriaQueryRunner.finalizeCollection(CriteriaQueryRunner.java:147) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	at org.rhq.enterprise.server.util.CriteriaQueryRunner.execute(CriteriaQueryRunner.java:96) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	at org.rhq.enterprise.server.event.EventManagerBean.findEventCompositesByCriteria(EventManagerBean.java:480) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	...
	at org.rhq.enterprise.server.common.PerformanceMonitorInterceptor.monitorHibernatePerformance(PerformanceMonitorInterceptor.java:26) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	...
	at org.rhq.enterprise.server.common.TransactionInterruptInterceptor.addCheckedActionToTransactionManager(TransactionInterruptInterceptor.java:78) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	...
	at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.checkRequiredPermissions(RequiredPermissionsInterceptor.java:156) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	...
	at org.rhq.enterprise.server.event.EventManagerLocal$$$view112.findEventCompositesByCriteria(Unknown Source) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	at org.rhq.coregui.server.gwt.EventGWTServiceImpl.findEventCompositesByCriteria(EventGWTServiceImpl.java:109)
	...
	at org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:125) [rhq-rtfilter-4.12.0.JON330GA-redhat-1.jar:4.12.0.JON330GA-redhat-1]
	...
	at org.rhq.coregui.server.filter.CacheControlFilter.doFilter(CacheControlFilter.java:71)
	...
14:59:38,145 DEBUG [org.rhq.enterprise.server.util.CriteriaQueryRunner] (http-0.0.0.0:7080-2) Could not nullify non-initialized field [private org.rhq.core.domain.event.EventSource org.rhq.core.domain.event.Event.source].: java.lang.IllegalArgumentException: Can not set org.rhq.core.domain.event.EventSource field org.rhq.core.domain.event.Event.source to org.rhq.core.domain.event.composite.EventComposite
	...

**************************************************
Additionally, when I double click on a event in the Event portlet, event data is properly shown.


Note You need to log in before you can comment on or make changes to this bug.