Bug 469983 - Satellite 5.1.1 API internal exception with getEventHistory()
Satellite 5.1.1 API internal exception with getEventHistory()
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
511
All Linux
medium Severity medium
: ---
: ---
Assigned To: Justin Sherrill
Sayli Karmarkar
:
Depends On:
Blocks: 456996 471267 474079
  Show dependency treegraph
 
Reported: 2008-11-04 19:49 EST by Issue Tracker
Modified: 2015-03-22 21:09 EDT (History)
4 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:53:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Issue Tracker 2008-11-04 19:49:46 EST
Escalated to Bugzilla from IssueTracker
Comment 1 Issue Tracker 2008-11-04 19:49:49 EST
Function 'getEventHistory' when run initially displays Satellite channel subscription history. Upon running the same function after updating packages via satellite on a client, it displays following error:

Fault returned from XML RPC Server, fault code -1: redstone.xmlrpc.XmlRpcFault:
unhandled internal exception: Could not find method called: setCreated in class: com.redhat.rhn.frontend.dto.HistoryEvent with params: [type:
java.lang.String, value: 2008-10-24 12:55:26]

This event sent from IssueTracker by xdmoon  [Support Engineering Group]
 issue 233691
Comment 4 Issue Tracker 2008-11-04 19:49:54 EST
I've reproduced with scripts based on both the python script provided and
the perl script from Engineering's samples script
(trunk/eng/java/scripts/api/perl/system.getEventHistory.pl).

Based on the following stacktrace from catalina.out -
...
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Caused by: com.redhat.rhn.common.util.MethodNotFoundException: Could not
find method called: setCreated in class:
com.redhat.rhn.frontend.dto.HistoryEvent with params: [type:
java.lang.String, value: 2008-10-21 17:54:54]
        at
com.redhat.rhn.common.util.MethodUtil.callMethod(MethodUtil.java:193)
        at
com.redhat.rhn.common.db.datasource.CachedStatement.addToObject(CachedStatement.java:727)
        at
com.redhat.rhn.common.db.datasource.CachedStatement.processResultSet(CachedStatement.java:588)
        at
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:451)
...
        at
com.redhat.rhn.common.db.datasource.SelectMode.execute(SelectMode.java:101)
        at
com.redhat.rhn.domain.server.ServerFactory.getServerHistory(ServerFactory.java:401)
        at
com.redhat.rhn.frontend.xmlrpc.system.SystemHandler.getEventHistory(SystemHandler.java:1828)
        ... 52 more

Looks like the problem is when
rhn.domain.server.ServerFactory.getServerHistory retrieves set of
HistoryEvents, and even though this is a select, the persistence layer
does a db write (due to caching?) and that's where HistoryEvent barfs b/c
setCreated() takes a Date not a String as apparently was passed in here.

rhn-java-sat-5.1.1/code/src/com/redhat/rhn/frontend/dto/HistoryEvent.java
...
    public void setCreated(Date createdIn) {
        this.created = createdIn;
    }
...

Xixi



This event sent from IssueTracker by xdmoon  [Support Engineering Group]
 issue 233691
Comment 10 Justin Sherrill 2008-11-12 12:02:14 EST
fixed in diff: 

7231797..53180d9

Back port would be easy to do for 5.1.1.  Feel free to request.
Comment 12 Sayli Karmarkar 2009-02-05 12:37:30 EST
Verified. No internal exception generated. 

~SayliK
Comment 13 wes hayutin 2009-08-13 10:53:27 EDT
ran get history
changed base channel, to custom installed package
ran get history


History for is for rlx-3-18.rhndev.redhat.com ( 1000013371 ).

[{'completed': <DateTime '20090813T10:52:04' at b7c8ae2c>, 'details': '', 'summary': 'Package Install scheduled by whayutin'}, {'completed': <DateTime '20090813T10:51:32' at b7c8af0c>, 'details': 'wescustombase3', 'summary': 'subscribed to channel wescustombase3'}, {'completed': <DateTime '20090813T10:51:32' at b7c9360c>, 'details': 'rhel-i386-server-5', 'summary': 'unsubscribed from channel rhel-i386-server-5'}, {'completed': <DateTime '20090813T10:51:31' at b7c9364c>, 'details': 'rhn-tools-rhel-i386-server-5', 'summary': 'uns
Comment 14 Brandon Perkins 2009-09-10 15:53:54 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

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