Bug 756086
Summary: | CLI console throws ClassCastException when method returns byte array | |||
---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | John Sanda <jsanda> | |
Component: | CLI | Assignee: | Nobody <nobody> | |
Status: | ON_DEV --- | QA Contact: | ||
Severity: | medium | Docs Contact: | ||
Priority: | high | |||
Version: | 4.2 | CC: | hrupp, mazz | |
Target Milestone: | --- | Flags: | mfoley:
needinfo?
|
|
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 786224 (view as bug list) | Environment: | ||
Last Closed: | 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: | 752488, 707225, 786224 |
Description
John Sanda
2011-11-22 16:44:43 UTC
cli only. does not affect drift-ui. cli only. does not affect drift-ui. And to further clarify, this bug is **not** related to drift. It is CLI-specific bug that I happened to stumble on while making some drift API calls. A user should be able to reproduce this exception by calling any method that returns a byte array and quite possibly an array of any other primitive type. (9:49:31 PM) ccrouch: jsanda: none of the normal drift use cases are impacted by https://bugzilla.redhat.com/show_bug.cgi?id=756086# correct? (9:50:02 PM) ccrouch: because otherwise we would have hit it before presumably? :-) (9:50:36 PM) ccrouch: i also doubt this is a regression from jon2.4 (9:51:12 PM) jsanda: looking... (9:51:51 PM) jsanda: i don't think that this impacts drift use cases (9:52:04 PM) jsanda: i also agree about it not being a regression (9:52:25 PM) jsanda: the class in question has had problems since the inception of the CLI (9:52:33 PM) jsanda: these types of parsing problems that is (9:53:41 PM) ccrouch: ok, given this is the first time we're hitting this, I'm presuming this datatype is not very common in the api (9:54:13 PM) jsanda: in the drift api or the cli api in general? (9:55:21 PM) jsanda: i'd have to review the remote apis to see where we have return type of byte array (9:55:23 PM) ccrouch: the cli api in general (9:55:39 PM) jsanda: we might in a few place (9:55:40 PM) jsanda: s (9:56:25 PM) ccrouch: ok, i'll assign it to lukas to take a look Lukas, can you have a quick investigate here. I'm particularly interested to know if this is a regression from JON2.4. Also is a fix feasible? Small? Safe? I'm suspicious of any changes in this area right before the release, since its sounds like a fundamental aspect of the CLI (9:56:58 PM) jsanda: i think we have more places that take a byte array as a param as opposed to having it as a return type (9:57:27 PM) jsanda: also keep in mind that this is limited to the interactive console only this is not a regression and it has small impact, only because few APIs actually return arrays. note that this is a problem for both primitive and object arrays. Will be writing unit tests in TabularWriterTest. committed to master: 756086 cloned this for the documentation portion of this ... from the BZ logger's repro steps ... the DriftManager object is not in the API doc ... nor the getDriftFileAsByteArray method. added new BZ for doc https://bugzilla.redhat.com/show_bug.cgi?id=786224 John ... I am having trouble verifying this. There is no API doc for the method you mention in the repro steps .... This is what I am seeing ... rhqadmin@localhost:7080$ DriftManager.getDriftFileAsByteArray('mydrift') Wrapped javax.ejb.EJBTransactionRolledbackException: [Warning] No entity found for query (<Unknown source>#1) DriftManager.getDriftFileAsByteArray('mydrift') ^ I can't tell if this is the expected behavior or not ... or if I am doing something incorrect. |