Bug 771711 - JON 2.4.2 Release Candidate #2 ...unique constraint violation ... SQL Exception
Summary: JON 2.4.2 Release Candidate #2 ...unique constraint violation ... SQL Exception
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: Database
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: JON 2.4.2
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon30-sprint10, rhq43-sprint10
TreeView+ depends on / blocked
 
Reported: 2012-01-04 18:04 UTC by Mike Foley
Modified: 2012-01-05 19:31 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-01-05 19:31:15 UTC
Embargoed:


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

Description Mike Foley 2012-01-04 18:04:49 UTC
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 18:25:33 UTC
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 16:57:14 UTC
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 16:59:14 UTC
Setting to urgent for investigation

Comment 4 John Mazzitelli 2012-01-05 17:41:52 UTC
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 17:55:11 UTC
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 18:33:12 UTC
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.