Bug 771711 - JON 2.4.2 Release Candidate #2 ...unique constraint violation ... SQL Exception
JON 2.4.2 Release Candidate #2 ...unique constraint violation ... SQL Exception
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Database (Show other bugs)
unspecified
Unspecified Unspecified
urgent Severity high (vote)
: ---
: JON 2.4.2
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: jon30-sprint10/rhq43-sprint10
  Show dependency treegraph
 
Reported: 2012-01-04 13:04 EST by Mike Foley
Modified: 2012-01-05 14:31 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-01-05 14:31:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
full server log (382.94 KB, application/octet-stream)
2012-01-04 13:04 EST, Mike Foley
no flags Details

  None (edit)
Description Mike Foley 2012-01-04 13:04:49 EST
Created attachment 550743 [details]
full server log

Description of problem:  JON 2.4.2 Release Candidate #2 ...unique constraint violation ... SQL Exception


Version-Release number of selected component (if applicable):  JON 2.4.2 RC#2


How reproducible:


Steps to Reproduce:
1. install JON 2.4.2 ...with Oracle repo
2. imported the agent
3.
  
Actual results:  SQL Exception in server log


Expected results:  no sql exceptions


Additional info:

[foleymonsterbox1.foleyhomenetwork] has connected to this server at Wed Jan 04 11:48:44 EST 2012
2012-01-04 11:49:10,486 WARN  [org.rhq.enterprise.server.measurement.MeasurementScheduleManagerBean] problem creating schedules for resourceIds [[I@2a6899a8]
java.sql.SQLException: ORA-00001: unique constraint (RHQ.RHQ_MEAS_SCHED_UNIQ) violated

	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)


  [FULL SERVER LOG ATTACHED TO THIS BZ]
Comment 1 Mike Foley 2012-01-04 13:25:33 EST
in case anyone is wondering if my db was clean ... this is the script i ran before doing the install ... 


declare cursor all_objects_to_drop is
select *  from user_objects where object_type in ('TABLE', 'VIEW', 'FUNCTION', 'SEQUENCE');
begin
for obj in all_objects_to_drop loop
 begin
  if obj.object_type = 'TABLE' then
  execute immediate('DROP '||obj.object_type||' '||obj.object_name||' CASCADE CONSTRAINTS PURGE');
 else
 execute immediate('DROP '||obj.object_type||' '||obj.object_name);
 end if;
 exception when others then null;
 end;
 end loop;
 end;
Comment 2 Charles Crouch 2012-01-05 11:57:14 EST
We should try to verify if anything changed in this area for 2.4.2. I'm not seeing anything related to RHQ_MEAS_SCHED_UNIQ come up in BZ besides this, so its an odd one.
Comment 3 Charles Crouch 2012-01-05 11:59:14 EST
Setting to urgent for investigation
Comment 4 John Mazzitelli 2012-01-05 12:41:52 EST
side issue - the log message that was spit out is useless:

   problem creating schedules for resourceIds [[I@2a6899a8]

so I committed 5821f5d to the release-3.0.1 branch to fix this to use

   Arrays.toString(resourceIds)

so the array is dumped properly. We should now be able to see the resource IDs that caused the problem. I committed the similiar thing to the master branch.
Comment 5 John Mazzitelli 2012-01-05 12:55:11 EST
fyi: the code in this path was last changed in summer of 2009... nothing recently changed here that I can see. that unique constraint has been in the schema since 2008 at least.
Comment 6 John Mazzitelli 2012-01-05 13:33:12 EST
moving to on_qa which is what I think charles wanted me to do as per:

(12:07:16 PM) ccrouch: mazz: I just added https://bugzilla.redhat.com/show_bug.cgi?id=771711 to sprint10 since its come out of 2.4.2 testing
(12:07:16 PM) ccrouch: can you take a quick look and see if there is anything obvious that changed on the release-3.0.1 branch that could be causing this, if you're not seeing it and no obvious causes, please push back to QE

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