Bug 478135

Summary: MIGRATED_FROM_JIRA: Improve handling and warning on source without key
Product: [Retired] penrose Reporter: Chandrasekar Kannan <ckannan>
Component: ConfigurationAssignee: Endi Sukma Dewata <edewata>
Status: CLOSED EOL QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: low    
Version: 2.0CC: benl, nmalki, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:43:44 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: 471500    

Description Chandrasekar Kannan 2008-12-27 08:02:46 UTC
When one creates a source without specifying a key, penrose refuses to read the data. The error is manifested as cryptic message in the  preview pane of penrose studio (something like 'server error -1'). 

The problem is this code in JDBCAdapter.load(): 

        sb.append(" order by "); 

sb.append(getOringialPrimaryKeyFieldNamesAsString(sourceConfig)); 

As there is no check wether the primary key is specified, sometimes  this results in malformed SQL queries like: 

select employeeNumber, givenName, id, ou, sn, uid, userPKCS12, userPassword from PENROSE.dbo.Users order by 
Additional Comments From jimyang dated Sun Jun 18 12:12:20 CDT 2006 
We'll add the additional validation code on the server and make the WARNING more visible in Penrose Studio. 


=========================================================
Issue dump from jira
$VAR1 = {
          'priority' => '3',
          'customFieldValues' => [],
          'project' => 'PENROSE',
          'status' => '5',
          'components' => [
                            {
                              'name' => 'Configuration',
                              'id' => '10014'
                            }
                          ],
          'reporter' => 'ddimitro',
          'key' => 'PENROSE-152',
          'assignee' => 'endisd',
          'summary' => 'Improve handling and warning on source without key',
          'id' => '10482',
          'updated' => '2008-08-08 10:16:50.0',
          'votes' => '0',
          'fixVersions' => [
                           {
                             'releaseDate' => '2006-07-14 00:00:00.0',
                             'sequence' => '14',
                             'name' => 'Penrose-1.0.2',
                             'released' => 'true',
                             'id' => '10084',
                             'archived' => 'false'
                           }
                         ],
          'affectsVersions' => [
                               {
                                 'releaseDate' => '2006-06-19 00:00:00.0',
                                 'sequence' => '13',
                                 'name' => 'Penrose-1.0.1',
                                 'released' => 'true',
                                 'id' => '10074',
                                 'archived' => 'false'
                               }
                             ],
          'description' => 'When one creates a source without specifying a key, penrose refuses to read the data. The error is manifested as cryptic message in the  preview pane of penrose studio (something like 'server error -1'). 

The problem is this code in JDBCAdapter.load(): 

        sb.append(" order by "); 

sb.append(getOringialPrimaryKeyFieldNamesAsString(sourceConfig)); 

As there is no check wether the primary key is specified, sometimes  this results in malformed SQL queries like: 

select employeeNumber, givenName, id, ou, sn, uid, userPKCS12, userPassword from PENROSE.dbo.Users order by ',
          'created' => '2006-06-18 12:11:36.0',
          'resolution' => '1',
          'type' => '4'
        };


=========================================================

Comment 1 Chandrasekar Kannan 2008-12-27 08:02:48 UTC
Marking bug as MODIFIED as it was already resolved in Jira - PENROSE-152