Bug 1413088 - 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: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.3.0,JON 3.3.1,JON 3.3.2,JON 3.3.3,JON 3.3.4,JON 3.3.5,JON 3.3.6,JON 3.3.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: DR01
: JON 3.3.9
Assignee: Ruben Vargas Palma
QA Contact: Hayk Hovsepyan
URL:
Whiteboard:
Depends On: 1413090
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-13 15:25 UTC by bkramer
Modified: 2020-02-14 18:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-02 17:21:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2733801 0 None None None 2017-01-13 15:25:59 UTC
Red Hat Product Errata RHEA-2017:2846 0 normal SHIPPED_LIVE Red Hat JBoss Operations Network 3.3.9 bug fix update 2017-10-02 21:21:28 UTC

Description bkramer 2017-01-13 15:25:05 UTC
Description of problem:
This issue is reported in JBoss ON upgraded from 3.3.2 to 3.3.7. However, further testing showed that the same WARN message was logged in all 3.3 versions of JBoss ON. This error is logged whenever user navigate to JBoss ON 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):
JBoss ON 3.3.x

How reproducible:
Always

Steps to Reproduce:
1. Install JBoss ON;
2. Import EAP server into JBoss ON inventory;
3. Enable events collection for imported EAP server;
4. Make sure that either JBoss ON Dashboard contains Recent Events portlet or resource's Summary page contains Resource: Events portlet;
5. Start to collect events;
6. Navigate to JBoss ON 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
	...

**************************************************

Comment 1 bkramer 2017-01-13 15:27:17 UTC
Additionally, when I double click on a event in the Event portlet, event data is properly shown.

Comment 2 Josejulio Martínez 2017-08-23 15:51:45 UTC
commit 02e100b806106763b697554456c18b3fff63ff22
Merge: 4a0e0df 6a1822e
Author: Michael Burman <yak>
Date:   Wed Aug 23 16:19:08 2017 +0300

    Merge pull request #313 from rubenvp8510/BZ1413088
    
    Bug-1413088  Not fetching source in the Events portlet

commit 6a1822e393935ab4f941e642e9abb37890d6ec71
Author: Ruben Vargas <ruben.vp8510>
Date:   Mon Aug 14 15:20:36 2017 -0500

    Not fetch source in the Events portlet

Comment 4 Simeon Pinder 2017-09-01 15:34:03 UTC
Moving to ON_QA as available for test with the following binary:
http://download.eng.bos.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/133/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip

*NOTE Build represents JON 3.3.9 DR01 build.

Please report issues as you encounter them.

Comment 5 Hayk Hovsepyan 2017-09-06 11:04:50 UTC
Verified on revision JON 3.3.9 DR01.

WARN Events are not listed in Dashboard or in server.log.

Comment 6 errata-xmlrpc 2017-10-02 17:21:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:2846


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