Bug 469983
Summary: | Satellite 5.1.1 API internal exception with getEventHistory() | ||
---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Issue Tracker <tao> |
Component: | API | Assignee: | Justin Sherrill <jsherril> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Sayli Karmarkar <skarmark> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 511 | CC: | cperry, tao, whayutin, xdmoon |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | sat530 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-09-10 19:53:54 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 456996, 471267, 474079 |
Description
Issue Tracker
2008-11-05 00:49:46 UTC
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 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 fixed in diff: 7231797..53180d9 Back port would be easy to do for 5.1.1. Feel free to request. Verified. No internal exception generated. ~SayliK 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 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 |